Skip to content

Instructions - FinsTCP ​

1. Open FinsTCP Connection ​

Instruction Name: FINSTCP_OPEN

Description: Used to open a FINSTCP communication connection in run mode

Parameter List ​

Parameter NameTypeValue RangeDescription
IDint[1,9]FINSTCP master station process number
logoutbool-Whether to comment out; true: the instruction will not execute in the job file; false: not commented out, executable
typeint215Open FinsTCP Connection is 215 in the enum type list
userParamIntint-Customer-defined for secondary development, currently meaningless
userParamStringstring-Customer-defined for secondary development, currently meaningless
variableobject-Variable object, containing data, secondvalue, value, varname properties

JSON Example ​

json
{
  "ID": 5,
  "logout": false,
  "type": 215,
  "userParamInt": 0,
  "userParamString": "",
  "variable": {
    "data": 0.0,
    "secondvalue": 0,
    "value": 0,
    "varname": ""
  }
}

2. Disconnect FinsTCP Connection ​

Instruction Name: FINSTCP_CLOSE

Description: Disconnects the FINSTCP communication connection in run mode

Parameter List ​

Parameter NameTypeValue RangeDescription
IDint[1,9]FINSTCP master station process number
logoutbool-Whether to comment out; true: the instruction will not execute in the job file; false: not commented out, executable
typeint216FINSTCP_CLOSE is 216 in the enum type list
userParamIntint-Customer-defined for secondary development, currently meaningless
userParamStringstring-Customer-defined for secondary development, currently meaningless

JSON Example ​

json
{
  "ID": 9,
  "logout": false,
  "type": 216,
  "userParamInt": 0,
  "userParamString": ""
}

3. FinsTCP Connection Status ​

Instruction Name: FINSTCP_CONNECTION_STATUS

Description: Gets the FINSTCP connection status in run mode

Parameter List ​

Parameter NameTypeValue RangeDescription
IDint[1,9]FINSTCP master station process number
logoutbool-Whether to comment out; true: the instruction will not execute in the job file; false: not commented out, executable
typeint217FINSTCP_CONNECTION_STATUS is 217 in the enum type list
userParamIntint-Customer-defined for secondary development, currently meaningless
userParamStringstring-Customer-defined for secondary development, currently meaningless
variableobject-Variable object

variable Object ​

Parameter NameTypeDescription
datafloatData value
secondvalueintSecond value
valueintStatus value; 6 indicates connected
varnamestringVariable name, e.g., "GB[I001]"

Return Value Description ​

FINSTCP connection status; bool type variable or bound variable, global or local

  • true: connected
  • false: not connected

JSON Example ​

json
{
  "ID": 5,
  "logout": false,
  "type": 217,
  "userParamInt": 0,
  "userParamString": "",
  "variable": {
    "data": 0.0,
    "secondvalue": 1,
    "value": 6,
    "varname": "GB[I001]"
  }
}
🤖 AI assistants / automation: start with the Agent Development Guide and Pre-generation Checklist (Chinese); machine-readable entry: /llms.txt; plain-text version: swap .html for .md in the URL