Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

34401 driver works only in debug mode

I have been trying to use my Agilent 34401a with LabView and have been thus far unsuccessfull. I continue to get timeouts when VISA tries to read from the device. However, if I place the problem subVIs in debug mode it works. I am using the default LabView driver that comes with version 8.5 and the VISA version is 4.2. Any help would be appreciated.
Matt Kraus
0 Kudos
Message 1 of 7
(3,447 Views)

Hi Matt,

What SubVI and what driver VIs?

An example of what you are trying to do would help.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 7
(3,417 Views)
At this point, all I am trying to do is use the NI provided vi for taking measurements from the Agilent. I am using "Agilent 34401 Read Multiple Measurements.vi". The subvis that need to be in debug mode are "Control Mode.vi", "Reset.vi", and "Configure Measurement.vi". In debug mode it runs smoothly. In normal mode, LabView cannot communicate with the Agilent. I have found a vi on the forums that manualy configures and reads the Agilent and does not use any of the above vis.

http://forums.ni.com/ni/board/message?board.id=2170&message.id=7363&requireLogin=False

This vi works, however, I do not know why I'm having this problem. I've tried adding a larger VISA timeout but that did not work. Any help you could offer would be appreciated.

Matt Kraus
0 Kudos
Message 3 of 7
(3,409 Views)
Hello Matt,
       Are you communicating with the instrument over serial?  If so, have you changed the serial communication settings?  Is the instrument passing back any errors when you run the error query VI?  What are the specs of your PC?  If you have access to a GPIB card, I recommend giving that a try or just trying it on another system that has LabVIEW.  I will try it on my end with a serial cable and see if the problem is reproducible.

Thanks,

NathanT
0 Kudos
Message 4 of 7
(3,401 Views)
Hello Matt,
       I just tried it with my 34401 over serial and it worked fine.  I have attached the NI Spy file of the sucessful execution of the Read Multiple Example.

Cheers,

NathanT
0 Kudos
Message 5 of 7
(3,374 Views)

Hi Nathan,

Yes, I am communicating over a serial port through a USB to Serial adapter. I regrettably do not have GPIB capabilities. I have changed the serial settings to match that of my agilent. 9600/8 bits/1 stop bit/DTR DSR etc. I have been able to manually communicate with the device using the vi from the link above, but I would like to take advantage of the features of the built in VI. I will try it on another computer. Thanks for your help.

Regards,

Matt Kraus
0 Kudos
Message 6 of 7
(3,367 Views)
Hello Matt,
       Not all USB to Serial adapters are created equal.  I would say that it is the most likely culprit in this issue.  I highly recommend using a PC with a built-in serial port and seeing how that performs.  I was using 9600/7 data bits/1 stop/even parity/ no flow control, just like the default serial settings in the Initialize VI.

Let us know how it goes,

NathanT
0 Kudos
Message 7 of 7
(3,334 Views)