Since you are reading addresses in a small area, it is far more efficient (network wise) and scalable to just read all (from 100~108) and use something like buffer-parser node to pick out the variables of interest.
Yes, by returning an array you are telling the function to output to multiple output pins. You need to return an array with array of messages to direct them all to output port 1
Steve,
Many thanks. You are spot on in your article about the slip in timing - we'd faced it.
Also we were using modbus-flex-sequencer which inherently has this sequencing issue.
Yes, we already read blocks per equipment based on our learnings in the past. In this case it is just a sample (working against ModSIM simulator) to test something else.
We have multiple equipment with address eg: EQ-1 (100 - 24 registers), EQ-2 (200 - 24 registers) and so on. So reading 24 blocks per equipment at a time. Your suggestion of passing it as a array of array helped (return [messages];))
Your suggestion on the article and here to use buffer-parser is simply awesome - checked and found them to be quite good & useful - we were coding it all the while for extracting each parameter (item)
Now for each equipment we wire flex-getter one after the other; each of them creating the payload and publishing with their own timestamp. I hope that is the correct approach.
Ideally, would like run the whole thing with a config file (say csv) for each equipment and parameter mapping address, quantity, unit, scaling, itemname, capture frequency etc. Portion of it can be automated - but I am not yet fully crafty on node-red to automate the entire flow using that. If you have some cues do prompt me in that direction.