Support Forums
Init parsing problem - Sontek SL

My 9600 8n1 serial input string from Sontek SL:

2008 10 07 17 27 58      0      0     -1 255 255   0   0   0 0   0 2113  -3 0   1   0   0   2790       6641    11  71  20   20  34  34  24
 1  -1352    959 255 255  43  46
 2   2989  -2091 255 255  33  34
 3   -318  -2699 255 255  33  34
 4   4035   -309 255 255  33  35
 5   -834  -1257 255 255  33  35
 6    105   -197 255 255  33  34
 7    605  -2927 255 255  34  34
 8  -3007  -1404 255 255  34  34
 9   2116  -1863 255 255  33  34
10    402  -2374 255 255  33  34

My code:

BEGIN"sonHP"
DO{/n/c/u}
RA2SERIAL"\\013\\010"
2SERIAL("\\013\\010%d[1CV]%d[2CV]%d[3CV]%d[4CV]%d[5CV]%d[6CV]%d[7CV]%d[8CV]%d[9CV]%d[10CV]%d[11CV]%d[12CV]%d[13CV]%d[14CV]%d[15CV]",w)
2SERIAL("%d[16CV]%d[17CV]%d[18CV]%d[19CV]%d[20CV]%d[21CV]%d[22CV]%d[23CV]%d[24CV]%d[25CV]%d[26CV]%d[27CV]%d[28CV]%d[29CV]%d[30CV]%d[31CV]",w)
2SERIAL("\\013%d[32CV]%d[33CV]%d[34CV]%d[35CV]%d[36CV]%d[37CV]%d[38CV]",w)
2SERIAL("\\013%d[39CV]%d[40CV]%d[41CV]%d[42CV]%d[43CV]%d[44CV]%d[45CV]",w)
2SERIAL("\\013%d[46CV]%d[47CV]%d[48CV]%d[49CV]%d[50CV]%d[51CV]%d[52CV]",w)
2SERIAL("\\013%d[53CV]%d[54CV]%d[55CV]%d[56CV]%d[57CV]%d[58CV]%d[59CV]",w)
2SERIAL("\\013%d[60CV]%d[61CV]%d[62CV]%d[63CV]%d[64CV]%d[65CV]%d[66CV]",w)
2SERIAL("\\013%d[67CV]%d[68CV]%d[69CV]%d[70CV]%d[71CV]%d[72CV]%d[73CV]",w)
2SERIAL("\\013%d[74CV]%d[75CV]%d[76CV]%d[77CV]%d[78CV]%d[79CV]%d[80CV]",w)
2SERIAL("\\013%d[81CV]%d[82CV]%d[83CV]%d[84CV]%d[85CV]%d[86CV]%d[87CV]",w)
2SERIAL("\\013%d[88CV]%d[89CV]%d[90CV]%d[91CV]%d[92CV]%d[93CV]%d[94CV]",w)
2SERIAL("\\013%d[95CV]%d[96CV]%d[97CV]%d[98CV]%d[99CV]%d[100CV]%d[101CV]",w)
1..101CV 
LOGONA 
END

Here is my operating procedure: I plug the serial input into DT80. Then type RUNJOB "sonHP". 20 out of 20 times, the first parsing will be off like below:

DT80> RUNJOB "sonhp"
DT80> Loaded job "SONHP"
E90
1.0 -1357.0 439.0 255.0 255.0 44.0 47.0 2.0 -2811.0 
E90
5.0 8643.0 -124.0 255.0 255.0 34.0 34.0 6.0 -4433.0

When it should parse like this:

2008 10 07 17 27 58      0      0     -1 255 255   0

My solution was to H and then G the job, and the parsing will go to normal. I gave the customer the procedure, i.e: on site plug the DT80 to a laptop, plug the serial input, runjob, and h and g to avoid first parsing error.

But the end user has a problem, they want to run job on DT80 in the office first (not on site) and then let UNSKILLED OPERATORS bring the DT80 on site and let the UNSKILLED OPERATOR without any laptop to just plug in the serial input into the DT80.

After data collection, the unskilled operator will just bring the whole DT80 back from site to office for data retrieval. Thus since the unskilled operator doesn't have an laptop to H G the job after the first few parsing, the DT80 cannot parse properly. Is there any way around this?

Thanks!

My 9600 8n1 serial input string from Sontek SL: ```` 2008 10 07 17 27 58 0 0 -1 255 255 0 0 0 0 0 2113 -3 0 1 0 0 2790 6641 11 71 20 20 34 34 24 1 -1352 959 255 255 43 46 2 2989 -2091 255 255 33 34 3 -318 -2699 255 255 33 34 4 4035 -309 255 255 33 35 5 -834 -1257 255 255 33 35 6 105 -197 255 255 33 34 7 605 -2927 255 255 34 34 8 -3007 -1404 255 255 34 34 9 2116 -1863 255 255 33 34 10 402 -2374 255 255 33 34 ```` My code: ```` BEGIN"sonHP" DO{/n/c/u} RA2SERIAL"\\013\\010" 2SERIAL("\\013\\010%d[1CV]%d[2CV]%d[3CV]%d[4CV]%d[5CV]%d[6CV]%d[7CV]%d[8CV]%d[9CV]%d[10CV]%d[11CV]%d[12CV]%d[13CV]%d[14CV]%d[15CV]",w) 2SERIAL("%d[16CV]%d[17CV]%d[18CV]%d[19CV]%d[20CV]%d[21CV]%d[22CV]%d[23CV]%d[24CV]%d[25CV]%d[26CV]%d[27CV]%d[28CV]%d[29CV]%d[30CV]%d[31CV]",w) 2SERIAL("\\013%d[32CV]%d[33CV]%d[34CV]%d[35CV]%d[36CV]%d[37CV]%d[38CV]",w) 2SERIAL("\\013%d[39CV]%d[40CV]%d[41CV]%d[42CV]%d[43CV]%d[44CV]%d[45CV]",w) 2SERIAL("\\013%d[46CV]%d[47CV]%d[48CV]%d[49CV]%d[50CV]%d[51CV]%d[52CV]",w) 2SERIAL("\\013%d[53CV]%d[54CV]%d[55CV]%d[56CV]%d[57CV]%d[58CV]%d[59CV]",w) 2SERIAL("\\013%d[60CV]%d[61CV]%d[62CV]%d[63CV]%d[64CV]%d[65CV]%d[66CV]",w) 2SERIAL("\\013%d[67CV]%d[68CV]%d[69CV]%d[70CV]%d[71CV]%d[72CV]%d[73CV]",w) 2SERIAL("\\013%d[74CV]%d[75CV]%d[76CV]%d[77CV]%d[78CV]%d[79CV]%d[80CV]",w) 2SERIAL("\\013%d[81CV]%d[82CV]%d[83CV]%d[84CV]%d[85CV]%d[86CV]%d[87CV]",w) 2SERIAL("\\013%d[88CV]%d[89CV]%d[90CV]%d[91CV]%d[92CV]%d[93CV]%d[94CV]",w) 2SERIAL("\\013%d[95CV]%d[96CV]%d[97CV]%d[98CV]%d[99CV]%d[100CV]%d[101CV]",w) 1..101CV LOGONA END ```` Here is my operating procedure: I plug the serial input into DT80. Then type RUNJOB "sonHP". 20 out of 20 times, the first parsing will be off like below: ```` DT80> RUNJOB "sonhp" DT80> Loaded job "SONHP" E90 1.0 -1357.0 439.0 255.0 255.0 44.0 47.0 2.0 -2811.0 E90 5.0 8643.0 -124.0 255.0 255.0 34.0 34.0 6.0 -4433.0 ```` When it should parse like this: ```` 2008 10 07 17 27 58 0 0 -1 255 255 0 ```` My solution was to H and then G the job, and the parsing will go to normal. I gave the customer the procedure, i.e: on site plug the DT80 to a laptop, plug the serial input, runjob, and h and g to avoid first parsing error. But the end user has a problem, they want to run job on DT80 in the office first (not on site) and then let UNSKILLED OPERATORS bring the DT80 on site and let the UNSKILLED OPERATOR without any laptop to just plug in the serial input into the DT80. After data collection, the unskilled operator will just bring the whole DT80 back from site to office for data retrieval. Thus since the unskilled operator doesn't have an laptop to H G the job after the first few parsing, the DT80 cannot parse properly. Is there any way around this? Thanks!

Good afternoon Orange,

What does the output of the serial diagnostics tell you is happening? (P56=1) Have you tried clearing the serial buffers at the start to ensure there is no data in the buffer at the start?

How do you are you making sure the longest string is the first input the DT80 sees? Each line will have a CR/LF combination at the end of it so it will be very easy for the parsing to fail.

Looking at the returned data above the parsing has started on the second line (It starts with 1) and has failed because there is less in the string than the line is expecting to parse.

Is there a way to poll the device for data rather the receive unsolicited data? Then you will always know where the string starts.

Cheers,
Roger

Good afternoon Orange, What does the output of the serial diagnostics tell you is happening? (P56=1) Have you tried clearing the serial buffers at the start to ensure there is no data in the buffer at the start? How do you are you making sure the longest string is the first input the DT80 sees? Each line will have a CR/LF combination at the end of it so it will be very easy for the parsing to fail. Looking at the returned data above the parsing has started on the second line (It starts with 1) and has failed because there is less in the string than the line is expecting to parse. Is there a way to poll the device for data rather the receive unsolicited data? Then you will always know where the string starts. Cheers, Roger

Thanks! I put in \e and everything is ok.

BEGIN"sonHP6"
/n/c/u
RA2SERIAL"\\013\\010"
2SERIAL("\\e{\\013\\010}%d[1CV]%d[2CV]%d[3CV]%d[4CV]%d[5CV]%d[6CV]%d[7CV]%d[8CV]%d[9CV]%d[10CV]%d[11CV]%d[12CV]%d[13CV]%d[14CV]%d[15CV]",w)
2SERIAL("%d[16CV]%d[17CV]%d[18CV]%d[19CV]%d[20CV]%d[21CV]%d[22CV]%d[23CV]%d[24CV]%d[25CV]%d[26CV]%d[27CV]%d[28CV]%d[29CV]%d[30CV]%d[31CV]",w)
2SERIAL("\\013%d[32CV]%d[33CV]%d[34CV]%d[35CV]%d[36CV]%d[37CV]%d[38CV]",w)
2SERIAL("\\013%d[39CV]%d[40CV]%d[41CV]%d[42CV]%d[43CV]%d[44CV]%d[45CV]",w)
2SERIAL("\\013%d[46CV]%d[47CV]%d[48CV]%d[49CV]%d[50CV]%d[51CV]%d[52CV]",w)
2SERIAL("\\013%d[53CV]%d[54CV]%d[55CV]%d[56CV]%d[57CV]%d[58CV]%d[59CV]",w)
2SERIAL("\\013%d[60CV]%d[61CV]%d[62CV]%d[63CV]%d[64CV]%d[65CV]%d[66CV]",w)
2SERIAL("\\013%d[67CV]%d[68CV]%d[69CV]%d[70CV]%d[71CV]%d[72CV]%d[73CV]",w)
2SERIAL("\\013%d[74CV]%d[75CV]%d[76CV]%d[77CV]%d[78CV]%d[79CV]%d[80CV]",w)
2SERIAL("\\013%d[81CV]%d[82CV]%d[83CV]%d[84CV]%d[85CV]%d[86CV]%d[87CV]",w)
2SERIAL("\\013%d[88CV]%d[89CV]%d[90CV]%d[91CV]%d[92CV]%d[93CV]%d[94CV]",w)
2SERIAL("\\013%d[95CV]%d[96CV]%d[97CV]%d[98CV]%d[99CV]%d[100CV]%d[101CV]",w)
1..101CV 
LOGONA 
END
Thanks! I put in \\e and everything is ok. ```` BEGIN"sonHP6" /n/c/u RA2SERIAL"\\013\\010" 2SERIAL("\\e{\\013\\010}%d[1CV]%d[2CV]%d[3CV]%d[4CV]%d[5CV]%d[6CV]%d[7CV]%d[8CV]%d[9CV]%d[10CV]%d[11CV]%d[12CV]%d[13CV]%d[14CV]%d[15CV]",w) 2SERIAL("%d[16CV]%d[17CV]%d[18CV]%d[19CV]%d[20CV]%d[21CV]%d[22CV]%d[23CV]%d[24CV]%d[25CV]%d[26CV]%d[27CV]%d[28CV]%d[29CV]%d[30CV]%d[31CV]",w) 2SERIAL("\\013%d[32CV]%d[33CV]%d[34CV]%d[35CV]%d[36CV]%d[37CV]%d[38CV]",w) 2SERIAL("\\013%d[39CV]%d[40CV]%d[41CV]%d[42CV]%d[43CV]%d[44CV]%d[45CV]",w) 2SERIAL("\\013%d[46CV]%d[47CV]%d[48CV]%d[49CV]%d[50CV]%d[51CV]%d[52CV]",w) 2SERIAL("\\013%d[53CV]%d[54CV]%d[55CV]%d[56CV]%d[57CV]%d[58CV]%d[59CV]",w) 2SERIAL("\\013%d[60CV]%d[61CV]%d[62CV]%d[63CV]%d[64CV]%d[65CV]%d[66CV]",w) 2SERIAL("\\013%d[67CV]%d[68CV]%d[69CV]%d[70CV]%d[71CV]%d[72CV]%d[73CV]",w) 2SERIAL("\\013%d[74CV]%d[75CV]%d[76CV]%d[77CV]%d[78CV]%d[79CV]%d[80CV]",w) 2SERIAL("\\013%d[81CV]%d[82CV]%d[83CV]%d[84CV]%d[85CV]%d[86CV]%d[87CV]",w) 2SERIAL("\\013%d[88CV]%d[89CV]%d[90CV]%d[91CV]%d[92CV]%d[93CV]%d[94CV]",w) 2SERIAL("\\013%d[95CV]%d[96CV]%d[97CV]%d[98CV]%d[99CV]%d[100CV]%d[101CV]",w) 1..101CV LOGONA END ````
18
2
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft