This flow works as needed but this is what I would like to do but can't figure out how to do it.
This flow is running on an Opto22 Rio which has some digitial inputs, I would like to hook up a switch that if High input the "Save to Text" node will work and if the input is Low the "Save to Text file does NOT function.
Is this possible? If so can someone please explain as to how I can get that done?
Store the value of the input into a context variable (e.g. global.record) then use a switch node to inhibit the msg getting to the file node based on the value of global.record
The best way to stop the file out node from writing more data is to stop sending data to the node.
You could do this with a node such as node-red-contrib-simple-gate which you can open or close. Or with a switch node which tests the value of a flow context variable.