InoDrive / IO / get_output


InoDrive.IO.get_output(self, output=None)

Get Voltage State of Specific Output.

Arguments:

self (Object): Reference to InoDrive File Instance.
output (Integer): Module’s Output Range (0 to 2).

Returns:

Integer:

• 0 – Low Voltage Output Signal
• 1 – High Voltage Output Signal

import CkInoDriveAPI

# Instantiate InoDrive Object and Connect by Name
Drive = CkInoDriveAPI.InoDrive(target='Name', autoConnect=True)

# Get Output States
inputs = [0, 1, 2]

for item in outputs:
    state = Drive.IO.get_output(item)
    if state == 0:
        print(f"Output {item} is low.")
    else:
        print(f"Output {item} is high.")