question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using Modbus Flex Connector returns FSM Reset On State {"value":"failed","actions":[],"changed":true}

See original GitHub issue

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

  1. Connect Inject, function Node and Modbus Flex Connector
  2. Connect Inject, function Node and Modbus Flex Getter
  3. 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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:19 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
frankzappa82commented, Feb 13, 2020

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.

1reaction
frankzappa82commented, Feb 13, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

QIoT node-red-contrib-modbus Modbus-Flex-Getter ...
Hi there ! I'm trying to use the QNAP QIoT Suite to read values on a Modbus probe. This Suite is using NodeRed....
Read more >
How to Use Node-Red with Modbus
A quick overview of modbus nodes and how to use node-red to read ... The modbus flex getter expects you to pass the...
Read more >
7.6 - FSM Reset Condition - YouTube
You learn best from this video if you have my textbook in front of you and are following along. Get the book here:...
Read more >
Reset Finite State Machine - 3.6 English - Xilinx
The rx_startup_fsm can reset the RX side of the transceiver if data_valid is lost between receives (possibly due to cable pull up). This...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found