HMI and plc control

Hello,
I have a simple question, is it possible to add a button on my HMI ( siemens) and by a simple click on my button it activates or desactivates a node, my HMI is controlled by a plc s7-1500.
Thanks.

doubtful :wink:

Yes, if you know how.

what does "activates or desactivates a node" really mean?
If you mean "inhibit messages reaching a node" then Yes
If you mean "enables and enables a node" then that is much harder (and not recommended)

In which case, you can set a flag or byte or integer in the PLC and then have Node-RED read its value and do what is necessary.

I meant the second option that is harder, my project is to add a button on my HMI ( already done ), and once I click on it, I start sending Data From my PLC to MYSQL, actually I've already done this part I can read data from my plc and save it on a SQL server, I just wanna control my nodered from my HMI.
and it seems impossible I guess.
Thanks for your reply.

It is perfectly possible to allow / disallow messages being sent to mysql.

  1. When PLC value is true (or 1), set a flow context variable flow.enableDatabase
  2. Add a switch node JUST BEFORE the mysql node that checks if flow.enableDatabase is true - and allow the messages to pass through to the database.

That is just one possibility. There are numerous other ways of handling this.