Automatique or manual mode

#1

can you help me to create something on node red wich allows the user to chose the automatic mode or the manual mode please?

0 Likes

#2

What do you mean by automatic or manual mode?

0 Likes

#3

i mean if user choses automatic mode the states of the ouputs will be controlled by the running code, but if he choses manual mode the user will be able to control the ouputs by himself.

0 Likes

#4

People here are fairly clever however they are not psychic.

Without details we have barely anything to go on.

That said, I'll have a guess...

Use a waffle sprocket connected to the thingamebob then output that to a jimbob node - that should be enough to poll the token ring.

2 Likes

#5

This post was flagged by the community and is temporarily hidden.

0 Likes

#6

Giberish. The same as your post.

You need to post details. Perhaps a picture of what you've done so far?

Perhaps post your flow.

For example, when you say switch between automatic and manual do you mean...

Switch by a mechanical switch? A dashboard switch? A PLC input?

When you say output are you meaning a node output? PLC output? RPi output?????

Need details to help you.

Ps, chill with the swearing. It was a joke.

0 Likes

#7

i mean a dashboard switch,and it is a plc ouput, thank you.
and this what i have done so far
[{"id":"fdaddc31.48d63","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"5f379d51.ee0f24","type":"modbustcp-read","z":"fdaddc31.48d63","name":"ADAM","topic":"","dataType":"Input","adr":"0","quantity":"18","rate":"20","rateUnit":"ms","server":"abec38d3.d6d388","ieeeType":"off","ieeeBE":true,"x":50,"y":300,"wires":[["9958e0ec.6343e","487a36c4.a83ac8","762a42e9.b9e2dc","6db3ec84.3639d4","6f01a9be.8a2418","4363a5f3.caaccc","a8a5b566.cf87f8","f29ec647.865308","bfa83825.8785e8","5cd46b0c.6bbfe4","6697755e.4132ec","9d88d94f.fa2b68","6d629b2d.8d3284","ba6fba95.509178"]]},{"id":"9958e0ec.6343e","type":"function","z":"fdaddc31.48d63","name":"","func":"msg.payload=(msg.payload[0]);\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":40,"wires":[["879dc8f6.9fa468"]]},{"id":"487a36c4.a83ac8","type":"function","z":"fdaddc31.48d63","name":"","func":"if(msg.payload[0]===true){\n \n msg.payload[1]=true ;\n}\nmsg.payload=(msg.payload[1]);\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":100,"wires":[["e6c9348f.257228"]]},{"id":"f29ec647.865308","type":"function","z":"fdaddc31.48d63","name":"","func":"msg.payload=(msg.payload[6]);\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":400,"wires":[["ea3b70ae.d2799"]]},{"id":"4363a5f3.caaccc","type":"function","z":"fdaddc31.48d63","name":"","func":"msg.payload=(msg.payload[5]);\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":340,"wires":[["e59f87b4.636078"]]},{"id":"6f01a9be.8a2418","type":"function","z":"fdaddc31.48d63","name":"","func":"msg.payload=(msg.payload[4]);\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":280,"wires":[["ca1a12e3.f102b"]]},{"id":"6db3ec84.3639d4","type":"function","z":"fdaddc31.48d63","name":"","func":"if(msg.payload[0]===false){\n \n msg.payload[3]=true ;\n}\nmsg.payload=(msg.payload[3]);\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":220,"wires":[["f5a10aba.27a218"]]},{"id":"762a42e9.b9e2dc","type":"function","z":"fdaddc31.48d63","name":"","func":"if(msg.payload[0]===false){\n \n msg.payload[2]=true ;\n}\nmsg.payload=(msg.payload[2]);\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":160,"wires":[["4e66cbe7.fd75e4"]]},{"id":"a8a5b566.cf87f8","type":"function","z":"fdaddc31.48d63","name":"","func":"msg.payload=(msg.payload[7]);\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":460,"wires":[["b92ed72d.9d7c28"]]},{"id":"e6c9348f.257228","type":"ui_led","z":"fdaddc31.48d63","group":"43e98eda.b5126","order":2,"label":"ONDULEUR 1","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":730,"y":100,"wires":},{"id":"4e66cbe7.fd75e4","type":"ui_led","z":"fdaddc31.48d63","group":"ae142b35.f1efe8","order":3,"label":"GROUPE ELECTROGENE","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":730,"y":160,"wires":},{"id":"f5a10aba.27a218","type":"ui_led","z":"fdaddc31.48d63","group":"ae142b35.f1efe8","order":4,"label":"ONDULEUR 2","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":730,"y":220,"wires":},{"id":"ca1a12e3.f102b","type":"ui_led","z":"fdaddc31.48d63","group":"43e98eda.b5126","order":5,"label":"NOT USED","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":730,"y":280,"wires":},{"id":"e59f87b4.636078","type":"ui_led","z":"fdaddc31.48d63","group":"43e98eda.b5126","order":6,"label":"NOT USED","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":730,"y":340,"wires":},{"id":"b92ed72d.9d7c28","type":"ui_led","z":"fdaddc31.48d63","group":"43e98eda.b5126","order":8,"label":"NOT USED","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":730,"y":460,"wires":},{"id":"ea3b70ae.d2799","type":"ui_led","z":"fdaddc31.48d63","group":"43e98eda.b5126","order":7,"label":"NOT USED","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":730,"y":400,"wires":},{"id":"879dc8f6.9fa468","type":"ui_led","z":"fdaddc31.48d63","group":"43e98eda.b5126","order":1,"label":"STEG","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":730,"y":40,"wires":},{"id":"bfa83825.8785e8","type":"function","z":"fdaddc31.48d63","name":"control output 0","func":"msg.payload=(msg.payload[16]);\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":520,"wires":[["d01c9097.66a3d","4717facc.4fcf64"]]},{"id":"d01c9097.66a3d","type":"ui_switch","z":"fdaddc31.48d63","name":"DIGITAL UT","label":"DO0","tooltip":"","group":"9d1b873d.6b13e8","order":1,"width":"0","height":"0","passthru":false,"decouple":"true","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":450,"y":520,"wires":[["dd936d64.7251"]]},{"id":"dd936d64.7251","type":"modbustcp-write","z":"fdaddc31.48d63","name":"DO0","topic":"","dataType":"Coil","adr":"16","server":"abec38d3.d6d388","x":630,"y":520,"wires":},{"id":"2386845c.ef782c","type":"ui_switch","z":"fdaddc31.48d63","name":"DIGTAL UT","label":"DO1","tooltip":"","group":"9d1b873d.6b13e8","order":2,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":450,"y":580,"wires":[["4865f33f.890c5c"]]},{"id":"5bd9854c.3c4d5c","type":"ui_switch","z":"fdaddc31.48d63","name":"DIGITAL UT","label":"DO2","tooltip":"","group":"9d1b873d.6b13e8","order":3,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":450,"y":640,"wires":[["df7e585b.095368"]]},{"id":"70dcea11.96d184","type":"ui_switch","z":"fdaddc31.48d63","name":"DIGITAL UT","label":"DO3","tooltip":"","group":"9d1b873d.6b13e8","order":4,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":450,"y":700,"wires":[["5be3cd9a.9476b4"]]},{"id":"4da0d2cd.fdaf3c","type":"ui_switch","z":"fdaddc31.48d63","name":"DIGITAL UT","label":"DO4","tooltip":"","group":"9d1b873d.6b13e8","order":5,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":450,"y":760,"wires":[["211b4d4b.ec1a52"]]},{"id":"94909f54.44e1a","type":"ui_switch","z":"fdaddc31.48d63","name":"DIGITAL UT","label":"DO5","tooltip":"","group":"9d1b873d.6b13e8","order":6,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":450,"y":820,"wires":[["6a674a21.d587b4"]]},{"id":"5cd46b0c.6bbfe4","type":"function","z":"fdaddc31.48d63","name":"control output 1","func":"if(msg.payload[0]===false){\n \n msg.payload[17]=true ;\n}\nmsg.payload=(msg.payload[17]);\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":580,"wires":[["2386845c.ef782c","40fe6b13.78a864"]]},{"id":"6697755e.4132ec","type":"function","z":"fdaddc31.48d63","name":"control output 2","func":"msg.payload=(msg.payload[18]);\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":640,"wires":[["5bd9854c.3c4d5c","3d5bb7e6.e3df48"]]},{"id":"9d88d94f.fa2b68","type":"function","z":"fdaddc31.48d63","name":"control output 3","func":"msg.payload=(msg.payload[19]);\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":700,"wires":[["70dcea11.96d184","45c2d071.88a1e"]]},{"id":"6d629b2d.8d3284","type":"function","z":"fdaddc31.48d63","name":"control output 4","func":"msg.payload=(msg.payload[20]);\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":760,"wires":[["4da0d2cd.fdaf3c","1385dcd7.258853"]]},{"id":"ba6fba95.509178","type":"function","z":"fdaddc31.48d63","name":"control output 5","func":"msg.payload=(msg.payload[21]);\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":820,"wires":[["94909f54.44e1a","dc3cea0d.56e818"]]},{"id":"4865f33f.890c5c","type":"modbustcp-write","z":"fdaddc31.48d63","name":"DO1","topic":"","dataType":"Coil","adr":"17","server":"abec38d3.d6d388","x":630,"y":580,"wires":},{"id":"df7e585b.095368","type":"modbustcp-write","z":"fdaddc31.48d63","name":"DO2","topic":"","dataType":"Coil","adr":"18","server":"abec38d3.d6d388","x":630,"y":640,"wires":},{"id":"5be3cd9a.9476b4","type":"modbustcp-write","z":"fdaddc31.48d63","name":"DO3","topic":"","dataType":"Coil","adr":"19","server":"abec38d3.d6d388","x":630,"y":700,"wires":},{"id":"211b4d4b.ec1a52","type":"modbustcp-write","z":"fdaddc31.48d63","name":"DO4","topic":"","dataType":"Coil","adr":"20","server":"abec38d3.d6d388","x":630,"y":760,"wires":},{"id":"6a674a21.d587b4","type":"modbustcp-write","z":"fdaddc31.48d63","name":"DO5","topic":"","dataType":"Coil","adr":"21","server":"abec38d3.d6d388","x":630,"y":820,"wires":},{"id":"4717facc.4fcf64","type":"ui_led","z":"fdaddc31.48d63","group":"a106f459.a82af8","order":1,"label":"ALARME","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":770,"y":820,"wires":},{"id":"40fe6b13.78a864","type":"ui_led","z":"fdaddc31.48d63","group":"a106f459.a82af8","order":1,"label":"GE EN MARCHE","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":770,"y":860,"wires":},{"id":"3d5bb7e6.e3df48","type":"ui_led","z":"fdaddc31.48d63","group":"a106f459.a82af8","order":1,"label":"NOT USED","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":770,"y":900,"wires":},{"id":"45c2d071.88a1e","type":"ui_led","z":"fdaddc31.48d63","group":"a106f459.a82af8","order":1,"label":"NOT USED","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":770,"y":940,"wires":},{"id":"1385dcd7.258853","type":"ui_led","z":"fdaddc31.48d63","group":"a106f459.a82af8","order":1,"label":"NOT USED","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":770,"y":980,"wires":},{"id":"dc3cea0d.56e818","type":"ui_led","z":"fdaddc31.48d63","group":"a106f459.a82af8","order":1,"label":"NOT USED","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":770,"y":1020,"wires":},{"id":"abec38d3.d6d388","type":"modbustcp-server","z":"","name":"iheb","host":"172.16.1.1","port":"502","unit_id":"1","reconnecttimeout":""},{"id":"43e98eda.b5126","type":"ui_group","z":"","name":"ETAT D'ALIMENTATION STEG","tab":"43096d57.2a54e4","order":1,"disp":true,"width":"6","collapse":false},{"id":"ae142b35.f1efe8","type":"ui_group","z":"","name":"ETAT D'ALIMENTATION GE","tab":"43096d57.2a54e4","order":2,"disp":true,"width":"6","collapse":false},{"id":"9d1b873d.6b13e8","type":"ui_group","z":"","name":"CONTROLE DES SORTIES","tab":"43096d57.2a54e4","order":4,"disp":true,"width":"6","collapse":false},{"id":"a106f459.a82af8","type":"ui_group","z":"","name":"NOTIFICATION","tab":"43096d57.2a54e4","order":3,"disp":true,"width":"6","collapse":false},{"id":"43096d57.2a54e4","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

0 Likes

#8

Unfortunately your flow isn't currently importable.Please read the following post How to share code or flow json and then edit the above message.

0 Likes

#9

and my PLC is ADAM 6050

0 Likes

#10
[{"id":"fdaddc31.48d63","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"5f379d51.ee0f24","type":"modbustcp-read","z":"fdaddc31.48d63","name":"ADAM","topic":"","dataType":"Input","adr":"0","quantity":"18","rate":"20","rateUnit":"ms","server":"abec38d3.d6d388","ieeeType":"off","ieeeBE":true,"x":50,"y":300,"wires":[["9958e0ec.6343e","487a36c4.a83ac8","762a42e9.b9e2dc","6db3ec84.3639d4","6f01a9be.8a2418","4363a5f3.caaccc","a8a5b566.cf87f8","f29ec647.865308","bfa83825.8785e8","5cd46b0c.6bbfe4","6697755e.4132ec","9d88d94f.fa2b68","6d629b2d.8d3284","ba6fba95.509178"]]},{"id":"9958e0ec.6343e","type":"function","z":"fdaddc31.48d63","name":"","func":"msg.payload=(msg.payload[0]);\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":40,"wires":[["879dc8f6.9fa468"]]},{"id":"487a36c4.a83ac8","type":"function","z":"fdaddc31.48d63","name":"","func":"if(msg.payload[0]===true){\n    \n    msg.payload[1]=true ;\n}\nmsg.payload=(msg.payload[1]);\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":100,"wires":[["e6c9348f.257228"]]},{"id":"f29ec647.865308","type":"function","z":"fdaddc31.48d63","name":"","func":"msg.payload=(msg.payload[6]);\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":400,"wires":[["ea3b70ae.d2799"]]},{"id":"4363a5f3.caaccc","type":"function","z":"fdaddc31.48d63","name":"","func":"msg.payload=(msg.payload[5]);\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":340,"wires":[["e59f87b4.636078"]]},{"id":"6f01a9be.8a2418","type":"function","z":"fdaddc31.48d63","name":"","func":"msg.payload=(msg.payload[4]);\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":280,"wires":[["ca1a12e3.f102b"]]},{"id":"6db3ec84.3639d4","type":"function","z":"fdaddc31.48d63","name":"","func":"if(msg.payload[0]===false){\n    \n    msg.payload[3]=true ;\n}\nmsg.payload=(msg.payload[3]);\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":220,"wires":[["f5a10aba.27a218"]]},{"id":"762a42e9.b9e2dc","type":"function","z":"fdaddc31.48d63","name":"","func":"if(msg.payload[0]===false){\n    \n    msg.payload[2]=true ;\n}\nmsg.payload=(msg.payload[2]);\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":160,"wires":[["4e66cbe7.fd75e4"]]},{"id":"a8a5b566.cf87f8","type":"function","z":"fdaddc31.48d63","name":"","func":"msg.payload=(msg.payload[7]);\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":460,"wires":[["b92ed72d.9d7c28"]]},{"id":"e6c9348f.257228","type":"ui_led","z":"fdaddc31.48d63","group":"43e98eda.b5126","order":2,"label":"ONDULEUR 1","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":730,"y":100,"wires":[]},{"id":"4e66cbe7.fd75e4","type":"ui_led","z":"fdaddc31.48d63","group":"ae142b35.f1efe8","order":3,"label":"GROUPE ELECTROGENE","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":730,"y":160,"wires":[]},{"id":"f5a10aba.27a218","type":"ui_led","z":"fdaddc31.48d63","group":"ae142b35.f1efe8","order":4,"label":"ONDULEUR 2","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":730,"y":220,"wires":[]},{"id":"ca1a12e3.f102b","type":"ui_led","z":"fdaddc31.48d63","group":"43e98eda.b5126","order":5,"label":"NOT USED","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":730,"y":280,"wires":[]},{"id":"e59f87b4.636078","type":"ui_led","z":"fdaddc31.48d63","group":"43e98eda.b5126","order":6,"label":"NOT USED","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":730,"y":340,"wires":[]},{"id":"b92ed72d.9d7c28","type":"ui_led","z":"fdaddc31.48d63","group":"43e98eda.b5126","order":8,"label":"NOT USED","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":730,"y":460,"wires":[]},{"id":"ea3b70ae.d2799","type":"ui_led","z":"fdaddc31.48d63","group":"43e98eda.b5126","order":7,"label":"NOT USED","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":730,"y":400,"wires":[]},{"id":"879dc8f6.9fa468","type":"ui_led","z":"fdaddc31.48d63","group":"43e98eda.b5126","order":1,"label":"STEG","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":730,"y":40,"wires":[]},{"id":"bfa83825.8785e8","type":"function","z":"fdaddc31.48d63","name":"control output 0","func":"msg.payload=(msg.payload[16]);\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":520,"wires":[["d01c9097.66a3d","4717facc.4fcf64"]]},{"id":"d01c9097.66a3d","type":"ui_switch","z":"fdaddc31.48d63","name":"DIGITAL UT","label":"DO0","tooltip":"","group":"9d1b873d.6b13e8","order":1,"width":"0","height":"0","passthru":false,"decouple":"true","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":450,"y":520,"wires":[["dd936d64.7251"]]},{"id":"dd936d64.7251","type":"modbustcp-write","z":"fdaddc31.48d63","name":"DO0","topic":"","dataType":"Coil","adr":"16","server":"abec38d3.d6d388","x":630,"y":520,"wires":[]},{"id":"2386845c.ef782c","type":"ui_switch","z":"fdaddc31.48d63","name":"DIGTAL UT","label":"DO1","tooltip":"","group":"9d1b873d.6b13e8","order":2,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":450,"y":580,"wires":[["4865f33f.890c5c"]]},{"id":"5bd9854c.3c4d5c","type":"ui_switch","z":"fdaddc31.48d63","name":"DIGITAL UT","label":"DO2","tooltip":"","group":"9d1b873d.6b13e8","order":3,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":450,"y":640,"wires":[["df7e585b.095368"]]},{"id":"70dcea11.96d184","type":"ui_switch","z":"fdaddc31.48d63","name":"DIGITAL UT","label":"DO3","tooltip":"","group":"9d1b873d.6b13e8","order":4,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":450,"y":700,"wires":[["5be3cd9a.9476b4"]]},{"id":"4da0d2cd.fdaf3c","type":"ui_switch","z":"fdaddc31.48d63","name":"DIGITAL UT","label":"DO4","tooltip":"","group":"9d1b873d.6b13e8","order":5,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":450,"y":760,"wires":[["211b4d4b.ec1a52"]]},{"id":"94909f54.44e1a","type":"ui_switch","z":"fdaddc31.48d63","name":"DIGITAL UT","label":"DO5","tooltip":"","group":"9d1b873d.6b13e8","order":6,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":450,"y":820,"wires":[["6a674a21.d587b4"]]},{"id":"5cd46b0c.6bbfe4","type":"function","z":"fdaddc31.48d63","name":"control output 1","func":"if(msg.payload[0]===false){\n    \n    msg.payload[17]=true ;\n}\nmsg.payload=(msg.payload[17]);\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":580,"wires":[["2386845c.ef782c","40fe6b13.78a864"]]},{"id":"6697755e.4132ec","type":"function","z":"fdaddc31.48d63","name":"control output 2","func":"msg.payload=(msg.payload[18]);\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":640,"wires":[["5bd9854c.3c4d5c","3d5bb7e6.e3df48"]]},{"id":"9d88d94f.fa2b68","type":"function","z":"fdaddc31.48d63","name":"control output 3","func":"msg.payload=(msg.payload[19]);\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":700,"wires":[["70dcea11.96d184","45c2d071.88a1e"]]},{"id":"6d629b2d.8d3284","type":"function","z":"fdaddc31.48d63","name":"control output 4","func":"msg.payload=(msg.payload[20]);\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":760,"wires":[["4da0d2cd.fdaf3c","1385dcd7.258853"]]},{"id":"ba6fba95.509178","type":"function","z":"fdaddc31.48d63","name":"control output 5","func":"msg.payload=(msg.payload[21]);\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":820,"wires":[["94909f54.44e1a","dc3cea0d.56e818"]]},{"id":"4865f33f.890c5c","type":"modbustcp-write","z":"fdaddc31.48d63","name":"DO1","topic":"","dataType":"Coil","adr":"17","server":"abec38d3.d6d388","x":630,"y":580,"wires":[]},{"id":"df7e585b.095368","type":"modbustcp-write","z":"fdaddc31.48d63","name":"DO2","topic":"","dataType":"Coil","adr":"18","server":"abec38d3.d6d388","x":630,"y":640,"wires":[]},{"id":"5be3cd9a.9476b4","type":"modbustcp-write","z":"fdaddc31.48d63","name":"DO3","topic":"","dataType":"Coil","adr":"19","server":"abec38d3.d6d388","x":630,"y":700,"wires":[]},{"id":"211b4d4b.ec1a52","type":"modbustcp-write","z":"fdaddc31.48d63","name":"DO4","topic":"","dataType":"Coil","adr":"20","server":"abec38d3.d6d388","x":630,"y":760,"wires":[]},{"id":"6a674a21.d587b4","type":"modbustcp-write","z":"fdaddc31.48d63","name":"DO5","topic":"","dataType":"Coil","adr":"21","server":"abec38d3.d6d388","x":630,"y":820,"wires":[]},{"id":"4717facc.4fcf64","type":"ui_led","z":"fdaddc31.48d63","group":"a106f459.a82af8","order":1,"label":"ALARME","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":770,"y":820,"wires":[]},{"id":"40fe6b13.78a864","type":"ui_led","z":"fdaddc31.48d63","group":"a106f459.a82af8","order":1,"label":"GE EN MARCHE","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":770,"y":860,"wires":[]},{"id":"3d5bb7e6.e3df48","type":"ui_led","z":"fdaddc31.48d63","group":"a106f459.a82af8","order":1,"label":"NOT USED","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":770,"y":900,"wires":[]},{"id":"45c2d071.88a1e","type":"ui_led","z":"fdaddc31.48d63","group":"a106f459.a82af8","order":1,"label":"NOT USED","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":770,"y":940,"wires":[]},{"id":"1385dcd7.258853","type":"ui_led","z":"fdaddc31.48d63","group":"a106f459.a82af8","order":1,"label":"NOT USED","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":770,"y":980,"wires":[]},{"id":"dc3cea0d.56e818","type":"ui_led","z":"fdaddc31.48d63","group":"a106f459.a82af8","order":1,"label":"NOT USED","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":770,"y":1020,"wires":[]},{"id":"abec38d3.d6d388","type":"modbustcp-server","z":"","name":"iheb","host":"172.16.1.1","port":"502","unit_id":"1","reconnecttimeout":""},{"id":"43e98eda.b5126","type":"ui_group","z":"","name":"ETAT D'ALIMENTATION STEG","tab":"43096d57.2a54e4","order":1,"disp":true,"width":"6","collapse":false},{"id":"ae142b35.f1efe8","type":"ui_group","z":"","name":"ETAT D'ALIMENTATION GE","tab":"43096d57.2a54e4","order":2,"disp":true,"width":"6","collapse":false},{"id":"9d1b873d.6b13e8","type":"ui_group","z":"","name":"CONTROLE DES SORTIES","tab":"43096d57.2a54e4","order":4,"disp":true,"width":"6","collapse":false},{"id":"a106f459.a82af8","type":"ui_group","z":"","name":"NOTIFICATION","tab":"43096d57.2a54e4","order":3,"disp":true,"width":"6","collapse":false},{"id":"43096d57.2a54e4","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]
0 Likes

#11

So

Are you able to write to the PLC from node red?

If so, why not use a button to toggle context flag then send that to a bit in the PLC?

Or use a toggle button and send the value to PLC?

Or add a drop down with 2 options auto and manual, one of them options having a value of 1 or true, and the other option 0 or false. Write that to the flag / bit in the PLC that means Auto or Manual mode.

Quite a few ways off the top of my head.

I don't have to ability to load your flow at the moment so perhaps give one of my ideas a go and if you get stuck, post back with what you did and where you failed.

0 Likes

#12

yes im able to write to the PLC by this MODBUS TCP/IP, and i will try everything you said thank you very much for helping me.

1 Like