Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
projects:test_and_measurement_home_lab [2019/11/21 20:56]
admin [Remote control via Python & sockets]
projects:test_and_measurement_home_lab [2021/05/20 19:10]
admin
Line 1: Line 1:
 ====== Test & measurement home lab ====== ====== Test & measurement home lab ======
 ===== DMM Keysight 34465A ===== ===== DMM Keysight 34465A =====
-==== Remote control ​via Python & sockets ====+==== Remote control ​==== 
 +=== Netcat - using sockets === 
 +<​code>​ 
 +$ echo "​*IDN?"​ | nc 34465a 5025 
 +Keysight Technologies,​34465A,​MY59008429,​A.03.01-03.15-03.01-00.52-03-02 
 +$ echo "​MEAS:​VOLT:​DC?​ 10,​0.001"​ | nc 34465a 5025 
 ++1.62349138E-04 
 +$ echo "​SYST:​ERR?"​ | nc 34465a 5025 
 ++0,"No error"​ 
 +
 +</​code>​ 
 +=== Python - using sockets ​===
 <​code>​ <​code>​
 $ python $ python
Line 10: Line 21:
 >>>​ s.sendall('​meas:​volt:​dc?​ 10,​0.001\n'​) >>>​ s.sendall('​meas:​volt:​dc?​ 10,​0.001\n'​)
 >>>​ data=s.recv(1024) >>>​ data=s.recv(1024)
 +>>>​ data
 +'​+7.33658297E-05\n'​
 >>>​ print data >>>​ print data
 ++7.33658297E-05
 +
 >>>​ s.close() >>>​ s.close()
 +</​code>​
 +=== Python - using pyvisa package ===
 +  * install pyvisa first - on Ubuntu 18.04
 +<​code>​
 +$ sudo apt-get install pyvisa
 +</​code>​
 +  * on Oracle Solaris s11.4
 +<​code>​
 +# pip install pyvisa
 +Collecting pyvisa
 +  Downloading https://​files.pythonhosted.org/​packages/​51/​d1/​fc21b45228718cde06b33b08761a6a9aa859dfe51dfbf07e81e0f209e776/​PyVISA-1.10.1.tar.gz (6.8MB)
 +    100% |████████████████████████████████| 6.8MB 94kB/s
 +Requirement already satisfied (use --upgrade to upgrade): enum34 in /​usr/​lib/​python2.7/​vendor-packages (from pyvisa)
 +Installing collected packages: pyvisa
 +  Running setup.py install for pyvisa ... done
 +Successfully installed pyvisa-1.10.1
 +You are using pip version 8.1.2, however version 19.3.1 is available.
 +You should consider upgrading via the 'pip install --upgrade pip' command.
 +# pip install pyvisa-py
 +Collecting pyvisa-py
 +  Downloading https://​files.pythonhosted.org/​packages/​7c/​85/​6f3170a31596d8e1ae55a108c07976da7ed2827c7a4328958fc242a88bc9/​PyVISA-py-0.3.1.tar.gz (57kB)
 +    100% |████████████████████████████████| 61kB 953kB/s
 +Requirement already satisfied (use --upgrade to upgrade): pyvisa>​=1.8 in /​usr/​lib/​python2.7/​site-packages (from pyvisa-py)
 +Requirement already satisfied (use --upgrade to upgrade): enum34 in /​usr/​lib/​python2.7/​vendor-packages (from pyvisa>​=1.8->​pyvisa-py)
 +Installing collected packages: pyvisa-py
 +  Running setup.py install for pyvisa-py ... done
 +Successfully installed pyvisa-py-0.3.1
 +You are using pip version 8.1.2, however version 19.3.1 is available.
 +You should consider upgrading via the 'pip install --upgrade pip' command.
 +#
 +</​code>​
 +  * run simple program to acquire measured value
 +<​code>​
 +$ python
 +>>>​ import pyvisa
 +>>>​ rm = pyvisa.ResourceManager() ​       <--- work on Solaris, not on Ubuntu
 +>>>​ rm = pyvisa.ResourceManager('​@py'​) ​  <​--- works on both Solaris and Ubuntu
 +>>>​ inst = rm.open_resource('​TCPIP0::​34465a::​inst0::​INSTR'​)
 +>>>​ print (inst.query("​*IDN?"​))
 +Keysight Technologies,​34465A,​MY59008429,​A.03.01-03.15-03.01-00.52-03-02
 +
 +>>>​ print (inst.query("​SYST:​ERR?"​))
 ++0,"No error"
 +
 +>>>​ print(inst.query("​MEAS:​VOLT:​DC?​ 10,​0.001"​))
 ++7.79228646E-01
 +
 +>>>​ print(float(inst.query("​MEAS:​VOLT:​DC?​ 100,​0.00001"​)))
 +12.7884186
 +
 +>>>​ data=inst.query("​MEAS:​VOLT:​DC?​ 10,​0.001"​)
 +>>>​ data
 +u'​+1.99758447E-05\n'​
 +>>>​
 </​code>​ </​code>​
 ===== Laboratory power supply OWON ODP3122 ===== ===== Laboratory power supply OWON ODP3122 =====
Line 18: Line 87:
   * channel 1: 0-30V/0-12A   * channel 1: 0-30V/0-12A
   * channel 2: 0-6V/0-3A   * channel 2: 0-6V/0-3A
-==== Remote control ​via LAN ====+==== Remote control ==== 
 +=== Telnet ​===
 <​code>​ <​code>​
 $ telnet 192.168.1.99 3000 $ telnet 192.168.1.99 3000
Line 59: Line 129:
   * port 1861   * port 1861
   * LeCroy VICP protocol   * LeCroy VICP protocol
-===== 6,5 DMM =====+===== Available ​6,5 DMMs =====
 ==== www.amt.cz ==== ==== www.amt.cz ====
 === Siglent SDM 3065X === === Siglent SDM 3065X ===
Line 118: Line 188:
   * price w/ DPH: 25 703,-   * price w/ DPH: 25 703,-
   * 3-year warranty   * 3-year warranty
 +===== Binocular microscops ===== 
 +  * [[https://​www.hotair.cz/​mikroskopy/​binokularni/​stranka-1-24.html|www.hotair.cz]]
  
projects/test_and_measurement_home_lab.txt · Last modified: 2021/05/20 19:49 by admin
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0