File: tdklambda_tcp.py

package info (click to toggle)
python-scpi 2.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 292 kB
  • sloc: python: 912; sh: 26; makefile: 3
file content (25 lines) | stat: -rw-r--r-- 519 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""
Created on febrary 21 2020.

@author: qmor
"""

import atexit
import os
import time

from scpi.devices import TDKLambdaZPlus
from scpi.wrapper import AIOWrapper

if __name__ == "__main__":
    # Then put to interactive mode
    os.environ["PYTHONINSPECT"] = "1"
    aiodev = TDKLambdaZPlus.tcp("192.168.3.34", 8003)
    dev = AIOWrapper(aiodev)
    atexit.register(dev.quit)
    dev.identify()
    while True:
        dev.query_voltage()
        dev.query_current()
        dev.query_output()
        time.sleep(1)