Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't communicate with a Sorensen XG 40-21 DC power supply via a VISA TCP\IP resource

I am trying to establish a good VISA TCP\IP session with a Sorensen XG power supply.

 

The XG is connected directly to my PC Ethernet card via a crossover cable.  I am certain that I've set up the Ethernet correctly as I am able to communicate with the XG via a web browser (port 80),  telnet (port 9999), hyper terminal (port 10001), and I'm able to ping the XG via a command prompt.

 

I've used NI-MAX to configure a VISA TCP\IP resource (TCPIP0::192.168.1.2::10001::SOCKET).

 

I am able to successfully validate the VISA session via NI-MAX by clicking the "Validate" button.

 

What I'm not able to do is use this VISA session to communicate with the XG supply.  When I open a VISA test panel and attempt to communicate I see the following behavior.

  • The XG does not respond to commands (writes)
  • Communication times out during requests (reads)

 

Questions:

  1. Any ideas why I might be experiencing this issue?
  2. Since port 10001 responds correctly to a hyper terminal session, do I need to configure my VISA socket resource differently to allow communication to this port?
  3. should the VISA TCP\IP resource be using a different port number?

 

Any help it appreciated.

Anson Wooten

 

 

0 Kudos
Message 1 of 12
(8,051 Views)

Anson,

 

Not familar with this instrument but try:

TCPIP0::192.168.1.2::5025::SOCKET - generally SCPI over ethernet is on port 5025

and try:

TCPIP0::192.168.1.2::INSTR - this uses VXI-11 protocol.

 

0 Kudos
Message 2 of 12
(8,039 Views)

Cymrieg,

 

Thanks for the response.  I was unable to establish a VISA session using port 5025.  Also, I am unable to create the TCP\IP resource using TCPIP0::192.168.1.2::INSTR.  I'm assuming this is not a VXI-11 compatible instrument ( I read that VXI-11 is primarily used by agilent).

 

What's interesting is that Port 10001 does respond to VISA (*IDN?) and SCPI commands when I issue these commands with a hyper terminal.  I just cannot duplicate this with a VISA session.

 

Could I be missing a driver installation perhaps? 

Does this VISA session need a VISA compatible instrument driver to work properly?

 

Thanks,

Anson

0 Kudos
Message 3 of 12
(8,030 Views)

Hi,

 

What version of NI-VISA are you using?  Also, do you have another instrument that you can try to communicate with so that we can determine if your instrument is the problem?

 

Thanks,

 

Todd V.

National Instruments
Applications Engineer
NI Prototyping Community
0 Kudos
Message 4 of 12
(8,016 Views)

All,

 

Thanks for your responses.  I have resolved the issue.

 

It turns out that I was having a serial protocol problem.  Port 10001 of the instrument requires a carriage return ('\r') to process the commands (I believe a carriage return is automatically appended in hyper terminal).  I was supplying a line feed ('\n') but not a carriage return.  The addition of '\r' to my commands resolved the problems and communication is successful.

 

One follow up question:

Is there any way to configure my VISA session to automatically append a carriage return to my written data?

 

Thanks,

Anson 

0 Kudos
Message 5 of 12
(8,007 Views)
You can have VISA automatically append any single termination character. Look at the shipping example called Advanced Serial Write and Read. It uses a VISA property node to set the ASRL End Out, Send End Enable, and Term Char properties.
0 Kudos
Message 6 of 12
(8,001 Views)

Hi A Wooten,

 can i have your sample prog.

 cause i also try to communicate shibasoku instrument via TCP\IP.

  Smiley Sad

0 Kudos
Message 7 of 12
(7,845 Views)
Why would you want a program for a Sorensen power supply when you have a shibasoku instrument?
0 Kudos
Message 8 of 12
(7,839 Views)

actually i want to know how are you communicate with power supply via tcp\ip.

i want to apply it to my prog..

FYi now i already tried too...but not success yet..

0 Kudos
Message 9 of 12
(7,835 Views)

The commands that you need to send to your supply are going to be completely different than the commands that are sent to the Sorenesen but if you want a template to look at, download any of the power supply drivers at the Instrument Driver Network. Also on that page are links that describe what a driver is and how to write your own.

 

If you are having problems, then what you need to do is provide details (i.e. error numbers, example code, etc) on what is not working. Have you at least created a session in MAX?

0 Kudos
Message 10 of 12
(7,833 Views)