Updates
This commit is contained in:
@@ -12,7 +12,7 @@ import vxi11
|
||||
# Initial state
|
||||
toggle_state = 0
|
||||
|
||||
#ser = serial.Serial(port='/dev/ttyACM0', baudrate=115200)
|
||||
ser = serial.Serial(port='/dev/ttyACM0', baudrate=115200)
|
||||
|
||||
VISA_ADDRESS = "TCPIP::192.168.45.3::INSTR"
|
||||
|
||||
@@ -121,7 +121,7 @@ def trigger_serial_command():
|
||||
|
||||
data = (command, state)
|
||||
byte_data = pack_integers_to_bytes(*data)
|
||||
#ser.write(serial.to_bytes(byte_data))
|
||||
ser.write(serial.to_bytes(byte_data))
|
||||
|
||||
# Schedule the NEXT random trigger
|
||||
# random.uniform(0.1, 100.0) provides the random delay in seconds
|
||||
@@ -179,9 +179,9 @@ if __name__ == '__main__':
|
||||
|
||||
data = (command, state)
|
||||
byte_data = pack_integers_to_bytes(*data)
|
||||
#ser.write(serial.to_bytes(byte_data))
|
||||
ser.write(serial.to_bytes(byte_data))
|
||||
|
||||
#ser.close()
|
||||
ser.close()
|
||||
|
||||
SPD.write('CH1:VOLT ' + str(0.0)) # Send power supply source voltage
|
||||
SPD.write('CH1:CURR ' + str(0.0)) # Send power supply current limit
|
||||
|
||||
Reference in New Issue
Block a user