Edit: just added that test case.
More info.
1. If you open the socket, run 100 commands through, then close it ->
CRASH.
1. If you open the socket and close it immediately without executing any commands ->
NO CRASH.
2. If you open the socket, run one command and close it ->
NO CRASH.
3. If you open the socket 100 times and run one command then close it, it takes bloody forever ->
NO CRASHSo workaround is:
for i in range(100):
s = SocketConnect()
qStr = SocketQuery(s, b'C1:WF? DAT2')
time.sleep(0.5)
print (str(count) + ":: " + str(qStr))
count = count + 1
SocketClose(s)
So it can't be trusted to execute more than one command per connection reliably. Smells like some stupid C somewhere.
Someone at Siglent should get a JTAG debugger on it and gdb, crash it, get a bt and fix this ASAP. Big
.