finsTCP
1. Host Sets FinsTCP Parameters
Command: 0x7340
Parameter List
| Parameter Name | Type | Description | Range/Format |
|---|---|---|---|
| IP | string | IP address | - |
| PLCReadAddress | string | PLC read start address | Starts with "DM" + number, range [1, 9999] |
| PLCWriteAddress | string | PLC write start address | Starts with "DM" + number, range [1, 9999] |
| craftNum | int | Process number | Range [1, 9] |
| localReadAddress | int[] | Local read start address list | Range [1, 990], first element is global bool start address, second is global int start address |
| localWriteAddress | int[] | Local write start address list | Range [1, 990], first element is global bool start address, second is global int start address |
| port | int | Port number | Range [0, 65535] |
Request Example
json
{
"IP": "192.168.1.10",
"PLCReadAddress": "DM2000",
"PLCWriteAddress": "DM1000",
"craftNum": 1,
"localReadAddress": [500, 500],
"localWriteAddress": [100, 100],
"port": 9600
}2. Host Queries FinsTCP Parameters
Command: 0x7341
Parameter List
| Parameter Name | Type | Description | Range |
|---|---|---|---|
| craftNum | int | Process number to query | Range [1, 9] |
Request Example
json
{
"craftNum": 1
}3. Controller Replies Host FinsTCP Parameters
Command: 0x7342
Parameter List
| Parameter Name | Type | Description | Range/Format |
|---|---|---|---|
| IP | string | IP address | - |
| PLCReadAddress | string | PLC read start address | Starts with "DM" + number, range [1, 9999] |
| PLCWriteAddress | string | PLC write start address | Starts with "DM" + number, range [1, 9999] |
| craftNum | int | Process number | Range [1, 9] |
| localReadAddress | int[] | Local read start address list | Range [1, 990], first element is global bool start address, second is global int start address |
| localWriteAddress | int[] | Local write start address list | Range [1, 990], first element is global bool start address, second is global int start address |
| port | int | Port number | Range [0, 65535] |
| status | int | Communication status | Range [0, 1], 0 means not connected, 1 means connected |
Response Example
json
{
"IP": "192.168.1.10",
"PLCReadAddress": "DM2000",
"PLCWriteAddress": "DM1000",
"craftNum": 1,
"localReadAddress": [500, 500],
"localWriteAddress": [100, 100],
"port": 9600,
"status": 0
}4. Host Requests Connection Communication
Command: 0x7343
Request Example
json
{}5. Host Requests Disconnect Communication
Command: 0x7344
Request Example
json
{}6. Controller Sends FinsTCP Communication Connection Status
Command: 0x7345
Parameter List
| Parameter Name | Type | Description | Range |
|---|---|---|---|
| status | int | Communication connection status | Range [0, 1], 0 means not connected, 1 means connected |
Response Example
json
{
"status": 0
}7. Controller Sends FinsTCP Opened Program Name
Command: 0x7346
Parameter List
| Parameter Name | Type | Description |
|---|---|---|
| programName | string | Opened program name |
Response Example
json
"AAA"