LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB instruments connected through Agilent USB/GPIB Interface can bee seen in MAX but can't communicate in labview

I have an Agilent 82357B USB/GPIB Interface connected to my computer.  Attached to that, I have two lock-in amplifiers (an SR830, and an SR 850).  I would like to be able to communicate with them through GPIB.

I have downloaded and installed the software for the Agilent device (Agilent IO Control), and I can see the interface and the two devices in that software.  Here's what is configured in this software, that I can see:
  • The VISA interface ID is GPIB0, and its address is 0
  • The VISA addresses of the devices are GPIB0::4::INSTR and GPIB::12::INSTR, and the GPIB addresses are 4 and 12

In Measerment and Automation Explorer (MAX), I made sure that the Passport for Tulip box was checked.  Once it was, I could see the devices in the Configuration window under Devices and Interfaces -> Miscellaneous VISA Resources.  There, I see GPIB0::INTFC, GPIB0::4::INSTR and GPIB::12::INSTR.

I can right click on either of the instruments, and "Open VISA Test Panel" where I am successfully able to send commands and read from both devices.

HOWEVER, when I am running an actual LabView program, I am unable to communicate with the devices. 

For example, when I try to communicate to the devices through VISA, using the 'Basic Serial Write and Read.vi' (while VISA Resource Name is GPIB0::12::INSTR), I get an error:
Error -1073807331 occurred at Property Node (arg 2) in VISA Configure Serial Port (Instr).vi->Basic Serial Write and Read.vi

Possible reason(s):
VISA:  (Hex 0xBFFF001D) The specified attribute is not defined or supported by the referenced resource.

When trying to communicate with them through GPIB (which is what I want to do in the end), using 'GPIB.vi' I also get an error.  Here, GPIB address is 12, and I am just trying to give it the command *IDN?
GPIB Write returned error code:

EDVR: Error connecting to driver or device



What's going on?
0 Kudos
Message 1 of 5
(4,264 Views)
Why would you use a serial VI to communicate with a GPIB instrument? It should be obvious that you cannot configure com settings such as baud rate. You also can't use the low level GPIB functions with an Agilent controller. The low level functions only work for NI boards. Stick with VISA. If you want an example, use the one called GPIB-VISA .
0 Kudos
Message 2 of 5
(4,260 Views)
I figured that since I could send commands through the VISA Test Panel, that I could use VISA Read and Write in Labview.

I never wanted to communicate with it through serial to begin with.  I have instrument drivers already written for the devices (http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=E3B19B3E93F3659CE034080020E74861) that use 'GPIB Write' and 'GPIB Read'.   But these always give Error 0 (EDVR).    I want to just be able to use these drivers.  Is this possible?






Message Edited by ManifestMind on 07-18-2008 03:57 PM
0 Kudos
Message 3 of 5
(4,240 Views)
Also, I don't know what you mean by "GPIB-VISA"
0 Kudos
Message 4 of 5
(4,237 Views)
You can use VISA Write and VISA Read. You just can't use the example called Basic Serial Write and Read because that is specifically for the RS-232 port. The GPIB-VISA is one of the shipping examples. Start the example finder and go to the search tab. Search for VISA.
 
Again, no you cannot use the GPIB functions with a non-NI controller. The low level functions for an NI board and an Agilent one are completely different. You can rewrite the driver to use VISA or you can rewrite it to use the low level functions that Agilent provides. You use the Call Library Function Node, I believe to access their GPIB driver.
 
I hate to say it but the $20 difference between the Agilent and the NI controller does not seem like much of a saving.
 
 
0 Kudos
Message 5 of 5
(4,220 Views)