Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Timeout error (Hex 0xBFFF0015) in NI VISA test panel when attempting to read from device

Solved!
Go to solution

Hello,

 

I am attempting to control the set position of three daisy chained four-way actuator valves. They are VICI Valco and model # EUHA. I have them connected via RS-232 to USB into my computer. I was able to communicate with them when I sent some simple commands through hyperterminal and when I open MAX the devices appear and the panel says the devices are functioning properly. However, when I go into the test panel and try to run some default commands, I get the timeout error, 0xBFFF0015, when reading the command. Thank you for any help you can provide.

0 Kudos
Message 1 of 10
(7,331 Views)
What MAX tells you is that the com port itself is working and does nothing about the functionality of the instruments.

Hyperterminal appends a carriage return/line feed with each command. In MAX, you do this by using \r\n. Check your manual to see what exactly you should use.
Message 2 of 10
(7,289 Views)

Thank you! I appended \r\n and my directives written to the device are working, but I am still receiving timeout errors when I try to read back from the device.

0 Kudos
Message 3 of 10
(7,271 Views)
Do you get an answer back when you issue the same command in Hyperterminal? Without knowing the instrument, seeing the manual, and not knowing what command you send, it's pretty hard to provide a solution.
0 Kudos
Message 4 of 10
(7,263 Views)

Okay I'm running it again today and I'm noticing that its displaying results when I attempt to read from the valve but still tells me it timed out. Aside from the timeout error, both hyperterminal and visa are providing comparable results. The two commands I have been trying to read from the valves are AM (to check what mode the actuator is set to) and CP (to check what position the valve is at).

0 Kudos
Message 5 of 10
(7,242 Views)
When you get results but still get a timeout, that indicates that it is not receiving the termination character. With the configure function, have you enabled the term character and what have you set the character to be?
0 Kudos
Message 6 of 10
(7,240 Views)

Those results are coming from the test panel so I don't have that function in place for that. As far as running it in labview goes, I have the serial configured to recognize the termination character, \r, which worked when writing to the valves in the test panel. When I run this segment of code, I don't encounter any errors, but I also don't get any response from the valves.

0 Kudos
Message 7 of 10
(7,227 Views)
Solution
Accepted by endlessOranges
For your LabVIEW code, did you right click on the string control/constant and select '\' Codes Display?
Message 8 of 10
(7,212 Views)

Thank you so much! I changed my strings to that and it's running perfectly now. Was it not reading my termination characters at all before I changed to that?

0 Kudos
Message 9 of 10
(7,183 Views)
Before you changed it, you were sending the separate ascii characters - i.e. a '\' and an 'r'. These were two separate bytes and not the single control character.
0 Kudos
Message 10 of 10
(7,176 Views)