Skip to content

Instructions - I/O


DIN Digital Input

Description: Input is relative to the controller, from external to controller. Digital input instruction.

Parameter NameTypeDescription
logoutboolWhether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable
typeintDIN is 17 in the enum sequence
userParamIntintCustom parameter for secondary development, currently meaningless
userParamStringstringCustom parameter for secondary development, currently meaningless
ParaGroupNumobjectInput group number; int type; range depends on total number of groups, IO board value * 16 / number of input channels
ParaGroupValueobjectPort value storage; variable type, global or local bool or int variable
groupTypestringDIN type; 1-channel input: IN#, 4-channel input: IGH#, 8-channel input: IG#

ParaGroupNum Structure:

json
{"data":2.0,"secondvalue":0,"value":0,"varname":""}

ParaGroupValue Structure:

json
{"data":0.0,"secondvalue":0,"value":1,"varname":"I001"}

Example:

json
{
    "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 NameTypeDescription
logoutboolWhether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable
typeintDOUT is 16 in the enum sequence
userParamIntintCustom parameter for secondary development, currently meaningless
userParamStringstringCustom parameter for secondary development, currently meaningless
ParaGroupNumobjectOutput group number; int type; range depends on total number of groups, IO board value * 16 / number of output channels
ParaGroupValueobjectPort output value; variable type, global or local bool or int variable
groupTypestringDOUT type; 1-channel output: OT#, 4-channel output: OGH#, 8-channel output: OG#
errorHandingint1: stop when timer ends, 0: hold output value
ParaGroupTimeobjectTime; double type; range [0,9999]

ParaGroupNum Structure:

json
{"data":2.0,"secondvalue":0,"value":0,"varname":""}

ParaGroupValue Structure:

json
{"data":0.0,"secondvalue":0,"value":1,"varname":"I001"}

ParaGroupTime Structure:

json
{"data":3.0,"secondvalue":0,"value":0,"varname":""}

Example:

json
{
    "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 NameTypeDescription
logoutboolWhether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable
typeintAIN is 21 in the enum sequence
userParamIntintCustom parameter for secondary development, currently meaningless
userParamStringstringCustom parameter for secondary development, currently meaningless
ParaGroupValueobjectVariable value; double type
portIdintAnalog input port; int type; range 1 - IO board count * 2

ParaGroupValue Structure:

json
{"data":0.0,"secondvalue":0,"value":1,"varname":"D001"}

Example:

json
{
    "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 NameTypeDescription
logoutboolWhether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable
typeintAOUT is 20 in the enum sequence
userParamIntintCustom parameter for secondary development, currently meaningless
userParamStringstringCustom parameter for secondary development, currently meaningless
ParaGroupValueobjectVariable value; double type; range [0,10]
portIdintAnalog output port; int type; range 1 - IO board count * 2

ParaGroupValue Structure:

json
{"data":0.0,"secondvalue":0,"value":1,"varname":"D001"}

Example:

json
{
    "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 NameTypeDescription
logoutboolWhether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable
typeintPULSEOUT is 22 in the enum sequence
userParamIntintCustom parameter for secondary development, currently meaningless
userParamStringstringCustom parameter for secondary development, currently meaningless
rateintFrequency; int type; range [1,1000000]
sumintCount; int type; range greater than zero

Example:

json
{
    "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 NameTypeDescription
logoutboolWhether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable
typeintREAD_DOUT is 99 in the enum sequence
userParamIntintCustom parameter for secondary development, currently meaningless
userParamStringstringCustom parameter for secondary development, currently meaningless
ParaGroupNumobjectOutput group number; int type; range depends on total number of groups, IO board value * 16 / number of output channels
ParaGroupValueobjectPort output value; variable type, global or local bool or int variable
groupTypestringDOUT type; 1-channel output: OT#, 4-channel output: OGH#, 8-channel output: OG#

ParaGroupNum Structure:

json
{"data":2.0,"secondvalue":0,"value":0,"varname":""}

ParaGroupValue Structure:

json
{"data":0.0,"secondvalue":0,"value":1,"varname":"I001"}

Example:

json
{
    "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#"
}