here is my flow :
[{"id":"adbe2163.24b56","type":"inject","z":"63b4326b.ae226c","name":"27","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"27","payloadType":"num","x":110,"y":2740,"wires":[["cfff4d65.02371"]]},{"id":"cfff4d65.02371","type":"function","z":"63b4326b.ae226c","name":"BLINK n","func":"\nvar o = false;\nfor (var i=0; i<(msg.payload); i++) {\n node.send( {payload:+(o=!o)} )\n}\n\nreturn null;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":280,"y":2740,"wires":[["efcb931b.25d08"]]},{"id":"efcb931b.25d08","type":"switch","z":"63b4326b.ae226c","name":"","property":"vanneIndex","propertyType":"global","rules":[{"t":"lt","v":"18","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":410,"y":2740,"wires":[["69497e93.92181"]]},{"id":"69497e93.92181","type":"function","z":"63b4326b.ae226c","name":"VanneB_VanneIndex","func":"msg.topic = `ns=4;s=Arp.Plc.Eclr/VanneB_${global.get(\"vanneIndex\")}` ;\nmsg.datatype = \"Boolean\";\nmsg.browseName = `VanneB_${global.get(\"vanneIndex\")}` ;\nglobal.set(\"vanneIndex\",global.get(\"vanneIndex\") + 1)\n// if (global.get(\"vanneIndex\") == 17) {\n// global.set(\"clearVar\",1)\n// }\nreturn msg;\n// msg.topic = [\n// \"ns=4;s=Arp.Plc.Eclr/Secteur_3_P_OFF\" ,\n// \"ns=4;s=Arp.Plc.Eclr/Secteur_4_P_ON\" ,\n// \"ns=4;s=Arp.Plc.Eclr/Secteu_4_P_OFF\" ,\n// \"ns=4;s=Arp.Plc.Eclr/Secteur_5_P_ON\" \n// ] ;\n// msg.datatype = [\n// \"Boolean\" ,\n// \"Boolean\" ,\n// \"Boolean\" ,\n// \"Boolean\" \n// ] ;\n// msg.browseName = [\n// \"Secteur_3_P_OFF\" ,\n// \"Secteur_4_P_ON\" ,\n// \"Secteu_4_P_OFF\" ,\n// \"Secteur_5_P_ON\" \n// ] ;\n// return msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":600,"y":2740,"wires":[["3ad74b79.70f404"]]},{"id":"3ad74b79.70f404","type":"OpcUa-Client","z":"63b4326b.ae226c","endpoint":"19d9e7bb.ab4558","action":"readmultiple","deadbandtype":"a","deadbandvalue":1,"time":10,"timeUnit":"s","certificate":"n","localfile":"","name":"","x":800,"y":2740,"wires":[["6bef4592.be1afc"]]},{"id":"3ff82ad9.8c75b6","type":"inject","z":"63b4326b.ae226c","name":"Read multiple items","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"readmultiple","payload":"","payloadType":"str","x":590,"y":2800,"wires":[["3ad74b79.70f404"]]},{"id":"9d023b30.bdadd8","type":"inject","z":"63b4326b.ae226c","name":"Clear nodeId array","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"clearitems","payload":"","payloadType":"str","x":590,"y":2840,"wires":[["3ad74b79.70f404"]]},{"id":"6bef4592.be1afc","type":"debug","z":"63b4326b.ae226c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":990,"y":2700,"wires":[]},{"id":"19d9e7bb.ab4558","type":"OpcUa-Endpoint","z":"","endpoint":"opc.tcp://192.168.1.10:4840","secpol":"None","secmode":"None","login":false}]