Author Topic: OWON XDS3102A SCPI LAN  (Read 1766 times)

0 Members and 1 Guest are viewing this topic.

Offline y33tTopic starter

  • Contributor
  • Posts: 25
OWON XDS3102A SCPI LAN
« on: April 15, 2017, 04:18:05 pm »
Hi everyone,

I am trying to com with a scope over LAN that supports SCPI. Link is established I can ;

*RST *CLS

but I can't do ;

:MEASure:SOURce CH1

it returns zero. To be more clear ;

a = SCPI(host, timeout=0.5)
a.ask('SYST:ERR?');
a.write('*RST'); a.write('*CLS');
a.ask(":MEASure:SOURce CH1");

returns ;

>> SYST:ERR?
<< 
>> SYST:ERR?
<< 
>> :MEASure:SOURce CH1
<< 
>> SYST:ERR?
<< 

doing *IDN? retuns successfully.
 

Online Tjuurko

  • Regular Contributor
  • *
  • Posts: 101
Re: OWON XDS3102A SCPI LAN
« Reply #1 on: October 09, 2017, 10:19:20 am »
Ask for a chat on http://www.owon.com.hk file "XDS3000 Series SCPI Protocol_V1.1.pdf"
« Last Edit: October 09, 2017, 10:22:16 am by Tjuurko »
 

Offline Jacek_Paw

  • Contributor
  • Posts: 29
  • Country: pl
Re: OWON XDS3102A SCPI LAN
« Reply #2 on: October 09, 2017, 12:09:03 pm »
Hi, I'm not familiar with Owon remote control but I have noticed two things:
-the  "a.ask(":MEASure:SOURce CH1");" should be write command, it is not going to return any value as it will setup the measurement source.
- inside brackets you used " and ' there is probably a huge difference in your programming language.
 

Online Tjuurko

  • Regular Contributor
  • *
  • Posts: 101
Re: OWON XDS3102A SCPI LAN
« Reply #3 on: October 10, 2017, 08:09:15 am »
NI MAX (ver.15.3)
Select USB0::0x5345::0x1234::SERIAL::RAW
Open VISA Test Panel
Select Input/Output
Select "View mixed ASCII/hexadecimal"
===============================================================
1: Write Operation (:MEASU:CH1?)

Return Count: 11 bytes

2: Read Operation
Return Count: 564 bytes
0\02\00\00{"CH1":{"PERiod":"0.999ms","FREQuency":"1.001KHz",
"AVERage":"2.518V","PKPK":"5.040V","SQUARESUM":"3.534V","MAX":
"5.040V","MIN":"0.000mV","VTOP":"5.040V","VBASe":"80.00mV",
"VAMP":"4.960V","VPRESHOOT":"0.0%","PREShoot":"1.6%","RTime":
"<10.000us","FTime":"<10.000us","PWIDth":"0.498ms","NWIDth":
"0.501ms","PDUTy":"51.0%","NDUTy":"49.0%","RDELay":"\s\s?",
"FDELay":"\s\s?","TRUERMS":"3.536V","CYCRms":"0.000mV",
"WORKPERIOD":"51.0%","RISEPHASEDELAY":"\s\s?","PPULSENUM":"7",
"NPULSENUM":"7","RISINGEDGENUM":"7","FALLINGEDGENUM":"8","AREA":
"15.06Vs","CYCLEAREA":"261.0mVs"}}
===============================================================
1: Write Operation (:MEASU:CH2?)

Return Count: 11 bytes

2: Read Operation
Return Count: 565 bytes
1\02\00\00{"CH2":{"PERiod":"0.999ms","FREQuency":"1.001KHz",
"AVERage":"2.400V","PKPK":"5.120V","SQUARESUM":"3.452V","MAX":
"4.960V","MIN":"-160.0mV","VTOP":"4.960V","VBASe":"0.000mV",
"VAMP":"4.960V","VPRESHOOT":"0.0%","PREShoot":"3.2%","RTime":
"<10.000us","FTime":"<10.000us","PWIDth":"0.498ms","NWIDth":
"0.501ms","PDUTy":"51.0%","NDUTy":"49.0%","RDELay":"\s\s?",
"FDELay":"\s\s?","TRUERMS":"3.453V","CYCRms":"0.000mV",
"WORKPERIOD":"51.0%","RISEPHASEDELAY":"\s\s?","PPULSENUM":"7",
"NPULSENUM":"7","RISINGEDGENUM":"7","FALLINGEDGENUM":"8","AREA":
"14.61Vs","CYCLEAREA":"253.0mVs"}}
===============================================================
1: Write Operation (:MEASU:ALL?)

Return Count: 11 bytes

2: Read Operation
Return Count: 1386 bytes
f\05\00\00{"CH1":{"PERiod":"0.999ms,OFF","FREQuency":"1.001KHz,
OFF","AVERage":"2.600V,OFF","PKPK":"5.400V,ON","SQUARESUM":
"3.609V,ON","MAX":"5.200V,OFF","MIN":"-200.0mV,OFF","VTOP":
"5.200V,OFF","VBASe":"200.0mV,OFF","VAMP":"5.000V,OFF",
"VPRESHOOT":"0.0%,OFF","PREShoot":"8.0%,OFF","RTime":"<10.000us,
OFF","FTime":"<10.000us,OFF","PWIDth":"0.498ms,OFF","NWIDth":
"0.500ms,OFF","PDUTy":"51.0%,OFF","NDUTy":"49.0%,OFF","RDELay":
"0.000ns,OFF","FDELay":"0.000ns,OFF","TRUERMS":"3.610V,OFF",
"CYCRms":"0.000mV,OFF","WORKPERIOD":"51.0%,OFF","RISEPHASEDELAY":
"0.000rad,OFF","PPULSENUM":"7,OFF","NPULSENUM":"7,OFF",
"RISINGEDGENUM":"7,OFF","FALLINGEDGENUM":"8,OFF","AREA":"15.88Vs,
OFF","CYCLEAREA":"275.0mVs,OFF"},"CH2":{"PERiod":"0.999ms,OFF",
"FREQuency":"1.001KHz,OFF","AVERage":"2.600V,OFF","PKPK":"5.200V,
ON","SQUARESUM":"3.609V,ON","MAX":"5.200V,OFF","MIN":"0.000mV,
OFF","VTOP":"5.200V,OFF","VBASe":"200.0mV,OFF","VAMP":"5.000V,
OFF","VPRESHOOT":"0.0%,OFF","PREShoot":"4.0%,OFF","RTime":
"<10.000us,OFF","FTime":"<10.000us,OFF","PWIDth":"0.498ms,OFF",
"NWIDth":"0.500ms,OFF","PDUTy":"51.0%,OFF","NDUTy":"49.0%,OFF",
"RDELay":"0.000ns,OFF","FDELay":"0.000ns,OFF","TRUERMS":"3.610V,
OFF","CYCRms":"0.000mV,OFF","WORKPERIOD":"51.0%,OFF",
"RISEPHASEDELAY":"0.000rad,OFF","PPULSENUM":"7,OFF","NPULSENUM":
"7,OFF","RISINGEDGENUM":"7,OFF","FALLINGEDGENUM":"8,OFF","AREA":
"15.88Vs,OFF","CYCLEAREA":"275.0mVs,OFF"}}
===============================================================

Or python 2.7.12
===============================================================
# encoding: utf-8
import time
import sys
import visa
import pyvisa

reload(sys) 
sys.setdefaultencoding('utf8')

rm = pyvisa.ResourceManager()

#XDS3000_TCPIP = rm.open_resource("TCPIP0::192.168.1.252::3000::SOCKET")
XDS3000 = rm.open_resource("USB0::0x5345::0x1234::SERIAL::RAW")


with open("CH1.bin", "wb") as bin_file:
   bin_file.write(XDS3000.query(":MEASU:CH1?"))
bin_file.close()

with open("CH2.bin", "wb") as bin_file:
   bin_file.write(XDS3000.query(":MEASU:CH2?"))
bin_file.close()

with open("ALL.bin", "wb") as bin_file:
   bin_file.write(XDS3000.query(":MEASU:ALL?"))
bin_file.close()

XDS3000.close()
===============================================================
« Last Edit: October 10, 2017, 08:23:53 am by Tjuurko »
 

Offline lundmar

  • Frequent Contributor
  • **
  • Posts: 441
  • Country: dk
Re: OWON XDS3102A SCPI LAN
« Reply #4 on: October 10, 2017, 08:43:59 am »
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple serial device I/O tool
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf