node-red-contrib-modbus: Using Modbus Flex Connector returns FSM Reset On State {"value":"failed","actions":[],"changed":true}
Problem
- ( ) bug report => please search github for a similar issue or PR and test Modbus problems with the modbus-serial package before submitting
- ( x ) unexpected behavior => please visit the Wiki before
Current behavior
Using ‘Modbus Flex Connector’ and ‘Modbus Flex Getter’ returns warning: FSM Reset On State {"value":"failed","actions":[],"changed":true}
. The injected Payload to ‘Modbus Flex Getter’ is:
msg.payload = {
'value':msg.payload,
'fc': 3,
'unitid': 1,
'address': 24 ,
'quantity': 1
};
return msg;
What does the warning mean? Is it serious?
I do not get any Modbus output.
Expected behavior
No warning.
Minimal reproduction of the problem with instructions
- Connect Inject, function Node and Modbus Flex Connector
- Connect Inject, function Node and Modbus Flex Getter
- Inject to Modbus Flex Connector, then to Modbus Flex Getter
Demo Flow:
[{"id":"3ba35010.8a2fa","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"e6b7f53e.5d7b18","type":"modbus-flex-connector","z":"3ba35010.8a2fa","name":"","maxReconnectsPerMinute":4,"emptyQueue":false,"showStatusActivities":false,"showErrors":true,"server":"ebc49841.242f08","x":570,"y":120,"wires":[]},{"id":"e09e1c56.55e1c8","type":"function","z":"3ba35010.8a2fa","name":"","func":"msg.payload = {\n 'connectorType': 'TCP',\n 'tcpHost': '10.0.0.81',\n 'tcpPort': '502',\n 'unitId': 2\n};\nreturn msg;","outputs":1,"noerr":0,"x":380,"y":120,"wires":[["e6b7f53e.5d7b18"]]},{"id":"1faf2d77.4fb13b","type":"inject","z":"3ba35010.8a2fa","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":240,"y":120,"wires":[["e09e1c56.55e1c8"]]},{"id":"5945e4a3.b9208c","type":"inject","z":"3ba35010.8a2fa","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":260,"y":180,"wires":[["8fe16f06.445b88"]]},{"id":"8fe16f06.445b88","type":"function","z":"3ba35010.8a2fa","name":"","func":"msg.payload = {\n 'value':msg.payload,\n 'fc': 3,\n 'unitid': 1,\n 'address': 24 ,\n 'quantity': 1\n};\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":180,"wires":[["c8c340d5.7666d8"]]},{"id":"c8c340d5.7666d8","type":"modbus-flex-getter","z":"3ba35010.8a2fa","name":"","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"server":"ebc49841.242f08","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":590,"y":180,"wires":[[],["b3c606f1.ac3178"]]},{"id":"b3c606f1.ac3178","type":"debug","z":"3ba35010.8a2fa","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":770,"y":200,"wires":[]},{"id":"ebc49841.242f08","type":"modbus-client","z":"","name":"Test","clienttype":"tcp","bufferCommands":false,"stateLogEnabled":false,"tcpHost":"10.0.0.254","tcpPort":"20502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":"1","commandDelay":"1","clientTimeout":"1000","reconnectOnTimeout":false,"reconnectTimeout":"2000","parallelUnitIdsAllowed":false}]
Your Environment
Please tell us about your environment:
-
( x ) I am using just the Node-RED package and got modbus-serial package installed with it
-
Device :
- ( x ) Node-RED Docker Image v 1.0.2
-
Description of the connecting Modbus system:
- Name : Acromag 967/8 EN
-
node-red-contrib-modbus version: v5.2.0
- Node: (min. 10.x)
node --version
= v10.16.3
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 19 (5 by maintainers)
Try to set queue to 10 ms (with commands queue checked), applied to all the flow. Then delete all the modbus nodes. Then deploy. If ok ==> add one modbus flex getter/flex write (it’s preferred to use only these two nodes). Then deploy. If ok ==> add all the other ones. Good look.
Issue disappeared!!! I don’t know why… Just gamed with queue , and ,after deleted the three Modbus flex getter buttons, put it a new one, and OK!!! bye.