Instrument Control (GPIB, Serial, VISA, IVI)

Showing results for 
Search instead for 
Did you mean: 

GPIB initialization & MEAS command problems

GPIB initialization & MEAS command problems

(1) I saw a similar posting before, but no solution. Perhaps I can explain better what is happening. I'm running Windows 2000, opening LabVIEW 6.0.2 and trying to do simple GPIB communication with an Agilent E4419B EPM Series Power Meter--GPIB Clear, Initialization, Write (a simple command, i.e., *IDN?), then Read. I get error number 3 (out of zone, or GPIB not addressed correctly) at the GPIB Write. Then I open MAX, find my instrument under "Devices & Interfaces" and right click on it to choose "Communicate with Instrument". The NI-488.2 Communicator comes up where I can type in a string and query, write, or read. Here, I can either actually send a command (i.e., *IDN?), or just click exit--it doesn't really matte
r if I actually use the NI-488.2 Communicator or not. All that matters is that I open it up and exit. After exiting that, I can then go back to LabVIEW, run the exact same VI that caused error 3 before, and execute it without any errors or warnings. What is MAX doing that I'm not? From then on, LabVIEW communicates fine. I can even power off the instrument and turn it back on--communication is still fine. However, once I exit completely out of LabVIEW, I have the same problem all over again. Help!

(2) Sending the MEAS? command works (of course, after I open up MAX first--see above problem) in LabVIEW, but takes what I think is unusually long. The VI is not in a loop, and only does those things described above (GPIB Clear, Initialization, Write, Read).. it's very simple. But the MEAS? command takes approximately 5 seconds to produce a result. Is this normal??
0 Kudos
Message 1 of 2

Re: GPIB initialization & MEAS command problems

1) You probably have LabVIEW 6.0.2 or earlier installed and this behavior is probably caused by installing NI-488.2 twice. Most likely your LabVIEW VIs are not linked properly, and require another app like MAX to load the dll before they can access it. Try this:

*Uninstall your GPIB card from Device Manager
*Uninstall All NI Software from Add/Remove Programs
*Open Windows Explorer and go to c:\program files, if there is a National instruments folder delete it and all of it's contents
*Reboot and cancel out of the "Found New Hardware Popup"
*Install LabVIEW, do a custom install and click on Drivers folder and select "This feature will not be installed."
*Install the latest NI-488.2 software for you GPIB card type and operating system

2) Your instrument probably requires a termination character you are not sending. Check the instruments manual. To send a termination character in LabVIEW, you can either set the appropriate termination mode on the GPIB write VI, or you can manually add a character by right clicking on the string, selecting "\ codes display", and appending the \ code to the end of the string (ie "\n" or "\r").
0 Kudos
Message 2 of 2