Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Get the current and voltage from HP Power Supply (HP E3631A), using the GPIB interface.

my USB device's power support is from the DC Power Supply ( HP E3631A)
I need to read using current from a DC Power Supply ( HP E3631A),via GPIB interface.
When I use the follow command.Why can't read the current value.My environment is in vc++ 6.0.

"APPL P6V,5.0,1.0"
"OUTP ON"
"MEAS:CURR? P6V"

attached the NI SPY File.Please check it.
Can you tell me what the problem is ??
Thanks in Advance !
Hope you can solve my problem !!!"
0 Kudos
Message 1 of 2
(3,465 Views)
Hi neilchuang,

A read timeout error is usually caused by an error on the command string sent.

The first thing I would check is if the instrument requires a termination character at the end of each message (such as linefeed). I noticed in the Spy capture that the commands do not have a termination character attached. This means that the instruments never recognized that you completed the query command, it doesn't execute the requested action and as a consequence of that it doesn't have any data to return.

One question: Is the instrument detected by MAX when you scan for instruments?. If yes then you can assume that the GPIB software and hardware are properly installed. The scan for instruments sends the *IDN? (terminated by a linefeed). You can right-cli
ck on the instrument entry in MAX and select "Communicate with instrument". Notice that at the end of the command the linefeed is included (\n).

Double check with the instrument manual if the commands sent are the right ones.

Finally, there is an instrument driver available in the idnet library: www.ni.com/idnet. Search for 3631. Since you are working in C you can use the LabWindows/CVI Plug and Play driver. Even if you decide not to use the instrument driver, you can still use it as an excellent reference on how to program with the instrument.

Hope this helps!.

DiegoF
National Instruments

Message Edited by Molly K on 02-18-2005 11:05 PM

0 Kudos
Message 2 of 2
(3,468 Views)