Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview 6 MAC

I'm a user of Labview 6.0 MAC. I wrote a program to drive Agilent 34420A, and obtained incorrect string "+;/???;2>;;77777778" instead of numbers. Who knows how to solve the problem? The program is attached. Thanks.

John12345
0 Kudos
Message 1 of 21
(5,564 Views)

Hi John,

 

Can you please post the programming manual? Also, I looked at your VI and was wondering if you can tell me what are you expecting to see in response to the commands you are sending.


Thank you,

Simran K
National Instruments
Applications Engineer
0 Kudos
Message 2 of 21
(5,540 Views)

I don't have the instrument so I can't run your code. Some of the commands are a bit different than what is in the driver but I don't know if that is your problem. I can post the Read VI that is in the driver. Try that. And always try everything in MAX before trying to write any code. And think about upgrading.Smiley Wink

 

p.s. Why are you using the GPIB functions and not VISA. Even when LabVIEW was current, the recomended api was VISA.

0 Kudos
Message 3 of 21
(5,532 Views)
Hi Simran,
The program is a simple driver of Agilent 34420A and try to measure voltage. The expected output is either "+/-0.0000112" or "+/-1.12E-5" (in unit mV).
0 Kudos
Message 4 of 21
(5,517 Views)
Hi Dennis,
Thank you very much for your suggestion. I tried to use VISA, however, error out show an error status "-1073807202". Do you have any idea on this? Thanks.

0 Kudos
Message 5 of 21
(5,515 Views)

You get that error when you don't have NI-VISA installed.

 

I don't think using VISA will help your problem though. That would seem to be a configuration problem (i.e. with the instrument). As I mentioned, before you start writing any LabVIEW code, you should be issuing all of the commands in MAX and doing the debug there. Start with a simple query such as *IDN?. Then after you have sent a couple of commands, do an ERR? query to see if the instrument complains about any of the commands you have sent. Double check the manual to see if there is a command that needs to be sent to format the data returned (i.e. as text or binary).

0 Kudos
Message 6 of 21
(5,507 Views)
Hi Dennis,
Thank you.
I don't know how to use MAX, would you please give me the instructions in details? Thanks.
0 Kudos
Message 7 of 21
(5,495 Views)
When you start MAX, on the left side you should see something called Devices and Interfaces. You can expand that and see the GPIB board listed. You can right click on it and select Scan for Instruments. This is actually something that should have been done after the installation of the GPIB board and driver. Once your instrument is detected, you can right click on that and select communicate with instrument (or something to that effect). You will get a popup that has three tabs if I remember correctly. One is query, one is write, and one is read. Use the query for any instrument command that you expect a response. I believe the default command there is *IDN?. The command also has a \r\n for sending a CR\LF. Your instrument does not need this. It would only be required for old GPIB instruments.
0 Kudos
Message 8 of 21
(5,492 Views)
Dennis,
I'm sorry that I cannot find MAX in my system.
By the way, in my instrument library (Labview 6, MAC), there is a HP34401a, but without 34420A. Does that affect the results? Thanks.
0 Kudos
Message 9 of 21
(5,484 Views)

MAX is short for Measurement and Automation Explorer. I was also assuming that this program existed for the Mac. If you don't have it, I'm not sure what else you could use in it's place.

 

The driver on the palette does not affect anything at all.

0 Kudos
Message 10 of 21
(5,478 Views)