Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I fix time out errors for serial VISA communication?

I am trying to communicate with a PI motor controller board using serial VISA communication. When logged on as an administrator on Win NT I can't access COM1 using LabVIEW, MAX, or hyperterminal. When I log on as a user I get time out errors. I have tried port breaks and wait frames but nothing has helped. Whenever I use the VISA STB vi I get the error BFFF003A, but I can't figure out what settings are causing the invalid setup. Hyperterminal has shown that the COM port works and the port and card are set to the same baud rate. Is there anything that I am missing or that I can do to fix this problem.

Don Sexauer
0 Kudos
Message 1 of 3
(4,037 Views)
From bsukpraphrute@yahoo.com

Parts of your problems are you using NT.

Time out can occur when there is nothing to read. It is normal and you try to get the data. But you question is quite board. When the time out does occur?

IF you try to read, but there is no data on the bus. You must recognize the error and try to read the data again. Or when you init the RS-232, just set the time out to a large number.

I hope you find this useful.

GoodLuck.
0 Kudos
Message 2 of 3
(4,037 Views)
Don:

Other replies have focused on the timeout issue. I would like to address the invalid setup error.

Specifically, viReadSTB is not valid for all serial devices. Sine this sends the ASCII query "*STB?\n" to the device, you must first inform VISA that it is valid to do so. If your device accepts this command, you must first set the property I/O Protocol to the value 4 (488.2 strings). Then VISA will send this query because you have explicitly set it up as a 488.2 capable device. Otherwise (the default case) VISA will not send this string but will just report the error you described.

I hope this description helps.

Dan Mondrik
Senior Software Engineer, NI-VISA
National Instruments
0 Kudos
Message 3 of 3
(4,037 Views)