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

Added my changes to the code #66

Closed Thomas-Oliv closed 3 years ago

Thomas-Oliv commented 4 years ago

Hi, this is my first time really using github so sorry If I made I mistake during the pull request. Your library for node red is awesome but I felt like the s7-in node was lacking in features, specifically towards handshaking between the PLC and the reader/writer. I added another option so that several values can be sent at once at the update of only a single value. When the selected value which I refer to as the flag is changed, all the variables within the configuration node for that node are sent. Rather than those values being in msg.payload, I moved them to msg.values and I kept msg.payload reserved to store the value of the flag, although this could be reversed. Let me know if you guys need anything else from me.

Thanks,

AverageWeeaboo

gfcittolin commented 3 years ago

Hi, thanks for your contribution. What you're trying to achieve can be easily done in Node-RED itself by using a change node, so I see no need to implement this logic in the node itself. As an open source good practice, I'd also recommend to open an issue before such changes, so we can discuss what is the best approach, before spending precious time in development.

Let me know if I missed any point there!