Flow Optimization

Hello, I am trying to get some tips on how I could optimize my flow. I frequently get modbus errors and I suspect it is due to the layout of my flows.



All the 'link outs' are going to a mosquito broker.
Here are the modbus errors I receive:

2/8/2022, 4:30:57 PMnode: VFD MODBUS
msg : string[123]
"Client -> fsm failed state after sending Get More About It By Logging Serial@/dev/ttySerMod0.0:9600bit/s default Unit-Id: 1"

2/8/2022, 4:31:42 PMnode: VFD MODBUS
msg : string[122]
"Client -> fsm broken state after failed Get More About It By Logging Serial@/dev/ttySerMod0.0:9600bit/s default Unit-Id: 1"

2/8/2022, 4:31:42 PMnode: VFD MODBUS
msg : string[125]
"Client -> fsm reconnect state after broken Get More About It By Logging Serial@/dev/ttySerMod0.0:9600bit/s default Unit-Id: 1"

2/8/2022, 4:31:44 PMnode: VFD MODBUS
msg : string[97]
"Client -> fsm init state after reconnecting Serial@/dev/ttySerMod0.0:9600bit/s default Unit-Id: 1"

2/8/2022, 4:24:49 PM node: VFD MODBUS
msg : string[83]
"Client -> fsm init in 2000 ms Serial@/dev/ttySerMod0.0:9600bit/s default Unit-Id: 1"

2/8/2022, 4:31:46 PMnode: VFD MODBUS
msg : string[125]
"Client -> fsm connected after state opened Get More About It By Logging Serial@/dev/ttySerMod0.0:9600bit/s default Unit-Id: 1"

This errors occurs with various MODBUS nodes, including the nodes shown in the screenshots.

Here is one of the flows I showed a screenshot of: (It was too many characters for the plaintext)

https://github.com/AustinEcowerks/Node-Red/blob/main/Flow

I haven't looked at any of your code (as yet) and I'm not very good with modbus (fought my own battle getting mine working) however I did run into a problem you might start with. How many connections are you making to your modbus device and how many does it support?

1 Like

I'm pretty new to all of this, I've only been exposed to it for 2ish months. How can I check that?

Hi, to avoid issues with modbus it is wise not to ask for data from different addresses/units in quick consession. e.g. break up your requests so that you dont call "MB Poll" while it is busy doing another request.

This is how I would approach it...

  • Use the Link Call and a delay set to rate limit. This will minimise impact on serial port. Also, by wiring in series via the call node, you will only ever process one serial request at a time

Here is a less drastic version...

1 Like

What palette is the "Poll" node included in? And also the "Link Call"

The "poll" node is the link call node. It is built in to node-red as of v2.1 (or maybe v.2.0, I forget)

What version of node-red are you using?

1 Like

1.0.3, I have to update the firmware of the groov EPIC PLC in order to update node-red, if I understand correctly. I haven't gotten the sign off to be able to shut down and update the firmware yet.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.