"I'm new to working with the Red Pitaya and have been tasked with programming an oscilloscope using Python. I've come across several examples in the Red Pitaya GitHub repository, but I've encountered a significant issue: the SCPI command for Signal Acquisition doesn't seem to be working. For instance, when I use the code rp_s.tx_txt('ACQ:DEC 64') to set the decimation factor, it always returns 'none'.
I'm using a STEMlab 125-14 with two inputs and two outputs. I've been trying to troubleshoot the problem, but I'm starting to suspect that these commands typically work for basic measurements and if they're not functioning, it might be due to a hardware issue.
Has anyone else encountered a similar problem? If so, could you share how you resolved it? I'm eagerly looking forward to any insights or advice on this matter."
Troubleshooting SCPI Command Recognition on Red Pitaya
-
- Posts: 3
- Joined: Fri Oct 13, 2023 9:55 am
- redpitaya
- Site Admin
- Posts: 965
- Joined: Wed Mar 26, 2014 7:04 pm
Re: Troubleshooting SCPI Command Recognition on Red Pitaya
Hello btdp97,
Which Red Pitaya OS version are you using? (the SCPI functionality does depend on this)
Here are some examples of how to program Red Pitaya using the SCPI commands:
https://redpitaya.readthedocs.io/en/lat ... l#examples
You can find all possible SCPI commands, versions of OS where they are available and an explanation in the section above the Examples on the link.
Also, please note that not all commands return a value. ACQ:DEC does not return anything, but you can ask Red Pitaya to give you the current decimation using ACQ:DEC?. For Python use tx_txt to send commands, rx_txt to receive data and txrx_txt to do both at the same time.
Which Red Pitaya OS version are you using? (the SCPI functionality does depend on this)
Here are some examples of how to program Red Pitaya using the SCPI commands:
https://redpitaya.readthedocs.io/en/lat ... l#examples
You can find all possible SCPI commands, versions of OS where they are available and an explanation in the section above the Examples on the link.
Also, please note that not all commands return a value. ACQ:DEC does not return anything, but you can ask Red Pitaya to give you the current decimation using ACQ:DEC?. For Python use tx_txt to send commands, rx_txt to receive data and txrx_txt to do both at the same time.
-
- Posts: 3
- Joined: Fri Oct 13, 2023 9:55 am
Re: Troubleshooting SCPI Command Recognition on Red Pitaya
I am using OS version 1.04-28. I have tried to send the command rp_s.txrx_txt(' ACQ:AXI:DATA:UNITS?') this returns an error while the command rp_s.txrx_txt(' ACQ:DATA:UNITS') works and I would like to know why some commands work and others do not.
-
- Posts: 3
- Joined: Fri Oct 13, 2023 9:55 am
Re: Troubleshooting SCPI Command Recognition on Red Pitaya
I conducted experiments using my Red Pitaya board as a function generator to transmit signals. I connected it to an oscilloscope and ran code from the Git directory. Remarkably, the Red Pitaya performed admirably, generating signals that the oscilloscope captured successfully.
Now, I'm in the process of utilizing it as an oscilloscope, but I've encountered issues with certain SCPI commands. I'm currently investigating the disparity between commands that function as expected and those that do not. Some SCPI commands execute flawlessly, while others pose challenges. I'm keen on identifying the underlying cause of this behavior.
Has anyone else faced a similar situation? I would greatly appreciate any insights or advice on resolving this matter. Thank you in advance for your assistance!
Now, I'm in the process of utilizing it as an oscilloscope, but I've encountered issues with certain SCPI commands. I'm currently investigating the disparity between commands that function as expected and those that do not. Some SCPI commands execute flawlessly, while others pose challenges. I'm keen on identifying the underlying cause of this behavior.
Has anyone else faced a similar situation? I would greatly appreciate any insights or advice on resolving this matter. Thank you in advance for your assistance!
- redpitaya
- Site Admin
- Posts: 965
- Joined: Wed Mar 26, 2014 7:04 pm
Re: Troubleshooting SCPI Command Recognition on Red Pitaya
Hello btdp97,
Thank you for the update.
Yes, there are some commands that are not working as intended in the 1.04-28.
The ones that we were able to identify:
- SOUR:TRIG:INT (simultaneous output trigger fails, but separate triggers work)
- ACQ:SOUR<n>:DATA:STA:END?
Otherwise, please make sure that the SCPI commands are available in the specific Red Pitaya OS version you are using. Please check the 4th column here: https://redpitaya.readthedocs.io/en/lat ... i-commands
Sometimes, the order of commands matters. The general rule is to perform the GEN:RST and ACQ:RST first (usually right after establishing the connection). The other part that might cause troubles is the order of ACQ commands: Please make sure that the acquisition parameters (decimation, units, etc.) are defined before the ACQ:START command is executed. Please stick to the order of the commands as presented in the examples (or in the "redpitaya_scpi.py" library as much as possible).
Sometimes, it happens that a specific command malfunctions and returns an *ERR. This may cause consequential commands to fail as the error is returned as well (the first example returns "*ERR" instead of the expected value, and the next command might receive multiple lines). This is tested by running multiple short commands one after the other.
Specifically for Python, the short commands like "ACQ:DATA:UNITS?" work with txrx_txt just fine, but when getting acquired data from Red Pitaya (ACQ:SOUR1:DATA?), please use tx_txt and rx_txt commands separately.
Everything mentioned here was fixed in 2.00-23 OS. We tested the SCPI commands extensively, so there should be no bugs. If you find anything, please report it to our support mail: [email protected].
Thank you for the update.
Yes, there are some commands that are not working as intended in the 1.04-28.
The ones that we were able to identify:
- SOUR:TRIG:INT (simultaneous output trigger fails, but separate triggers work)
- ACQ:SOUR<n>:DATA:STA:END?
Otherwise, please make sure that the SCPI commands are available in the specific Red Pitaya OS version you are using. Please check the 4th column here: https://redpitaya.readthedocs.io/en/lat ... i-commands
Sometimes, the order of commands matters. The general rule is to perform the GEN:RST and ACQ:RST first (usually right after establishing the connection). The other part that might cause troubles is the order of ACQ commands: Please make sure that the acquisition parameters (decimation, units, etc.) are defined before the ACQ:START command is executed. Please stick to the order of the commands as presented in the examples (or in the "redpitaya_scpi.py" library as much as possible).
Sometimes, it happens that a specific command malfunctions and returns an *ERR. This may cause consequential commands to fail as the error is returned as well (the first example returns "*ERR" instead of the expected value, and the next command might receive multiple lines). This is tested by running multiple short commands one after the other.
Specifically for Python, the short commands like "ACQ:DATA:UNITS?" work with txrx_txt just fine, but when getting acquired data from Red Pitaya (ACQ:SOUR1:DATA?), please use tx_txt and rx_txt commands separately.
Everything mentioned here was fixed in 2.00-23 OS. We tested the SCPI commands extensively, so there should be no bugs. If you find anything, please report it to our support mail: [email protected].
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie
Who is online
Users browsing this forum: No registered users and 3 guests