06-19-2006 10:31 AM
06-20-2006 08:40 AM
Hi Nostra,
Here is an explanation of the error message:
Warning -1073807339 occurred at an unidentified location
Possible reason(s):
VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.
The vi you attached does not contain the serial.vi which is where the error originates. Can you attach it? Or is it the one from earlier versions (ie: LV6.x)? Because it appears that it does not wait long enough to receive data. Maybe it should write, wait, then receive..
Try increasing the timeout value (I think it is the 50 that is in your vi).
JLV
06-20-2006 11:12 AM
06-20-2006 11:18 AM
06-20-2006 11:56 AM
06-21-2006 11:47 AM
06-21-2006 12:40 PM
First, putting those msec waits in the code they way you've done may or may not work. LabVIEW is a dataflow language. When you have no dataflow, you have no control over execution order. The wait in the write case may happen before the VISA Read happens and the wait in the read case may happen after the VISA Read. You can use a sequence structure (shudder) or use a wait that has error in/error out connections so that you can enforce dataflow. There is the Delay function on the Time & Dialog palette or NI Measurements>Data Acquisition>Counter>Intermediate Counter>Wait+ (ms).
There are a couple of reasons that you will get a VISA timeout. One is if you send the wrong command and there is no data to be read back. Another is if you had the read termination character enabled but the actual termination character sent by the instrument does not match and the number of bytes you requested is too high. In other words, when you enable the termination character, the VISA Read will automatically terminate when the byte count is reached or the termination character is detected. One thing you can do is before doing the VISA Read, put in a wait and then do a VISA Bytes at Serial Port. This will return the actual number of bytes available. You should do this to see whether there is any data at all available. I still think that the problem can be traced to incorrect termination characters on either the read or write. If the VISA Bytes at Serial Port returns zero, then the problem is with the Write termination character.
06-21-2006 01:15 PM
Another approach is to place a while loop with a high timeout (ie: 1 sec) that monitors the serial port for any data available. Then proceed with a read. Or have a while loop that monitors for data and reads until the buffer is empty or until the large timeout occurs.
06-22-2006 03:16 PM
06-22-2006 03:19 PM
new error code 85
description
Scan From String (arg 1) in GAUSSMETER%20VI[1].vi