Instructions - Arithmetic Operations
Addition (ADD)
Description: The sum of parameter 1 and parameter 2 is stored in the result variable
Instruction Name: ADD
| Field | Type | Description |
|---|---|---|
| desType1 | int | Type of variable 1; can only be 2 here |
| desType2 | int | Type of variable 2; can only be 2 here |
| logout | bool | Whether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable |
| paraSourceGroup | object | Result variable; int or double variable, global or local |
| paraValueGroup1 | object | Variable 1; numeric value or int/double variable, global or local |
| paraValueGroup2 | object | Variable 2; numeric value or int/double variable, global or local |
| type | int | ADD is 43 in the enum sequence |
| userParamInt | int | Custom parameter for secondary development (currently meaningless) |
| userParamString | string | Custom parameter for secondary development (currently meaningless) |
paraSourceGroup/paraValueGroup1/paraValueGroup2 Structure:
| Field | Type | Description |
|---|---|---|
| data | double | Numeric value |
| secondvalue | int | Variable type identifier |
| value | int | Variable reference identifier; 0: use data value; 1: use varname variable |
| varname | string | Variable name |
Example:
{
"desType1": 2,
"desType2": 2,
"logout": false,
"paraSourceGroup": {"data": 0.0, "secondvalue": 0, "value": 1, "varname": "I001"},
"paraValueGroup1": {"data": 2.0, "secondvalue": 0, "value": 0, "varname": ""},
"paraValueGroup2": {"data": 5.0, "secondvalue": 0, "value": 0, "varname": ""},
"type": 43,
"userParamInt": 0,
"userParamString": ""
}Subtraction (SUB)
Description: The difference of parameter 1 minus parameter 2 is stored in the result variable
Instruction Name: SUB
| Field | Type | Description |
|---|---|---|
| desType1 | int | Type of variable 1; can only be 2 here |
| desType2 | int | Type of variable 2; can only be 2 here |
| logout | bool | Whether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable |
| paraSourceGroup | object | Result variable; int or double variable, global or local |
| paraValueGroup1 | object | Variable 1; numeric value or int/double variable, global or local |
| paraValueGroup2 | object | Variable 2; numeric value or int/double variable, global or local |
| type | int | SUB is 44 in the enum sequence |
| userParamInt | int | Custom parameter for secondary development (currently meaningless) |
| userParamString | string | Custom parameter for secondary development (currently meaningless) |
paraSourceGroup/paraValueGroup1/paraValueGroup2 Structure:
| Field | Type | Description |
|---|---|---|
| data | double | Numeric value |
| secondvalue | int | Variable type identifier |
| value | int | Variable reference identifier; 0: use data value; 1: use varname variable |
| varname | string | Variable name |
Example:
{
"desType1": 2,
"desType2": 2,
"logout": false,
"paraSourceGroup": {"data": 0.0, "secondvalue": 0, "value": 1, "varname": "I001"},
"paraValueGroup1": {"data": 2.0, "secondvalue": 0, "value": 0, "varname": ""},
"paraValueGroup2": {"data": 5.0, "secondvalue": 0, "value": 0, "varname": ""},
"type": 44,
"userParamInt": 0,
"userParamString": ""
}Multiplication (MUL)
Description: The product of parameter 1 multiplied by parameter 2 is stored in the result variable
Instruction Name: MUL
| Field | Type | Description |
|---|---|---|
| desType1 | int | Type of variable 1; can only be 2 here |
| desType2 | int | Type of variable 2; can only be 2 here |
| logout | bool | Whether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable |
| paraSourceGroup | object | Result variable; int or double variable, global or local |
| paraValueGroup1 | object | Variable 1; numeric value or int/double variable, global or local |
| paraValueGroup2 | object | Variable 2; numeric value or int/double variable, global or local |
| type | int | MUL is 45 in the enum sequence |
| userParamInt | int | Custom parameter for secondary development (currently meaningless) |
| userParamString | string | Custom parameter for secondary development (currently meaningless) |
paraSourceGroup/paraValueGroup1/paraValueGroup2 Structure:
| Field | Type | Description |
|---|---|---|
| data | double | Numeric value |
| secondvalue | int | Variable type identifier |
| value | int | Variable reference identifier; 0: use data value; 1: use varname variable |
| varname | string | Variable name |
Example:
{
"desType1": 2,
"desType2": 2,
"logout": false,
"paraSourceGroup": {"data": 0.0, "secondvalue": 0, "value": 1, "varname": "I001"},
"paraValueGroup1": {"data": 2.0, "secondvalue": 0, "value": 0, "varname": ""},
"paraValueGroup2": {"data": 5.0, "secondvalue": 0, "value": 0, "varname": ""},
"type": 45,
"userParamInt": 0,
"userParamString": ""
}Division (DIV)
Description: The quotient of parameter 1 divided by parameter 2 is stored in the result variable (divisor must not be zero)
Instruction Name: DIV
| Field | Type | Description |
|---|---|---|
| desType1 | int | Type of variable 1; can only be 2 here |
| desType2 | int | Type of variable 2; can only be 2 here |
| logout | bool | Whether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable |
| paraSourceGroup | object | Result variable; int or double variable, global or local |
| paraValueGroup1 | object | Variable 1; numeric value or int/double variable, global or local |
| paraValueGroup2 | object | Variable 2; numeric value or int/double variable, global or local |
| type | int | DIV is 46 in the enum sequence |
| userParamInt | int | Custom parameter for secondary development (currently meaningless) |
| userParamString | string | Custom parameter for secondary development (currently meaningless) |
paraSourceGroup/paraValueGroup1/paraValueGroup2 Structure:
| Field | Type | Description |
|---|---|---|
| data | double | Numeric value |
| secondvalue | int | Variable type identifier |
| value | int | Variable reference identifier; 0: use data value; 1: use varname variable |
| varname | string | Variable name |
Example:
{
"desType1": 2,
"desType2": 2,
"logout": false,
"paraSourceGroup": {"data": 0.0, "secondvalue": 0, "value": 1, "varname": "I001"},
"paraValueGroup1": {"data": 2.0, "secondvalue": 0, "value": 0, "varname": ""},
"paraValueGroup2": {"data": 5.0, "secondvalue": 0, "value": 0, "varname": ""},
"type": 46,
"userParamInt": 0,
"userParamString": ""
}Modulo (MOD)
Description: Performs modulo operation and stores the result in the selected result variable
Instruction Name: MOD
| Field | Type | Description |
|---|---|---|
| desType1 | int | Type of variable 1; can only be 2 here |
| logout | bool | Whether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable |
| paraSourceGroup | object | Result variable; int variable, global or local |
| paraValueGroup1 | object | Variable 1; numeric value or int variable, global or local |
| type | int | MOD is 47 in the enum sequence |
| userParamInt | int | Custom parameter for secondary development (currently meaningless) |
| userParamString | string | Custom parameter for secondary development (currently meaningless) |
paraSourceGroup/paraValueGroup1 Structure:
| Field | Type | Description |
|---|---|---|
| data | double | Numeric value |
| secondvalue | int | Variable type identifier |
| value | int | Variable reference identifier; 0: use data value; 1: use varname variable |
| varname | string | Variable name |
Example:
{
"desType1": 2,
"logout": false,
"paraSourceGroup": {"data": 0.0, "secondvalue": 0, "value": 1, "varname": "I001"},
"paraValueGroup1": {"data": 0.0, "secondvalue": 1, "value": 1, "varname": "GI[I001]"},
"type": 47,
"userParamInt": 0,
"userParamString": ""
}Sine (SIN)
Description: Sine operation (sin), A = sin(B), where B is in radians
Instruction Name: SIN
| Field | Type | Description |
|---|---|---|
| desType1 | int | Type of variable 1; can only be 2 here |
| logout | bool | Whether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable |
| paraSourceGroup | object | Result variable; int or double variable, global or local |
| paraValueGroup1 | object | Variable 1; numeric value or int/double variable, global or local |
| type | int | SIN is 102 in the enum sequence |
| userParamInt | int | Custom parameter for secondary development (currently meaningless) |
| userParamString | string | Custom parameter for secondary development (currently meaningless) |
paraSourceGroup/paraValueGroup1 Structure:
| Field | Type | Description |
|---|---|---|
| data | double | Numeric value |
| secondvalue | int | Variable type identifier |
| value | int | Variable reference identifier; 0: use data value; 1: use varname variable |
| varname | string | Variable name |
Example:
{
"desType1": 2,
"logout": false,
"paraSourceGroup": {"data": 0.0, "secondvalue": 0, "value": 1, "varname": "I001"},
"paraValueGroup1": {"data": 0.0, "secondvalue": 1, "value": 1, "varname": "GI[I001]"},
"type": 102,
"userParamInt": 0,
"userParamString": ""
}Cosine (COS)
Description: Cosine operation (cos), A = cos(B), where B is in radians
Instruction Name: COS
| Field | Type | Description |
|---|---|---|
| desType1 | int | Type of variable 1; can only be 2 here |
| logout | bool | Whether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable |
| paraSourceGroup | object | Result variable; int or double variable, global or local |
| paraValueGroup1 | object | Variable 1; numeric value or int/double variable, global or local |
| type | int | COS is 103 in the enum sequence |
| userParamInt | int | Custom parameter for secondary development (currently meaningless) |
| userParamString | string | Custom parameter for secondary development (currently meaningless) |
paraSourceGroup/paraValueGroup1 Structure:
| Field | Type | Description |
|---|---|---|
| data | double | Numeric value |
| secondvalue | int | Variable type identifier |
| value | int | Variable reference identifier; 0: use data value; 1: use varname variable |
| varname | string | Variable name |
Example:
{
"desType1": 2,
"logout": false,
"paraSourceGroup": {"data": 0.0, "secondvalue": 0, "value": 1, "varname": "I001"},
"paraValueGroup1": {"data": 0.0, "secondvalue": 1, "value": 1, "varname": "GI[I001]"},
"type": 103,
"userParamInt": 0,
"userParamString": ""
}Arcsine (ANTN)
Description: Arcsine operation (arcsin), A = arcsin(B), where B is in radians
Instruction Name: ANTN
| Field | Type | Description |
|---|---|---|
| desType1 | int | Type of variable 1; can only be 2 here |
| logout | bool | Whether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable |
| paraSourceGroup | object | Result variable; int or double variable, global or local |
| paraValueGroup1 | object | Variable 1; numeric value or int/double variable, global or local |
| type | int | ANTN is 104 in the enum sequence |
| userParamInt | int | Custom parameter for secondary development (currently meaningless) |
| userParamString | string | Custom parameter for secondary development (currently meaningless) |
paraSourceGroup/paraValueGroup1 Structure:
| Field | Type | Description |
|---|---|---|
| data | double | Numeric value |
| secondvalue | int | Variable type identifier |
| value | int | Variable reference identifier; 0: use data value; 1: use varname variable |
| varname | string | Variable name |
Example:
{
"desType1": 2,
"logout": false,
"paraSourceGroup": {"data": 0.0, "secondvalue": 0, "value": 1, "varname": "I001"},
"paraValueGroup1": {"data": 0.0, "secondvalue": 1, "value": 1, "varname": "GI[I001]"},
"type": 104,
"userParamInt": 0,
"userParamString": ""
}Logical Operations (LOGICAL_OP)
Description: Logical operations (AND, OR, NOT)
Instruction Name: LOGICAL_OP
| Field | Type | Description |
|---|---|---|
| logicalType | int | Operation type; values: 0 (AND), 1 (OR), 2 (NOT) |
| logout | bool | Whether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable |
| paraGroupOne | object | Variable 1; int, double, bool, or IO input, global or local |
| paraGroupStore | object | Result variable; int, double, or bool, global or local |
| paraGroupTwo | object | Parameter 2; int, double, bool, or IO input, global or local |
| type | int | LOGICAL_OP is 121 in the enum sequence |
| userParamInt | int | Custom parameter for secondary development (currently meaningless) |
| userParamString | string | Custom parameter for secondary development (currently meaningless) |
paraGroupOne/paraGroupStore/paraGroupTwo Structure:
| Field | Type | Description |
|---|---|---|
| data | double | Numeric value |
| secondvalue | int | Variable type identifier |
| value | int | Variable reference identifier; 0: use data value; 1: use varname variable |
| varname | string | Variable name |
Example:
{
"logicalType": 1,
"logout": false,
"paraGroupOne": {"data": 0.0, "secondvalue": 0, "value": 1, "varname": "I003"},
"paraGroupStore": {"data": 0.0, "secondvalue": 0, "value": 1, "varname": "I001"},
"paraGroupTwo": {"data": 8.0, "secondvalue": 0, "value": 0, "varname": ""},
"type": 121,
"userParamInt": 0,
"userParamString": ""
}