Elektro-Automatik EL 9500-30 B electronic load SCPI over LAN not working - Page 1
Forum section: electronics / testgear

author: KSP
author_rank: Regular Contributor
timestamp: February 16, 2022, 09:21:17 pm
content: I'm using the Elektro-Automatik EL 9500-30 B electronic loads via LAN and I'm having strange issues with the visa session timing out.When using NI-MAX, I have to configure it as a raw socket device, and when using the Interactive Control panel I send the *IDN? query. The details of the device come through, but the panel reports a connection timeout, after which the load no longer responds to any further commands. I'm not at the equipment at the moment, but I believe the error was:"VISA: (Hex 0xBFFF0015) Timeout expired before operation completed."Sounds like a missing termination character, you may say... Tried that. I've tried setting the termination character to \n, to \r, and also to \n\rWhen using Python and pyvisa I get the same behaviour. The only way I can seem to send multiple commands to the device is to close the visa session and reopen it between commands.Example failing code:Code:import pyvisaimport timeload1 = rm.open_resource('TCPIP0::192.168.69.51::5025::SOCKET')while True:print(load1.query("*IDN?"))time.sleep(1)I tried settingCode:load1.write_termination='\n'andCode:load1.write_termination='\n'same for \r and \n\r. Still no joy. Also tried setting theCode:send_end=True, also makes no difference.Example working code:Code:import pyvisaimport timewhile True:load1 = rm.open_resource('TCPIP0::192.168.69.51::5025::SOCKET')print(load1.query("*IDN?"))time.sleep(1)load1.close()The same issue arises when I exclude VISA and just use raw socketsCode:import socketscpiimport timeload1 = socketscpi.SocketInstrument('192.168.69.51', port=5025, timeout=10, noDelay=True)while True:print(load1.query("*IDN?"))time.sleep(1)I've never had this issue with other instruments, but this one is really playing on my mind because I know it must be something simple.Anyone got any thoughts?

author: ploegmma
author_rank: Newbie
timestamp: April 09, 2022, 01:03:00 pm
content: If it has an RS-232 or USB port you could try ConsoleCast (https://consolecast.nickstick.nl/). You could use Python or even JS directly from a browser without any drivers or VISA. Here's an example for SCPI using JS with an XDM2041 multimeter:https://github.com/majodi/consolecast/tree/master/main/example

author: alm
author_rank: Super Contributor
timestamp: April 09, 2022, 02:22:06 pm
content: I would avoid any additional abstraction like VISA for troubleshooting this. I would use basic TCP sockets (raw socketsmeans something else. Maybe a tool likenetcat.Scanning through the programming guide that's part ofthis archive, I see them talking about an adjustable timeout. What is the timeout set to on the load? Maybe it's set to something really short, that it times out in the time between two of your commands?The manual specifies LF (0x0a) as mandatory termination character, so I'd send the string "*IDN?\n" a couple of times, and monitor the traffic usingWiresharkto see what is actually sent and returned.Is the system in a state that prohibits switching it to remote control? Does it help to send *RST at the start of your session?

author: KSP
author_rank: Regular Contributor
timestamp: April 09, 2022, 03:02:19 pm
content: Quote from: alm on April 09, 2022, 02:22:06 pmMy final code example eliminated VISA, and uses raw web sockets via the socketscpi package in python. Admittedly I didn't realise the difference between raw socket and TCP socket, so I can explore that a little more, thanks.Quote from: alm on April 09, 2022, 02:22:06 pmMy socketscpi example also altered the timeout, no joy. That was the timeout of the session/connection though, not sure if that is the same as the timeout mentioned in the programming guide so I'll explore that.I did mess about with the termination characters, but I haven't done any Wireshark monitoring yet so that's something to try.Quote from: alm on April 09, 2022, 02:22:06 pmStarting the script with a *RST and/or *CLS also did not help