get_digital_output(index)
Features
This function reads the signals from digital contact points of the controller and reads the digital output contact value.
Parameters
| Parameter Name | Data Type | Default Value | Description |
|---|---|---|---|
index | int | - | A number 1 - 16 which means the contact number of I/O mounted on the controller. |
Return
| Value | Description |
|---|---|
1 | ON |
0 | OFF |
Negative value | Failed |
Exception
| Exception | Description |
|---|---|
DR_Error (DR_ERROR_TYPE) | Parameter data type error occurred |
DR_Error (DR_ERROR_VALUE) | Parameter value is invalid |
DR_Error (DR_ERROR_RUNTIME) | C extension module error occurred |
DR_Error (DR_ERROR_STOP) | Program terminated forcefully |
Example
out1 = get_digital_output(1) #Reads the no. 1 contact
out8 = get_digital_output(8) #Reads the no. 8 contact