Siglent SDS1102DL+ SCPI / VISA problems  - Page 1
Forum section: electronics / testgear

author: TheWizardOfAussie
author_rank: Newbie
timestamp: March 23, 2019, 10:32:38 am
content: Hi all,Recently got my first Siglent Scope and have been experimenting with Timing Attacks. Unfortunately I've faced a problem that I can't seem to find a solution too.I am trying to collect waveform data from the scope via SCPI - I am using visa.Below is the script I am using (Python):import visa_rm = visa.ResourceManager()sds = _rm.open_resource("USB0::.............::INSTR")sds.timeout = 3000 #default value is 2000(2s)sds.chunk_size = 20*1024*1024 #default value is 20*1024(20k bytes)sds.write("c1:wf? dat2")recv = list(sds.read_raw())Output:['A', 'L', 'L', ',', '#', '9', '0', '0', '0', '0', '1', '6', '3', '8', '4', '\xe3', '\xe3', '\xe2', '\xe2', '\xe2', '\xe2', '\xe1', '\xe1', '\xe1', '\xe2', '\xe3', '\xe3', '\xe2', '\xe1', '\xe2', '\xe2', '\xe2', '\xe2', '\xe1', '\xe2', '\xe2', '\xe2', '\xe2', '\xe2', '\xe3', '\xe1', '\xe3', '\xe2', '\xe1', '\xe2', '\xe2', '\xe1', '\xe2', '\xe2', '\xe2', '\xe2', '\xe2']I have tried a combination of using read_raw, read_bytes with different sizes and to no avail. The data read is always only the above messages. The byte values after the header do change but are far to small sample size. (13 points opposed to the 16K bytes that should be present).Likewise I have experimented with SCPI command WFSU and changing the number or samples and that does change the respective header values ['A', 'L', 'L', ',', '#', '9', '0', '0', '0', '0', '0', '0', '0', '1', '0',..] but still only prints 37 bytes if the value is greater than 37. Changing number of sample points with WFSU below 37, corresponds to only that amount of bytes appearing when using read_raw.I have tried using read_raw multiple times in succession and that freezes the scope and causes program to hang.Hopefully someone knows a fix for this issue.Regards,

author: TheWizardOfAussie
author_rank: Newbie
timestamp: March 23, 2019, 10:38:44 am
content: Similarly, I have also tried to dump screen / take screenshot via SCPI.If the operation doesn't time out , it only returns a 52 byte bitmap image that's corrupted.All other SCPI commands seem to work well, just retrieving data from the scope seems to be a cause of problem at the moment.

author: Rerouter
author_rank: Super Contributor
timestamp: March 23, 2019, 11:13:49 am
content: Not sure if this is a helpful starting point, but seems there is already compete source code out there for this problemhttps://ktln2.org/2018/02/20/control-siglent-oscilloscope/

author: TheWizardOfAussie
author_rank: Newbie
timestamp: March 23, 2019, 12:33:37 pm
content: Hi rerouter,I have tried the code line for line and still have the same issue. Even opening the wav into audacity only gives 0.003 second length clip. With 32 samples present and the sample rate is correct in audacity.Even the WF and screen dump code from siglent programming guide doesn't work successfully causing same.issue above.

author: TheWizardOfAussie
author_rank: Newbie
timestamp: March 23, 2019, 11:35:15 pm
content: To follow up:I tried a different Linux distro (Ubuntu) and the problem is solved. Dumps all 16K samples. Must be a visa library related issue with Fedora Linux.