Author Topic: Rigol DP1308A control over TCP  (Read 9704 times)

0 Members and 1 Guest are viewing this topic.

Offline csak1Topic starter

  • Newbie
  • Posts: 1
Rigol DP1308A control over TCP
« on: April 30, 2013, 08:07:41 pm »
Hello.  I am trying to program a Rigol DP1308A power supply over a TCP socket.  I would like to open a socket in C3 code and write SCPI commands to the power supply from there.  Has anyone done this successfully? 

At the moment, when I open a client socket to (ip address on port 5025) the power supply refuses the connection!  I thought port 5025 was a standard SCPI port.  None of the RIGOL documentation seems to indicate the SCPI port.

Thanks for your help!
Chris
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: Rigol DP1308A control over TCP
« Reply #1 on: April 30, 2013, 09:51:43 pm »
AFAIK port 5025 is not standardised in LXI. It is just a convention typical used if an instrument provides some kind of a direct network connection. And AFAIK an instrument is not required to provide direct network connections.

One requirement is that an instrument comes with an  IVI driver, supposed to hide such connection details from you. However, IVI drivers are only usable on Windows.

Run a port scan on the instrument.

It could also be that the PSU uses VXI-11 communication. For some strange reason parts of VXI-11 made it into LXI. And that means contacting the Sun RPC port mapper on port 111 to get the port for the VXI-11 RPCs. AFAIK LXI only requires that instrument discovery via VXI-11 is supported, and that only one command "*IDN?" needs to be supported via an RPC. But a vendor is allowed to support more.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline signals

  • Contributor
  • Posts: 17
  • Country: us
Re: Rigol DP1308A control over TCP
« Reply #2 on: May 03, 2013, 09:06:19 pm »
I've been through the same thing trying to control a Rigol AWG and Scope from code on a Linux system. There does not seem to be a TCP port that will accept SCPI directly, and the NI VISA drivers are very poor on Linux. So, it was either find a Windows box or find something else. I found something else that seems to work:

http://optics.eee.nottingham.ac.uk/vxi11/

I can pass SCPI through the above software and get the results from both of my Rigol devices. I would expect that it probably works OK on the power supplies too. (I don't have one.) Even if you aren't using *nix, you can probably use the source code as an example of how you send SCPI to a Rigol device over the LAN.


 

Offline dr.diesel

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: us
  • Cramming the magic smoke back in...
Re: Rigol DP1308A control over TCP
« Reply #3 on: June 28, 2013, 07:29:21 pm »
Any of you guys get any further via TCP?  I was thinking about doing the same on my DSA815.

Offline dr.diesel

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: us
  • Cramming the magic smoke back in...
Re: Rigol DP1308A control over TCP
« Reply #4 on: June 30, 2013, 12:51:08 pm »
PeDre, thanks!

I've tried your software, it doesn't find my 815.  Of course I've got it on a same subnet and my 815 is set to LAN for remote control.  Its my understand that if I send "*IDN?" to port 111 is should respond correct?  Do I have to pad the string to a specific length?

I've never used Xojo, I'll get the IDE loaded and see if I can parse the source.





Offline Harvs

  • Super Contributor
  • ***
  • Posts: 1202
  • Country: au
Re: Rigol DP1308A control over TCP
« Reply #5 on: June 30, 2013, 01:02:02 pm »
Whilst it's probably not the answer you wanted, if the device has USB control via the USBTMC class, you could just stick a RPi in between the network and the device.  Use the RPi to do the network comms and translate the commands over to the USB.
 

Offline dr.diesel

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: us
  • Cramming the magic smoke back in...
Re: Rigol DP1308A control over TCP
« Reply #6 on: June 30, 2013, 08:29:10 pm »
Thanks again PeDre,

I've modified the code and tried the rpc-vxi tool, neither can find the 815.  I know the LAN interface is working as I can connect to it's web GUI with no problems.

Any other thoughts?
« Last Edit: August 11, 2013, 02:10:46 pm by dr.diesel »
 

Offline dr.diesel

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: us
  • Cramming the magic smoke back in...
Re: Rigol DP1308A control over TCP
« Reply #7 on: July 01, 2013, 11:56:14 am »
Thanks Peter,

Code: [Select]
0001 The log will be cleared after 1000 lines.
0002 ------------------------------------------------------------
0003 Search Devices ...
0004 Found Network: 192.168.2.47
0005 Search for Devices in Network: 192.168.2.47
0006 0 Device found in Network: 192.168.2.47

Offline dr.diesel

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: us
  • Cramming the magic smoke back in...
Re: Rigol DP1308A control over TCP
« Reply #8 on: July 03, 2013, 07:45:41 am »
Thanks Peter!

This is great, what are your development goals?  Do you plan to further your work?

Andy

Offline dr.diesel

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: us
  • Cramming the magic smoke back in...
Re: Rigol DP1308A control over TCP
« Reply #9 on: July 03, 2013, 08:27:20 am »
Most of my systems are Fedora 19.

Please let us know when you release new versions!  I'm a developer, just not familiar with Xojo, if I make any additions I'll send them to you.


Offline StephanR

  • Newbie
  • Posts: 8
  • Country: de
Re: Rigol DP1308A control over TCP
« Reply #10 on: June 27, 2023, 07:25:07 pm »
This thread is kind of old, but I still stumbled across it, so this might be helpful to others.

I tried to use python with sockerscpi to remotely control my DP832, but as previously mentioned the port 5025 does not work. For my unit, everything works fine when I use port 5555.

I simply tried all open ports returned by nmap:
Code: [Select]
nmap -p- 192.168.178.1331815175-0

In case someone also uses socketscpi, this works for me:
Code: [Select]
psu = socketscpi.SocketInstrument(192.168.178.133, port=5555, verboseErrCheck=False)


 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf