The LeCroy oscilloscopes do not have an IOC, and the Highland AWG IOC is too slow for our purposes, so we communicate with both of these classes of devices using a Python socket. While fast enough for what we need, the device will only accept a single socket connection at a time; no new socket connection will be accepted until an existing socket is closed. Unfortunately, if a Python socket is broken (e.g. a script is interrupted in the middle of execution while the communication socket was open), then it cannot be closed, and thus no one can connect to the device anymore. This will manifest itself with messages such as "HIGHLAND NOT CONNECTED" or "Send and reply failed!" when trying to connect to those devices again.

Highland socket reset

For the Highland, the socket can be reset by power-cycling the device. This can be done directly from the PDU EDM screen, or it can be done using the Reset() command in the HAWG class of the meclas package.

In the screenshot below, qq is my Highland object. The socket is broken so trying to read the pulse heights generates an error. By entering qq.Reset() I power-cycle the Highland, which closes out the broken socket. Now I am able to talk to the Highland again, as shown by a successful query of the unit's current status using qq.ReadStatus().


LeCroy socket reset

When the LeCroy socket is broken, you might get an error message that looks like this:

To reset the socket, you need to reset the network connection. Due to the nature of the disconnect, you will need to do this locally (of course, by resetting the network connection you will also kill the same connection that would otherwise provide you with remote/VNC access!)

First, make sure the scope of interest is plugged into an external monitor if necessary. For LeCroyA and LeCroyB, there is a VGA cable and monitor kept nearby for this purpose.


Minimize the scope screen using the top menu, as shown in the picture below.


In the bottom-right corner of the screen on the right side of the Windows taskbar, click the network icon (circled) and then click "Open Network and Sharing Center" of the popup bar. (You can also open the Network and Sharing Center through the Windows menu.)


In the top-left corner of the Network and Sharing Center, click "Change adapter settings" (circled)


Right click on the first icon labeled "Local Area Connection" and select the top option "Disable".


Right click on the first icon labeled "Local Area Connection" again, and now re-enable the connection by selecting the top option "Enable".


With your network connection now reset, the broken socket will be gone, and you will be able to connect to the scope using Python sockets again! (big grin)

  • No labels