OWON XDS3102A SCPI LAN - Page 1
Forum section: electronics / testgear

author: y33t
author_rank: Contributor
timestamp: April 15, 2017, 04:18:05 pm
content: Hi everyone,I am trying to com with a scope over LAN that supports SCPI. Link is established I can ;*RST *CLSbut I can't do ;:MEASure:SOURce CH1it 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.

author: Tjuurko
author_rank: Regular Contributor
timestamp: October 09, 2017, 10:19:20 am
content: Ask for a chat onhttp://www.owon.com.hkfile "XDS3000 Series SCPI Protocol_V1.1.pdf"

author: Jacek_Paw
author_rank: Contributor
timestamp: October 09, 2017, 12:09:03 pm
content: 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.

author: Tjuurko
author_rank: Regular Contributor
timestamp: October 10, 2017, 08:09:15 am
content: NI MAX (ver.15.3)Select USB0::0x5345::0x1234::SERIAL::RAWOpen VISA Test PanelSelect Input/OutputSelect "View mixed ASCII/hexadecimal"===============================================================1: Write Operation (:MEASU:CH1?)Return Count: 11 bytes2: Read OperationReturn Count: 564 bytes0\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 bytes2: Read OperationReturn Count: 565 bytes1\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 bytes2: Read OperationReturn Count: 1386 bytesf\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-8import timeimport sysimport visaimport pyvisareload(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()===============================================================

author: lundmar
author_rank: Frequent Contributor
timestamp: October 10, 2017, 08:43:59 am
content: http://lxi.github.io