Skip to content

Instructions - Variable


1. Assignment (SET)

Description

Assigns values to defined integer, floating-point, boolean, and string variables. String append instruction.

Parameter List

ParameterTypeDescription
logoutboolWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintInstruction type, value is 41
userParamIntintCustomer custom in secondary development, currently no meaning
userParamStringstringCustomer custom in secondary development, currently no meaning
variableobjectVariable; int type or bool type or double type or string type variable, global or local
variableValueobjectVariable value; manual value or bool type or int type or double type variable

variable Structure

FieldTypeDescription
varnamestringVariable name
valueintVariable value
datadoubleFloating-point data
secondvalueintBackup value

variableValue Structure

FieldTypeDescription
varnamestringVariable name
valueintVariable value
datadoubleFloating-point data
secondvalueintBackup value

Example

json
{
  "logout": false,
  "type": 41,
  "userParamInt": 0,
  "userParamString": "",
  "variable": {
    "data": 0.0,
    "secondvalue": 0,
    "value": 8,
    "varname": "I001"
  },
  "variableValue": {
    "data": 0.0,
    "secondvalue": 0,
    "value": 8,
    "varname": "GD009"
  }
}

2. Write to File (FORCESET)

Description

Stores cached data to the hard disk. During program execution, all calculations and assignment operations modify values in the cache and are not stored to system files. To force writing global numeric variables from memory to a file, the FORCESET instruction can be used.

Parameter List

ParameterTypeDescription
logoutboolWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintInstruction type, value is 42
userParamIntintCustomer custom in secondary development, currently no meaning
userParamStringstringCustomer custom in secondary development, currently no meaning
variableobjectVariable name; int type or bool type or double type, global

variable Structure

FieldTypeDescription
varnamestringVariable name
valueintVariable value
datadoubleFloating-point data
secondvalueintBackup value

Example

json
{
  "logout": false,
  "type": 42,
  "userParamInt": 0,
  "userParamString": "",
  "variable": {
    "data": 0.0,
    "secondvalue": 0,
    "value": 8,
    "varname": "GI001"
  }
}