@@ -356,3 +356,18 @@ def test_galil_rio_signal_read(galil_rio):
|
||||
for value in value_callback_buffer[0].values()
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
def test_galil_rio_digital_out_signal(galil_rio):
|
||||
"""
|
||||
Test that the Galil RIO digital output signal can be set correctly.
|
||||
"""
|
||||
# Set digital output channel 0 to high
|
||||
galil_rio.controller.sock.buffer_recv = [b":"] # Mock response for readback]
|
||||
galil_rio.di_out0.put(1)
|
||||
assert galil_rio.controller.sock.buffer_put == [b"SB0\r"]
|
||||
|
||||
galil_rio.controller.sock.buffer_recv = [b":"] # Mock response for readback
|
||||
# Set digital output channel 0 to low
|
||||
galil_rio.di_out0.put(0)
|
||||
assert galil_rio.controller.sock.buffer_put == [b"SB0\r", b"CB0\r"]
|
||||
|
||||
Reference in New Issue
Block a user