LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

agilent 34970a and Labview 8.2.1

Good morning,
 
I am having problems getting Labview 8.2.1 to communicate with my 34970a.  It works fine using Labview 7.1  Has anyone tried using the latest Labview with the 34970a?
 
Thanks
 
Everett
0 Kudos
Message 1 of 15
(5,494 Views)

Follow up

I am trying to use com 1 or 2.  I have a usb to serial adapter mapped to com 3.  If I use the library vi to initialize it (34970a) does not give an error however if I try to config any channels the 34970a give an error but returns readings.  Errors vary from -138, or -113

 

Thanks

Everett

0 Kudos
Message 2 of 15
(5,481 Views)
Are you using your own drivers, or drivers you downloaded from someplace (such as NI)?
0 Kudos
Message 3 of 15
(5,473 Views)
Thank you for your reply,
I am using Agilents Labview drivers.  When using the usb to rs232 adapter on com 3, if I don't configure any channels, and only initialize I don't get an error.  If I configure any channels I get an error although the data is read.  Just using com 1 or 2 yields nothing.
 
All of the drivers that shipped with Labview 8.2.1 are also installed.
 
Thanks
 
Everett
0 Kudos
Message 4 of 15
(5,467 Views)

There are two different drivers sets for the 34970, but they're not from Agilent. They're available from the NI Instrument Driver Network. Since you said you had it working under 7.1 you're probably using the older "hp34970" drivers. The error codes you indicated are -138, which is "Suffix not allowed", and -113, which is "Undefined header". Both of these basically mean a syntax error, which is likely incorrect code with the drivers. There are numerous configuration VIs. Which one are you using, and how are you calling it? Can you use the updated project-style drivers available from the link I posted?

I'm not quite sure I understand what you're saying with the COM ports. You said you get nothing when using COM1 or COM2. How many devices do you have connected to your COM ports? What communication parameters (baud rate) are you setting?

It would probably be worthwhile to see what happens if you try to talk to instrument via MAX to see if this is a communication problem or a LabVIEW problem. With the LabVIEW drivers you can see what command is being sent out to the instrument by simply putting a probe on the string that's being fed to the VISA Write. Then, you can enter the same command in MAX (as well as confirming the command from the user manual) to see what happens.

0 Kudos
Message 5 of 15
(5,428 Views)
Thanks for the reply.  I will try the other drivers when I get to work tomorrow.  I use the voltage and temperature vi's primarily.  I will be using the relay card in the 3rd slot. 
 
When I referred to com 1 or 2 I was trying to communicate with the same Agilent.  I had the baud rates etc set the same 9600 8n1 and xon/xoff.   I put a usb to rs232 converter assigned to com 3 which gave the various error codes when I connected the Agilent to it.
 
I suspect the updated drivers will fix the comm problem. 
 
Thanks again,
 
Everett
0 Kudos
Message 6 of 15
(5,402 Views)

Hello again,

Came into work to download project drivers and install on the computer with Labview 8.2.1.  I put the downloaded folder in the inst.lib folder.  It doesn't unzip well for some reason.  It asks for close.vi etc which are in the public folder that downloaded with it. However it won't let me point to it.  Should I have not put it in the inst.lib folder?

Thanks

Everett

0 Kudos
Message 7 of 15
(5,392 Views)

Additional update.  I extracted the files with winzip and the inst.lib folder looks normal.  The NI-VISA version is 4.1, I still get a -138 error when communicating on com 3. 

0 Kudos
Message 8 of 15
(5,382 Views)
OK, let's backtrack a second here. You had the original code you were using in 7.1, and whenever you talked to the 34970 via COM3 using the USB to RS232 converter you got error code -110 or -138. When you used COM1 or COM2 you said you got nothing. Does this mean no error, or no data? You then downloaded the updated drivers from NI, and installed them, but it's not clear based on your last message whether you believe you got a correct installation or not. You then tried to talk to the instrument over COM3 and got error code -138. What about COM1 or COM2? What VIs are you using, and what are the inputs? Can you post your code? Did you try MAX?
0 Kudos
Message 9 of 15
(5,344 Views)
I think we should take an even further step back. What are the functions you are calling when you get the error? What are the settings for those functions when the error occurs. I have a 34970 connected to com3 and a 34901 in slot 1. I can run the EZ Voltage and the Switch functions from the latest 8.x driver and I don't get any errors.
0 Kudos
Message 10 of 15
(5,333 Views)