Workflow as follows:
[
{
"id": "8433851b34033b3b",
"type": "modbus-read",
"z": "1ba6b61acf69773f",
"name": "test",
"topic": "test",
"showStatusActivities": false,
"logIOActivities": false,
"showErrors": false,
"showWarnings": true,
"unitid": "0",
"dataType": "Coil",
"adr": "1",
"quantity": "1",
"rate": "1",
"rateUnit": "m",
"delayOnStart": false,
"startDelayTime": "",
"server": "b242b402bba0f67f",
"useIOFile": false,
"ioFile": "",
"useIOForPayload": false,
"emptyMsgOnFail": false,
"x": 370,
"y": 60,
"wires": [
[
"17c8a4504ad23109"
],
[]
]
},
{
"id": "17c8a4504ad23109",
"type": "debug",
"z": "1ba6b61acf69773f",
"name": "debug 6",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 600,
"y": 60,
"wires": []
},
{
"id": "f1c9a936ac0bce42",
"type": "debug",
"z": "1ba6b61acf69773f",
"name": "DO格式",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 580,
"y": 100,
"wires": []
},
{
"id": "dc61d5bb20b3e373",
"type": "modbus-getter",
"z": "1ba6b61acf69773f",
"name": "讀取用電量不足/SOC準備量不足/機組剩餘可用量不足",
"showStatusActivities": true,
"showErrors": true,
"showWarnings": true,
"logIOActivities": false,
"unitid": "0",
"dataType": "Coil",
"adr": "1",
"quantity": "1",
"server": "b242b402bba0f67f",
"useIOFile": false,
"ioFile": "",
"useIOForPayload": false,
"emptyMsgOnFail": false,
"keepMsgProperties": true,
"delayOnStart": false,
"startDelayTime": "",
"x": 220,
"y": 160,
"wires": [
[
"f1c9a936ac0bce42",
"5b83066048133419"
],
[]
]
},
{
"id": "b242b402bba0f67f",
"type": "modbus-client",
"name": "Modbus server",
"clienttype": "tcp",
"bufferCommands": true,
"stateLogEnabled": false,
"queueLogEnabled": false,
"failureLogEnabled": true,
"tcpHost": "127.0.0.1",
"tcpPort": "502",
"tcpType": "DEFAULT",
"serialPort": "/dev/ttyUSB",
"serialType": "RTU-BUFFERD",
"serialBaudrate": "9600",
"serialDatabits": "8",
"serialStopbits": "1",
"serialParity": "none",
"serialConnectionDelay": "100",
"serialAsciiResponseStartDelimiter": "0x3A",
"unit_id": "0",
"commandDelay": "1",
"clientTimeout": "1000",
"reconnectOnTimeout": false,
"reconnectTimeout": "2000",
"parallelUnitIdsAllowed": true,
"showWarnings": true,
"showLogs": true
}
]
I am using a Modbus Client Simulator to connect to the Modbus Server. Initially, I was using Modbus Read to fetch the data, but now I want to replace it with Modbus Getter. However, in my tests, only Modbus Read is detecting changes from the Modbus Server node, while Modbus Getter is not. The output is as follows:
2023/8/29 9:54:01 node: debug 6
test : msg.payload : array[8]
[true, false, false, false, false, false, false, false]
2023/8/29 9:55:01 node: debug 6
test : msg.payload : array[8]
[false, false, false, false, false, false, false, false]
thanks for your help