I want to receive data through RS232 in measuring instrument. Generating output appears like this " ST,GS,0E, 0.0 kg" Will no there be method that can receive?
If the string is fixed format, ST,GS,0E, 0.0 kg, then you can do this:
"ST,GS,0E," a\r This assumes that there is a <CR> character at the end of the line.
Or, you can skip characters
9x a \r
If there is no <CR> character, try counting the numbers
9x 8a 3x (you must account for all of the characters on the line)
If only the first characters are fixed, then you can try a combination of the above
"ST," 6x 8a (this will anchor to the start of the line, and count) or "ST," 6x a\r (this will anchor to the start of the line, skip 6, and then look for a number in the remaining characters
I hope that one of these will help. The important thing is to be able to anchor to the start of the line. If you simply count, using x to skip and a to interpret as a number, then you must account for all characters on the line.
Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.