st-one-io / node-red-contrib-s7

A Node-RED node to interact with Siemens S7 PLCs
GNU General Public License v3.0
111 stars 58 forks source link

Large number of variables #23

Closed KarlSayle closed 6 years ago

KarlSayle commented 6 years ago

Hi all,

We are having issues with NodeRed grinding to a halt when querying a large number of variables from the PLC. The variables are imported from a CSV. Is there a 'correct' method for handling large numbers of variables?

Thanks.

gfcittolin commented 6 years ago

How many variables are you trying to read, and what kind of hardware you are running on?

KarlSayle commented 6 years ago

Hi, its around 2000 and NodeRed is currently running on an IOT2040. Just want to point out, it was never orignally the plan to have to pull out so many variables! Thanks.

gfcittolin commented 6 years ago

Oh. Maybe it's a bit too much for the hardware. As far as I know, the CPU used on IOT2000 lacks the performance bits needed to run javascript with decent performance. A colleague of mine tried to read less than half of this using Node-RED on top of IOT2000 and had also performance issues.

A possible improvement would be to put all your variables inside a single DB, and read from there. The read of contiguous memory areas are optimized and may improve the performance there. Other than this, I can't think on anything else that would make some difference. If you decrease the amount of variables, does it work normally?

P.S.: We have applications at this scale, but running on our hardware, ST-One. It's a more powerful box running Node-RED out of the box.

KarlSayle commented 6 years ago

Thanks for the feedback. The ST-One looks like a nice unit! Ill keep that in mind for next time. Ill try cutting back on the variables and see what effect it has. Thanks again.

gfcittolin commented 6 years ago

I'm closing this for now. Please let me know if you have any other issues regarding the node