01-24-2020 10:13 AM
I have a gaussmeter that has no built in flow control and I keep getting the error
"VISA: (Hex 0xBFFF0015) Timeout expired before operation completed."
I'm using the example included with labview called "Continuous Write and Read.vi"
My settings look like this. The port is correct (com4) and the command "log status" is a legitimate command according to my instrument's manual. Not sure what I need to do, but it must be something simple.
Solved! Go to Solution.
01-24-2020 10:31 AM
And where is the manual for your instrument? Can't really give any advice without knowing how the instrument communicates (data structure, etc).
01-24-2020 10:53 AM
Thank you for taking a look. http://www.integritydesign.com/images/Integrity/VLF%20Meter%20Operation%20manual.pdf
Here is the manual, it's not great. It says there is flow control but my coworker has talked to them and said that they did not actually implement it. It has an rs232 command set at the end.
01-24-2020 11:19 AM
I was really hoping to see what the data format coming out of the instrument was. But considering it is expecting Hyperterminal, we can make some assumptions.
First of all, the End Read on Termination Character should be turned ON. This will tell the VISA Read to stop reading when the termination character is read. In this case, it is the Line Feed character (\n, 0xA).
Secondly, you need to make sure you are appending an End Of Line character to your commands. I cannot tell if you have that in your command control or if you are adding it in your code (I recommend the later).
I would also send the "display off" command to keep the instrument from just spitting out data while you are trying to configure it. When you are ready for solid measurements, use the "display on" command.
You should also change your Write button to be a "Latch When Released" mechanical action. This way you only send the command once instead of each time the loop iterates.
01-24-2020 12:04 PM - edited 01-24-2020 12:16 PM
Thank you, I feel I'm getting closer. I followed your directions but it seems to give me the
VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.
when it gets to the Visa Read code. I have included an example of what this meter is supposed to spit out.
01-24-2020 12:07 PM
Where does that text file come from?
You might want to try a carriage return, 0x0D or decimal 13 instead of a line feed (0x0A, decimal 10).
It would help if you attached your actual VI. I don't like using the NI examples for Serial port comms, as they tend to lean towards some bad practices for serial communication. I personally like to add the termination character in the string that is actually being written. And if you do that, make sure the string is in \code display when you enter either a \r or \n.
01-24-2020 12:15 PM
Do you know the maximum length of the data being read? What I do when reading from serial is calculate the timeout based on the BAUD rate and the expected data size. I then add a bit extra. This has worked extremely well for me.
01-24-2020 12:29 PM - edited 01-24-2020 12:30 PM
log status is the command I want to send and that is 10 bytes but do I include an 11th byte for the \r character?
01-24-2020 12:34 PM
I am now getting a response but it isn't what I want. I have now included the VI as well.
01-24-2020 12:49 PM
I forgot I had the "End write on termination character" unchecked while I was testing it. Now I'm able to get output.