Rigol DP1308A control over TCP - Page 1
Forum section: electronics / testgear

author: csak1
author_rank: Newbie
timestamp: April 30, 2013, 08:07:41 pm
content: 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

author: Bored@Work
author_rank: Super Contributor
timestamp: April 30, 2013, 09:51:43 pm
content: 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.

author: signals
author_rank: Contributor
timestamp: May 03, 2013, 09:06:19 pm
content: 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.

author: dr.diesel
author_rank: Super Contributor
timestamp: June 28, 2013, 07:29:21 pm
content: Any of you guys get any further via TCP? I was thinking about doing the same on my DSA815.

author: dr.diesel
author_rank: Super Contributor
timestamp: June 30, 2013, 12:51:08 pm
content: 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.

author: Harvs
author_rank: Super Contributor
timestamp: June 30, 2013, 01:02:02 pm
content: 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.

author: dr.diesel
author_rank: Super Contributor
timestamp: June 30, 2013, 08:29:10 pm
content: 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?

author: dr.diesel
author_rank: Super Contributor
timestamp: July 01, 2013, 11:56:14 am
content: Thanks Peter,Code:0001 The log will be cleared after 1000 lines.0002 ------------------------------------------------------------0003 Search Devices ...0004 Found Network: 192.168.2.470005 Search for Devices in Network: 192.168.2.470006 0 Device found in Network: 192.168.2.47

author: dr.diesel
author_rank: Super Contributor
timestamp: July 03, 2013, 07:45:41 am
content: Thanks Peter!This is great, what are your development goals? Do you plan to further your work?Andy

author: dr.diesel
author_rank: Super Contributor
timestamp: July 03, 2013, 08:27:20 am
content: 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.

author: StephanR
author_rank: Newbie
timestamp: June 27, 2023, 07:25:07 pm
content: 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:nmap -p- 192.168.178.133In case someone also uses socketscpi, this works for me:Code:psu = socketscpi.SocketInstrument(192.168.178.133, port=5555, verboseErrCheck=False)