APIs, concepts, guides, and more

Example of using IO point in Python. Useful information about enum conversions.


📜 IO Point

def test_iopoint(self):
INPUT_INDEX = 0
OUTPUT_INDEX = 1
user_buffer_address = self.motioncontroller.AddressGet(RapidCode.RSIControllerAddressType_RSIControllerAddressTypeUSER_BUFFER, 0)
input0 = RapidCode.IOPoint.CreateDigitalInput( self.motioncontroller, user_buffer_address, INPUT_INDEX)
output0 = RapidCode.IOPoint.CreateDigitalOutput( self.motioncontroller, user_buffer_address, OUTPUT_INDEX)
output0.Set(False)
assert not output0.Get(), "The getter function should return a value equal to false"
output0.Set(True)
assert output0.Get(), "The getter function should return a value equal to true"
self.motioncontroller.MemorySet(input0.AddressGet(), 0)
assert not input0.Get(), "The getter function should return a value equal to false"
self.motioncontroller.MemorySet(input0.AddressGet(), 1)
assert input0.Get(), "The getter function should return a value equal to true"

Learn more in settling topic page.