Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Host program talking to a CPLC
#1
What we want to achieve is the ability to have a CPLC receive an asynchronous message from windows. We don't want to use a scanf-type statement in the CPLC which would cause the CPLC to do nothing else while it waits for a message.

I'm not sure which protocol would be better. We don't want it to be real complicated. What protocol does GPASCII use? This is very similar to what we would want to do --- sending commands or queries and getting responses.

The attached file contains an example Power PMAC C app to do what you desire. To write the Windows side you could use our PowerPmac ComLib and implement the generic telnet connection. Then through this connection send the command to start this C app. After that each string the telnet sends will be received by the C app which can parse it and send whatever is desired to the PPmac. The responses from the C app will be received by the host application.

At this point you can customize the communication process as you desire. You can make your own command set which the host program uses and the C app intercepts and turns into valid PPmac commands.


Attached Files
.doc   Custom GPAscii.doc (Size: 43 KB / Downloads: 151)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)