Skip to content

Instructions - Arithmetic Operations


Addition (ADD)

Description: The sum of parameter 1 and parameter 2 is stored in the result variable

Instruction Name: ADD

FieldTypeDescription
desType1intType of variable 1; can only be 2 here
desType2intType of variable 2; can only be 2 here
logoutboolWhether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable
paraSourceGroupobjectResult variable; int or double variable, global or local
paraValueGroup1objectVariable 1; numeric value or int/double variable, global or local
paraValueGroup2objectVariable 2; numeric value or int/double variable, global or local
typeintADD is 43 in the enum sequence
userParamIntintCustom parameter for secondary development (currently meaningless)
userParamStringstringCustom parameter for secondary development (currently meaningless)

paraSourceGroup/paraValueGroup1/paraValueGroup2 Structure:

FieldTypeDescription
datadoubleNumeric value
secondvalueintVariable type identifier
valueintVariable reference identifier; 0: use data value; 1: use varname variable
varnamestringVariable name

Example:

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

FieldTypeDescription
desType1intType of variable 1; can only be 2 here
desType2intType of variable 2; can only be 2 here
logoutboolWhether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable
paraSourceGroupobjectResult variable; int or double variable, global or local
paraValueGroup1objectVariable 1; numeric value or int/double variable, global or local
paraValueGroup2objectVariable 2; numeric value or int/double variable, global or local
typeintSUB is 44 in the enum sequence
userParamIntintCustom parameter for secondary development (currently meaningless)
userParamStringstringCustom parameter for secondary development (currently meaningless)

paraSourceGroup/paraValueGroup1/paraValueGroup2 Structure:

FieldTypeDescription
datadoubleNumeric value
secondvalueintVariable type identifier
valueintVariable reference identifier; 0: use data value; 1: use varname variable
varnamestringVariable name

Example:

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

FieldTypeDescription
desType1intType of variable 1; can only be 2 here
desType2intType of variable 2; can only be 2 here
logoutboolWhether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable
paraSourceGroupobjectResult variable; int or double variable, global or local
paraValueGroup1objectVariable 1; numeric value or int/double variable, global or local
paraValueGroup2objectVariable 2; numeric value or int/double variable, global or local
typeintMUL is 45 in the enum sequence
userParamIntintCustom parameter for secondary development (currently meaningless)
userParamStringstringCustom parameter for secondary development (currently meaningless)

paraSourceGroup/paraValueGroup1/paraValueGroup2 Structure:

FieldTypeDescription
datadoubleNumeric value
secondvalueintVariable type identifier
valueintVariable reference identifier; 0: use data value; 1: use varname variable
varnamestringVariable name

Example:

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

FieldTypeDescription
desType1intType of variable 1; can only be 2 here
desType2intType of variable 2; can only be 2 here
logoutboolWhether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable
paraSourceGroupobjectResult variable; int or double variable, global or local
paraValueGroup1objectVariable 1; numeric value or int/double variable, global or local
paraValueGroup2objectVariable 2; numeric value or int/double variable, global or local
typeintDIV is 46 in the enum sequence
userParamIntintCustom parameter for secondary development (currently meaningless)
userParamStringstringCustom parameter for secondary development (currently meaningless)

paraSourceGroup/paraValueGroup1/paraValueGroup2 Structure:

FieldTypeDescription
datadoubleNumeric value
secondvalueintVariable type identifier
valueintVariable reference identifier; 0: use data value; 1: use varname variable
varnamestringVariable name

Example:

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

FieldTypeDescription
desType1intType of variable 1; can only be 2 here
logoutboolWhether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable
paraSourceGroupobjectResult variable; int variable, global or local
paraValueGroup1objectVariable 1; numeric value or int variable, global or local
typeintMOD is 47 in the enum sequence
userParamIntintCustom parameter for secondary development (currently meaningless)
userParamStringstringCustom parameter for secondary development (currently meaningless)

paraSourceGroup/paraValueGroup1 Structure:

FieldTypeDescription
datadoubleNumeric value
secondvalueintVariable type identifier
valueintVariable reference identifier; 0: use data value; 1: use varname variable
varnamestringVariable name

Example:

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

FieldTypeDescription
desType1intType of variable 1; can only be 2 here
logoutboolWhether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable
paraSourceGroupobjectResult variable; int or double variable, global or local
paraValueGroup1objectVariable 1; numeric value or int/double variable, global or local
typeintSIN is 102 in the enum sequence
userParamIntintCustom parameter for secondary development (currently meaningless)
userParamStringstringCustom parameter for secondary development (currently meaningless)

paraSourceGroup/paraValueGroup1 Structure:

FieldTypeDescription
datadoubleNumeric value
secondvalueintVariable type identifier
valueintVariable reference identifier; 0: use data value; 1: use varname variable
varnamestringVariable name

Example:

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

FieldTypeDescription
desType1intType of variable 1; can only be 2 here
logoutboolWhether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable
paraSourceGroupobjectResult variable; int or double variable, global or local
paraValueGroup1objectVariable 1; numeric value or int/double variable, global or local
typeintCOS is 103 in the enum sequence
userParamIntintCustom parameter for secondary development (currently meaningless)
userParamStringstringCustom parameter for secondary development (currently meaningless)

paraSourceGroup/paraValueGroup1 Structure:

FieldTypeDescription
datadoubleNumeric value
secondvalueintVariable type identifier
valueintVariable reference identifier; 0: use data value; 1: use varname variable
varnamestringVariable name

Example:

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

FieldTypeDescription
desType1intType of variable 1; can only be 2 here
logoutboolWhether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable
paraSourceGroupobjectResult variable; int or double variable, global or local
paraValueGroup1objectVariable 1; numeric value or int/double variable, global or local
typeintANTN is 104 in the enum sequence
userParamIntintCustom parameter for secondary development (currently meaningless)
userParamStringstringCustom parameter for secondary development (currently meaningless)

paraSourceGroup/paraValueGroup1 Structure:

FieldTypeDescription
datadoubleNumeric value
secondvalueintVariable type identifier
valueintVariable reference identifier; 0: use data value; 1: use varname variable
varnamestringVariable name

Example:

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

FieldTypeDescription
logicalTypeintOperation type; values: 0 (AND), 1 (OR), 2 (NOT)
logoutboolWhether commented out; true: the instruction will not be executed in the job file; false: not commented out, executable
paraGroupOneobjectVariable 1; int, double, bool, or IO input, global or local
paraGroupStoreobjectResult variable; int, double, or bool, global or local
paraGroupTwoobjectParameter 2; int, double, bool, or IO input, global or local
typeintLOGICAL_OP is 121 in the enum sequence
userParamIntintCustom parameter for secondary development (currently meaningless)
userParamStringstringCustom parameter for secondary development (currently meaningless)

paraGroupOne/paraGroupStore/paraGroupTwo Structure:

FieldTypeDescription
datadoubleNumeric value
secondvalueintVariable type identifier
valueintVariable reference identifier; 0: use data value; 1: use varname variable
varnamestringVariable name

Example:

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