Instructions - FinsTCP
1. Open FinsTCP Connection
Instruction Name: FINSTCP_OPEN
Description: Used to open a FINSTCP communication connection in run mode
Parameter List
| Parameter Name | Type | Value Range | Description |
|---|---|---|---|
| ID | int | [1,9] | FINSTCP master station process number |
| logout | bool | - | Whether to comment out; true: the instruction will not execute in the job file; false: not commented out, executable |
| type | int | 215 | Open FinsTCP Connection is 215 in the enum type list |
| userParamInt | int | - | Customer-defined for secondary development, currently meaningless |
| userParamString | string | - | Customer-defined for secondary development, currently meaningless |
| variable | object | - | 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 Name | Type | Value Range | Description |
|---|---|---|---|
| ID | int | [1,9] | FINSTCP master station process number |
| logout | bool | - | Whether to comment out; true: the instruction will not execute in the job file; false: not commented out, executable |
| type | int | 216 | FINSTCP_CLOSE is 216 in the enum type list |
| userParamInt | int | - | Customer-defined for secondary development, currently meaningless |
| userParamString | string | - | 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 Name | Type | Value Range | Description |
|---|---|---|---|
| ID | int | [1,9] | FINSTCP master station process number |
| logout | bool | - | Whether to comment out; true: the instruction will not execute in the job file; false: not commented out, executable |
| type | int | 217 | FINSTCP_CONNECTION_STATUS is 217 in the enum type list |
| userParamInt | int | - | Customer-defined for secondary development, currently meaningless |
| userParamString | string | - | Customer-defined for secondary development, currently meaningless |
| variable | object | - | Variable object |
variable Object
| Parameter Name | Type | Description |
|---|---|---|
| data | float | Data value |
| secondvalue | int | Second value |
| value | int | Status value; 6 indicates connected |
| varname | string | Variable name, e.g., "GB[I001]" |
Return Value Description
FINSTCP connection status; bool type variable or bound variable, global or local
true: connectedfalse: 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]"
}
}