AGG Software Forums
November 25, 2024, 12:46:50 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome on our forum!
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  Online Help Center / Data loggers and plug-ins / Splitting data packets with the parser module on: August 09, 2012, 09:28:27 AM
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.


Pages: [1]
Powered by SMF 1.1.21 | SMF © 2015, Simple Machines