07-17-2014 12:55 PM
I have a program to read a string of data from a 2B Technologies Ozone Monitor Model 202. The program does not come up with an error message but every 30 to 40 hours Labview will rotate my data line. For example if a normal data line is 34.5, 37.5, 812.0, 934.0, 11/07/14, 11:52:38 and is coma delaminated, then the problem is the ozone reading (first number) will read zero, then the seconds reading off the time will move into the ozone spot in the data file and the line will rotate from there. I have tried changing the bytes being read to the Labview program and multiple ways of flushing the buffer but the problem is still there. I attached an example data file in which the problem took place and a screen shot of my labview program. I am a fairly new labview user so descriptive help would be appreciated very much. Thank you!
Solved! Go to Solution.
07-17-2014 01:27 PM
When using a termination character, do not use Bytes at Port. Just wire a constant to Byte Count which is larger than the largest possible message.
Lynn
07-17-2014 01:57 PM
When I delete the Bytes at Port and input a high enough constant I get the error -107380733 VISA Read. The program still runs and collects data though.
07-17-2014 02:28 PM
What does Explain Error say about that? When I look it up, I get undefined error. Did you possibly transpose a digit when posting?
Read may return a Warning (not an error) because the termination and the byte count do not match. I do not have hardware to test right now so am not sure of the warning number. The warning is expected and can be ignored. When that warning occurs, Explain Error will say something like more bytes may be available...
If it is returning reasonable data, I suspect that you have a warning and not an error. I would expect VISA REad to return and empty string in read buffer if an error occurred. In the error out cluster an error has occurred if the status boolean is True. A warning has occurred if status is False AND error code <> 0.
Lynn
07-17-2014 02:45 PM
The warning it seems Lynn is remembering is the "Number of Requested bytes was returned. More data may be available". That warning is common when using the Byte At Port. Try setting the number of bytes to read a lot higher and see what happens (since you are using the termination character).
07-17-2014 04:01 PM
That was my mistake; I missed the last digit of the error when I was typing. The explain error box said Error -1073807339 occurred, Possible Reasons: VISA: (Hex 0xBFFF0015) Timeout expired before operation completed. However, my program is collecting good data and the problem seems to have gone away. Thank you so much for your help!
LDurett