Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Control DC power supply via RS232 interface labview

Hi guys, I am a new user of labview and I really need your help.

I connected my Agilent E3631A Power Supply to my PC using the serial rs232 port, but I have some problems:

1) Using the "NI drivers finders" I downloaded the correct driver, but when I "scan for instruments", it gives me "No connected instrument detected" (See Image1)

2) I clicked on the driver file and I opened the example file that should let to command power supply voltage, but it gave me an error "Time expired before operation completed" (See Image2)

3) I am almost sure that the rs232 port works. I tested it on MAX and I set power supply with the same values of "Baund rate, Parity ..."(See Image3).

Furthermore I tried to connect another instrument using RS232 port and labview recognise it.

 

Any suggestions?

Thank you a lot for your advises

 

Download All
0 Kudos
Message 1 of 10
(4,344 Views)

1. I think that scan only works for GPIB.  There are too many parameters to do it in a reasonable time using RS-232.

 

2. Make sure the instrument has its language set to SCPI.  Older Agilent supplies will use multiple languages.

 

3. You just connected to the port itself, not the instrument.  At the top is a Open Test Panel.  Try talking to the instrument using that.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 10
(4,340 Views)

Hii thank you so much for your reply.

I tried to connect a mutimeter via RS232 and Labview scanned it.. so I don't know.

Yeah I set Agilent E3631A to RS 232 input/output configuration (See Images Attached)

I opened Visa Test Panel... I am not an expert of this, I attached you some images.. Could you tell me, watching images attached, if all is okay in communication with port?

 

Thank you

0 Kudos
Message 3 of 10
(4,328 Views)

Can you set this up in the NI-Max window and run the "Communicate with Instrument".  If it set to SCPI for language, try sending:

*IDN?\n

The instrument should respond with either:

 

Hewlett Packard...

or

Agilent...

 

If this is an older instrument and the previous command did not work, try sending:

ID?\n

and see if you get a response.

 

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 4 of 10
(4,300 Views)

Hiii, I am not expert of Labview or Max, I tell you what I did.

I opened Max, I clicked on "Serial & Parallel" and clicked on the serial port COM1 (which should be my port RS232).

Then I clicked on "Open VISA TEST Panel" and in the submask "wWrite", I send the command "*IDN?\n", clicking on "Execute". (See Image attached)

Did I what you said me to do? Is it correct?

0 Kudos
Message 5 of 10
(4,293 Views)

You also need to go to viRead and perform a read in order to see what the instrument responds with.

 

You are using a really old version of MAX.  It is a lot simpler in a newer version.  But I recommend using Putty to create a serial terminal and try your commands there.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 10
(4,288 Views)

Thank you so much

I go to iRead and clicked on "Execute". (See Image attached)

What is the meaning of that message? Is Labview not able to see the instrument?

If I'll be able to let Labview to see and command Agilent, I try to use Putty.

 

 

0 Kudos
Message 7 of 10
(4,283 Views)

Please attach image.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 8 of 10
(4,277 Views)

Sorry I forgot it

0 Kudos
Message 9 of 10
(4,273 Views)

Please Read and Verify that your instrument is connected and communicating as shown in Section 2 of the attached document.  Your issues may be arising from the lack of handshaking protocols.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 10 of 10
(4,268 Views)