Skip to content

Instructions - Network Communication


Send Data

Description: Sends string messages or variable values to network devices

Instruction Name: SENDMSG

ParameterDescriptionTypeValue Range
IDProcess numberint[1-9]
logoutWhether commented out, true: this instruction will not be executed in the job file; false: not commented, executablebool-
sendCharCharacter message to sendstring-
typeSend data is 94 in the enumeration sequence typeint94
userParamIntCustomer custom in secondary development, currently no meaningint-
userParamStringCustomer custom in secondary development, currently no meaningstring-

JSON Example:

json
{
  "ID": 7,
  "logout": false,
  "sendChar": "UUUUUU",
  "type": 94,
  "userParamInt": 0,
  "userParamString": ""
}

Parse Data

Description: This instruction is used to parse a set of data from an external device and store the data into multiple variables

Instruction Name: PARSEMSG

ParameterDescriptionTypeValue Range
IDProcess numberint[1-9]
clearCacheWhether to clear the buffer after parsing, 0: no, 1: yesint[0,1]
dataStorageRecords the count of extracted data; manual int type value 0 or int type variable, global or local; manual value 0 means not recording the count of extracted dataobject-
dataVariableFirst storage position for queried data; int type or double type or string type variable, global or localobject-
logoutWhether commented out, true: this instruction will not be executed in the job file; false: not commented, executablebool-
typeParse data is 96 in the enumeration sequence typeint96
userParamIntCustomer custom in secondary development, currently no meaningint-
userParamStringCustomer custom in secondary development, currently no meaningstring-

JSON Example:

json
{
  "ID": 3,
  "clearCache": 1,
  "dataStorage": {
    "data": 0.0,
    "secondvalue": 0,
    "value": 4,
    "varname": "GI009"
  },
  "dataVariable": {
    "data": 0.0,
    "secondvalue": 1,
    "value": 5,
    "varname": "GD[GI001]"
  },
  "logout": false,
  "type": 96,
  "userParamInt": 0,
  "userParamString": ""
}

Read

Description: Reads points sent via Ethernet or Modbus communication and stores the points into variables

Instruction Name: READCOMM

ParameterDescriptionTypeValue Range
IDProcess numberint[1-9]
commTypeCommunication method, 0: ETHERNET communication, 1: MODBUS communicationint[0,1]
logoutWhether commented out, true: this instruction will not be executed in the job file; false: not commented, executablebool-
m_varnamePoint storage count; int type variable, global or localstring-
positionIdFirst point storage variable; P: point local variable, GP: point global variablestring-
typeRead is 110 in the enumeration sequence typeint110
userParamIntCustomer custom in secondary development, currently no meaningint-
userParamStringCustomer custom in secondary development, currently no meaningstring-

JSON Example:

json
{
  "ID": 6,
  "commType": 1,
  "logout": false,
  "m_varname": "I001",
  "positionId": "GP0001",
  "type": 110,
  "userParamInt": 0,
  "userParamString": ""
}

Open Data

Description: Opens network communication

Instruction Name: OPENMSG

ParameterDescriptionTypeValue Range
IDProcess number connected during TCP communicationint[1-9]
logoutWhether commented out, true: this instruction will not be executed in the job file; false: not commented, executablebool-
typeRead is 115 in the enumeration sequence typeint115
userParamIntCustomer custom in secondary development, currently no meaningint-
userParamStringCustomer custom in secondary development, currently no meaningstring-

JSON Example:

json
{
  "ID": 5,
  "logout": false,
  "type": 115,
  "userParamInt": 0,
  "userParamString": ""
}

Close Data

Description: Closes network communication

Instruction Name: CLOSEMSG

ParameterDescriptionTypeValue Range
IDProcess number connected during TCP communicationint[1-9]
logoutWhether commented out, true: this instruction will not be executed in the job file; false: not commented, executablebool-
typeClose data is 116 in the enumeration sequence typeint116
userParamIntCustomer custom in secondary development, currently no meaningint-
userParamStringCustomer custom in secondary development, currently no meaningstring-

JSON Example:

json
{
  "ID": 7,
  "logout": false,
  "type": 116,
  "userParamInt": 0,
  "userParamString": ""
}

Description: Outputs defined message content by printing a prompt bar

Instruction Name: PRINTMSG

ParameterDescriptionTypeValue Range
logoutWhether commented out, true: this instruction will not be executed in the job file; false: not commented, executablebool-
printCharOutput charactersstring-
printTypeOutput message type, 0: message, 1: warning, 2: errorint[0,2]
typePrint message is 120 in the enumeration sequence typeint120
userParamIntCustomer custom in secondary development, currently no meaningint-
userParamStringCustomer custom in secondary development, currently no meaningstring-

JSON Example:

json
{
  "logout": false,
  "printChar": "test message",
  "printType": 2,
  "type": 120,
  "userParamInt": 0,
  "userParamString": ""
}

Get Message Connection Status

Description: Gets the connection status of a process number in the network settings

Instruction Name: MSG_CONNECTION_STATUS

ParameterDescriptionTypeValue Range
IDProcess number connected during TCP communicationint[1-9]
logoutWhether commented out, true: this instruction will not be executed in the job file; false: not commented, executablebool-
typeGet message connection status is 95 in the enumeration sequence typeint95
userParamIntCustomer custom in secondary development, currently no meaningint-
userParamStringCustomer custom in secondary development, currently no meaningstring-
variableStatus storage variable name; bool type variable, global or localobject-

JSON Example:

json
{
  "ID": 5,
  "logout": false,
  "type": 95,
  "userParamInt": 0,
  "userParamString": "",
  "variable": {
    "data": 0.0,
    "secondvalue": 1,
    "value": 6,
    "varname": "GB[GI001]"
  }
}