Products > Test Equipment
SOLVED : Question for python user / coders
coromonadalix:
hi im a noob in python
i try to integrate a EDIT Siglent SDS1000X-E command in lan connection mode, not usb since it relies on added visa drivers witch i don't want
so far the python code work fine, sadly i wont be able to post it here
basically it's a 2 stage of measurements with a pause between them, keyboard press to continue
simply put: we measure / compare the in and out of a wide band passive filter thru a scope and generator
i need "if it is possible" to make the scope come out of the run / stop mode when the 1st stage is done
scpi or telnet is : TRMD Norm and it opposite TRMD Stop they work fine ... the scope goes into stop or comes out of it
But in Python, i dont know how to format the command, the code creator is not here anymore ...
Does someone have code snippets of that command ???
thks
tautech:
--- Quote from: coromonadalix on October 11, 2024, 05:50:19 pm ---hi im a noob in python
i try to integrate a Siglent SDS1000x command in lan connection mode, not usb since it relies on added visa drivers witch i don't want.........
--- End quote ---
Very old model now.....do you instead mean SDS1000X-E ?
It has a webserver and SCPI command page.....no additional SW needed, only a PC browser.
This might help:
https://int.siglent.com/u_file/document/SDS1000%20Series&SDS2000X&SDS2000X-E_ProgrammingGuide_PG01-E02D.pdf
thephil:
I'm afraid it is impossible to be of much help without knowing what your code is currently using to send commands to the scope. From what you say, I gather it's not pyvisa. If your code already contains parts that send other SCPI commands to the scope, all it takes is copying that code and replacing the SCPI command with what you need.
Look out for commands that look like something.write(...), something.read() or something.query(...) to get an idea how communication is handled. If no code for talking to the scope exists, yet, you may want to look at the socket package which you can use to connect to remote ports. Here is some code examples of using it: https://wiki.python.org/moin/TcpCommunication#Client. Hovever I strongly recommend pyvisa for flexibility and ease of use (https://pyvisa.readthedocs.io/en/latest/).
If that does not solve your problem and posting code here is not an option, you'll need to give access to your code to someone who can help, possibly under an NDA. But the latter will certainly cost money.
Nominal Animal:
In Python, lines of form
import library
import library as name
from library import things
from library import thing as name
are used to import features from other Python libraries and from Python wrappers around external libraries.
Knowing which SCPI library is used, if it is an open source one, would help. There are many.
Check those import lines, and see if it is one of the open source ones. If it is, we can switch the question into how to use X Python SCPI library to send specific commands.
For example, if it is this one (scpi), then you should look for stuff like name.get_response() and name.send_command("string"). With this one, you'd use name.send_command("TRMD Norm") or name.send_command(b'TRMD Norm'), where name is the SCPI transport object you need access to.
eTobey:
My project might help.
See the webpage in my profile.
Navigation
[0] Message Index
[#] Next page
Go to full version