My query contents 3 parts. Each part demands a certain information:
<STX>#81#D4#D5<ETX><STX>#81#C1#B0#F0<ETX><STX>#81#C1#B1#F1<ETX>
Answers look like this (1 data packet):
<STX>#81#D4#B0#B9#B0#B8#B1#B2#B0#B7#B4#B7#B5#B9#DF<ETX><STX>#81#C1#B0#A0#B0#B7#B0#AE#B0#A0#B0#B7#B0#AE#B0#F0<ETX><STX>#81#C1#B1#A0#B0#B8#B5#AE#B0#A0#B0#B8#B5#AE#B0#F1<ETX>
I have a problem with parsing the data packets. Sometimes the parser module doesn't figure out where the correct beginning/ending of the data packet is. The result is a "slipping" of the parsed data. There is a checksum in front of every <ETX>.
I tried to split the packets by sign characters, but concerning the checksum the second and the third part of the packet have the same ending.
Beginning: #02#81#D4 Ending: ?!
Now I split them by a timeout of 10 ms. It also doesn't work.
Is there also a solution for three queries? I need to extract/export 2 variables of each part.