Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Using serial port with agilent 34401 instrument driver

I was using the Agilent 34401A instrument driver 1.0.0. in LabView 4 with the GPIB interface and my program was working. Then I changed to the serial port interface COM2, changing the instrument address to "ASRL2" and the multimeter configuration from "HPIB" to " RS232", and now it doesn't work! Could you please tell me what else must I change?
0 Kudos
Message 1 of 2
(3,662 Views)
There are some obvious things, like ensuring that your baud rate, parity and hardware flow control are set up correctly. In LV 4, you use a VISA Property Node to set these.

Another common difference in programming between GPIB and Serial has to do with termination characters. GPIB automatically (usually) sets an "EOI" (end of information) bit when you send a command or read a response. Serial doesn't have this.

Instead, the 34401A terminates commands and responses with an end-of-line character.

The hard way to fix this is to visit every place you write and append a "\n" to your command string. And on every read, read until you hit "\n".

The easier way is to enable the termination character with the VISA property node. You'd do this once in
your Initialize VI, at the same time you're setting baud rate, parity, etc.

I hope this helps.

Brian
Message 2 of 2
(3,662 Views)