MrPLC Member
  • Content count

  • Joined

  • Last visited

Everything posted by alolkema

  1. TCP/IP messaging

    Thank you, ahbest. I have used the STX and ETX as marker, to determine if there are more than 1 messages in the receive buffer. When i find the 1st message, i cut it from the string, and do another pass for the next, and repeat it until all messages are dealt with. During this procedure, i set a Wait bit to hold any messages for sending. I have tested this routine extensively, and it works very good.
  2. TCP/IP messaging

    Hello, i am new here,  and i tried finding this topic, but without success (maybe my impatience…). I am writing a PLC (CJ2M) with a CJ1W-EIP21 Ethernet module, to have a 2-way explicit message communication with a server on a customer's network. Done it before, but now i have ran into the problem that i need to split the "chained" messages; So, i can receive a message, and as long as it contains only 1 message, all goes well. But sometimes, due to the machine's process, i get 2 or 3 messages in 1 string: 1 message:      <STX>ID|002|1|1|DescriptionText|<ETX> 3 messages:   <STX>ID|002|1|1|DescriptionText|<ETX><STX>HBT<ETX><STX>FX|003|1|44|ShutDownMotor4<ETX> I also need to control any messages i need to send, to wait for the receiving actions.   I already started writing, but debugging it takes a long time. Anyone has a -off-the-shelf- solution for this? Thanks in advance, Arnold