Instructions - I/O
DIN Digital Input
Description: Input is relative to the controller, from external to controller. Digital input instruction.
| Parameter Name | Type | Description |
|---|---|---|
| logout | bool | Whether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable |
| type | int | DIN is 17 in the enum sequence |
| userParamInt | int | Custom parameter for secondary development, currently meaningless |
| userParamString | string | Custom parameter for secondary development, currently meaningless |
| ParaGroupNum | object | Input group number; int type; range depends on total number of groups, IO board value * 16 / number of input channels |
| ParaGroupValue | object | Port value storage; variable type, global or local bool or int variable |
| groupType | string | DIN type; 1-channel input: IN#, 4-channel input: IGH#, 8-channel input: IG# |
ParaGroupNum Structure:
{"data":2.0,"secondvalue":0,"value":0,"varname":""}ParaGroupValue Structure:
{"data":0.0,"secondvalue":0,"value":1,"varname":"I001"}Example:
{
"logout": false,
"type": 17,
"userParamInt": 0,
"userParamString": "",
"ParaGroupNum": {"data": 2.0, "secondvalue": 0, "value": 0, "varname": ""},
"ParaGroupValue": {"data": 0.0, "secondvalue": 0, "value": 1, "varname": "I001"},
"groupType": "IGH#"
}DOUT Digital Output
Description: Sets the corresponding IO port on the IO board to high or low. Digital output instruction.
| Parameter Name | Type | Description |
|---|---|---|
| logout | bool | Whether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable |
| type | int | DOUT is 16 in the enum sequence |
| userParamInt | int | Custom parameter for secondary development, currently meaningless |
| userParamString | string | Custom parameter for secondary development, currently meaningless |
| ParaGroupNum | object | Output group number; int type; range depends on total number of groups, IO board value * 16 / number of output channels |
| ParaGroupValue | object | Port output value; variable type, global or local bool or int variable |
| groupType | string | DOUT type; 1-channel output: OT#, 4-channel output: OGH#, 8-channel output: OG# |
| errorHanding | int | 1: stop when timer ends, 0: hold output value |
| ParaGroupTime | object | Time; double type; range [0,9999] |
ParaGroupNum Structure:
{"data":2.0,"secondvalue":0,"value":0,"varname":""}ParaGroupValue Structure:
{"data":0.0,"secondvalue":0,"value":1,"varname":"I001"}ParaGroupTime Structure:
{"data":3.0,"secondvalue":0,"value":0,"varname":""}Example:
{
"logout": false,
"type": 16,
"userParamInt": 0,
"userParamString": "",
"ParaGroupNum": {"data": 2.0, "secondvalue": 0, "value": 0, "varname": ""},
"ParaGroupValue": {"data": 0.0, "secondvalue": 0, "value": 1, "varname": "I001"},
"errorHanding": 1,
"groupType": "OT#",
"ParaGroupTime": {"data": 3.0, "secondvalue": 0, "value": 0, "varname": ""}
}AIN Analog Input
Description: Input is relative to the controller, from external to controller. Analog input instruction.
| Parameter Name | Type | Description |
|---|---|---|
| logout | bool | Whether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable |
| type | int | AIN is 21 in the enum sequence |
| userParamInt | int | Custom parameter for secondary development, currently meaningless |
| userParamString | string | Custom parameter for secondary development, currently meaningless |
| ParaGroupValue | object | Variable value; double type |
| portId | int | Analog input port; int type; range 1 - IO board count * 2 |
ParaGroupValue Structure:
{"data":0.0,"secondvalue":0,"value":1,"varname":"D001"}Example:
{
"logout": false,
"type": 21,
"userParamInt": 0,
"userParamString": "",
"ParaGroupValue": {"data": 0.0, "secondvalue": 0, "value": 1, "varname": "D001"},
"portId": 4
}AOUT Analog Output
Description: Output is the value the controller writes to the IO board. Analog output instruction.
| Parameter Name | Type | Description |
|---|---|---|
| logout | bool | Whether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable |
| type | int | AOUT is 20 in the enum sequence |
| userParamInt | int | Custom parameter for secondary development, currently meaningless |
| userParamString | string | Custom parameter for secondary development, currently meaningless |
| ParaGroupValue | object | Variable value; double type; range [0,10] |
| portId | int | Analog output port; int type; range 1 - IO board count * 2 |
ParaGroupValue Structure:
{"data":0.0,"secondvalue":0,"value":1,"varname":"D001"}Example:
{
"logout": false,
"type": 20,
"userParamInt": 0,
"userParamString": "",
"ParaGroupValue": {"data": 0.0, "secondvalue": 0, "value": 1, "varname": "D001"},
"portId": 4
}PULSEOUT Pulse Output
Description: Outputs signals on pin 4 (PWM+) of the DB9 connector on the R1 PWMIO board according to the set pulse frequency and count.
| Parameter Name | Type | Description |
|---|---|---|
| logout | bool | Whether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable |
| type | int | PULSEOUT is 22 in the enum sequence |
| userParamInt | int | Custom parameter for secondary development, currently meaningless |
| userParamString | string | Custom parameter for secondary development, currently meaningless |
| rate | int | Frequency; int type; range [1,1000000] |
| sum | int | Count; int type; range greater than zero |
Example:
{
"logout": false,
"type": 22,
"userParamInt": 0,
"userParamString": "",
"rate": 10,
"sum": 100
}READ_DOUT Read Digital Output
Description: Reads the status of digital output ports via a variable, converts the binary value to decimal and stores it in the target variable.
| Parameter Name | Type | Description |
|---|---|---|
| logout | bool | Whether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable |
| type | int | READ_DOUT is 99 in the enum sequence |
| userParamInt | int | Custom parameter for secondary development, currently meaningless |
| userParamString | string | Custom parameter for secondary development, currently meaningless |
| ParaGroupNum | object | Output group number; int type; range depends on total number of groups, IO board value * 16 / number of output channels |
| ParaGroupValue | object | Port output value; variable type, global or local bool or int variable |
| groupType | string | DOUT type; 1-channel output: OT#, 4-channel output: OGH#, 8-channel output: OG# |
ParaGroupNum Structure:
{"data":2.0,"secondvalue":0,"value":0,"varname":""}ParaGroupValue Structure:
{"data":0.0,"secondvalue":0,"value":1,"varname":"I001"}Example:
{
"logout": false,
"type": 99,
"userParamInt": 0,
"userParamString": "",
"ParaGroupNum": {"data": 2.0, "secondvalue": 0, "value": 0, "varname": ""},
"ParaGroupValue": {"data": 0.0, "secondvalue": 0, "value": 1, "varname": "I001"},
"groupType": "IGH#"
}