From 7fc98edc3e25e424766637e45f48257ae38981af Mon Sep 17 00:00:00 2001 From: Martin Zietz Date: Tue, 2 Mar 2021 23:05:34 +0100 Subject: [PATCH] deleted deprecated files --- zz old test files etc/example.py | 56 --------------------------- zz old test files etc/example2.py | 64 ------------------------------- 2 files changed, 120 deletions(-) delete mode 100644 zz old test files etc/example.py delete mode 100644 zz old test files etc/example2.py diff --git a/zz old test files etc/example.py b/zz old test files etc/example.py deleted file mode 100644 index 8ff8f89..0000000 --- a/zz old test files etc/example.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env python3 -# coding=utf-8 -import platform -import time - -from pyps2000b import PS2000B - - -DEVICE = "COM7" if platform.system() == "Windows" else "/dev/ttyACM0" - -# connection to the device is automatically opened -print("Connecting to device at %s..." % DEVICE) -device = PS2000B.PS2000B(DEVICE) # create Object of class PS2000B, pass COM-port to functions inside - -# static device information can be read -print("Connection open: %s" % device.is_open()) -print("Device: %s" % device.get_device_information()) - -# dynamic device status information can be read -device_status_info1 = device.get_device_status_information(0) -device_status_info2 = device.get_device_status_information(1) -print("Device status 1: %s" % device_status_info1) -print("Device status 2: %s" % device_status_info2) - -print("Current output: %0.2f V , %0.2f A" % (device.get_voltage(), device.get_current())) - -# device can be controlled -if not device_status_info.remote_control_active: - print("...will enable remote control...") - device.enable_remote_control() - -print("...set voltage to 12V and max current to 1A...") -device.voltage1 = 12 -device.current1 = 1 -time.sleep(10) -print("...now enabling the power output control...") -device.enable_output(0) -time.sleep(2) -device_status_info1 = device.get_device_status_information(0) -device_status_info2 = device.get_device_status_information(1) -print("Device status 1: %s" % device_status_info1) -print("Device status 2: %s" % device_status_info2) -print("Current output: %0.2f V , %0.2f A" % (device.voltage1, device.current1)) -time.sleep(10) -print("...set voltage to 5.1V...") -device.voltage1 = 5.1 -time.sleep(10) -print("Current output: %0.2f V , %0.2f A" % (device.get_voltage(), device.get_current())) -print("...after 5 seconds power output will be disabled again ...") -time.sleep(5) -device.disable_output() -print("...and disabling remote control again.") -device.disable_remote_control() - -print("Device status 1: %s" % device.get_device_status_information(0)) -print("Device status 2: %s" % device.get_device_status_information(1)) diff --git a/zz old test files etc/example2.py b/zz old test files etc/example2.py deleted file mode 100644 index 3ba46cf..0000000 --- a/zz old test files etc/example2.py +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env python3 -# coding=utf-8 -import platform -import time - -from pyps2000b import PS2000B - - -DEVICE = "COM7" if platform.system() == "Windows" else "/dev/ttyACM0" - -# connection to the device is automatically opened -print("Connecting to device at %s..." % DEVICE) -XY_DEVICE = PS2000B.PS2000B(DEVICE) # create Object of class PS2000B, pass COM-port and channel to functions inside - -# static device information can be read -print("Connection open: %s" % XY_DEVICE.is_open()) -print("Device: %s" % XY_DEVICE.get_device_information()) - -# dynamic device status information can be read -device_status_info1 = XY_DEVICE.get_device_status_information(0) -device_status_info2 = XY_DEVICE.get_device_status_information(1) -print("Device status 1: %s" % XY_DEVICE.get_device_status_information(0)) -print("Device status 2: %s" % XY_DEVICE.get_device_status_information(1)) -print("Current output 1: %0.2f V , %0.2f A" % (XY_DEVICE.voltage1, XY_DEVICE.current1)) -print("Current output 2: %0.2f V , %0.2f A" % (XY_DEVICE.voltage2, XY_DEVICE.current2)) - -# device can be controlled -if not device_status_info1.remote_control_active: - print("...will enable remote control...") - XY_DEVICE.enable_remote_control(0) -if not device_status_info2.remote_control_active: - print("...will enable remote control...") - XY_DEVICE.enable_remote_control(1) - -print("...set voltage 1 to 12V and max current to 1A...") -XY_DEVICE.voltage1 = 12 -XY_DEVICE.current1 = 1 -time.sleep(2) -print("...now enabling the power output control 1...") -XY_DEVICE.enable_output(0) - -time.sleep(2) -print("... set voltage 2 to 5V and max current to 1A...") -XY_DEVICE.voltage2 = 5 -XY_DEVICE.current2 = 1 -time.sleep(2) -print("...now enabling the power output control 2...") -XY_DEVICE.enable_output(1) - -time.sleep(5) -print("Device status 1: %s" % XY_DEVICE.get_device_status_information(0)) -print("Device status 2: %s" % XY_DEVICE.get_device_status_information(1)) -print("Output 1: %0.2f V , %0.2f A" % (XY_DEVICE.voltage1, XY_DEVICE.current1)) -print("Output 2: %0.2f V , %0.2f A" % (XY_DEVICE.voltage2, XY_DEVICE.current2)) - -time.sleep(5) -XY_DEVICE.disable_output(0) -XY_DEVICE.disable_output(1) -print("...and disabling remote control again.") -XY_DEVICE.disable_remote_control(0) -XY_DEVICE.disable_remote_control(1) - -print("Device status 1: %s" % XY_DEVICE.get_device_status_information(0)) -print("Device status 2: %s" % XY_DEVICE.get_device_status_information(1))