AnsweredAssumed Answered

DONE command

Question asked by capngene on Mar 30, 2011
I'm collecting data and numbering it sequentially. The SA sends data too fast for the computer to read all the data, so I use the DONE function to force the sequential number to be read before the data is read. It almost works. I get about 2 to 5 extra "1" values in a reading of 40 data points. Is there a way to reset the DONE value back to 0 so I can use it twice successfully in the command string?

VARDEF C_OUNT, 1; VARDEF  E_NDCT, 40;ST 20MS;REPEAT;TS;C_OUNT?;;ADD C_OUNT, C_OUNT, 1;done; ts;VARDEF  M_ONE,MKA;;M_ONE?;done; UNTIL C_OUNT, EQ,  E_NDCT;


Here is the response for 40 data points(12 thru 37 deleted for brevity). I don't know where the extra "1"s comes from. Sometimes it it is the first character, sometimes it isn't. Also, at the 38th data point (4th from the end in the  list) there is an extra "1". This occurs randomly and sometimes 4 or 5 times in in a sampling of 40. This would cause the ultimate app to fail. I think that if I could reset the DONE to 0 after I call it, the routine would work correctly.
This is a test sampling of data. In the real app, I'll be sampling 1500 data points. Should I be writing to an array in the SA and then download the array?
Any help will be greatly appreciated.

SAMPLED DATA RESPONSE:
1
1
-2.69E+01
2
-2.69E+01
3
-2.68E+01
4
-2.69E+01
5
-2.69E+01
6
-2.69E+01
7
-2.69E+01
8
-2.69E+01
9
-2.69E+01
1.00E+01
-2.69E+01
1.10E+01
-2.69E+01
Data deleted from 11 to 38.
The "1" after 3.8E+01 doesn't belong there.

3.80E+01
1
-2.69E+01
3.90E+01
-2.69E+01  

Outcomes