PLCnext on LinkedInPLCnext on Instagram  PLCnext on YouTube Github PLCnext CommunityStore PLCnext Community

 

 How to create a Blog Entry

How to send a mail via Node-Red

To be able to follow this blog, you must have alreday installe the OPC-UA inside Node-Red.

Then, it will be possible to send a mail, with a command from the PLC (xSend) including a variable message (strText).

Here are the 2 variables of the AXC F 2152 which will be used and accessible by OPC UA :

1

OPC option must be checked.

In the Node-Red flow, insert this code :

2

The ‘debug’ output are just for help.

First, you need to access to the OPC variables, and scan each 5 seconds their value.

3

Wait for the OPC UA server responses :

4

To get the value of xSend

5

If xSend = True, extract the strText

6

Then send the message to a defined mail adress :

7

Of course, you have to adapt the name of the server, mail adress, etc…

Then, you will just need to define the text to send in strText in the AXC F 2152 and set xSend to TRUE.

It is of course necessary to reset xSend. For this, the second part of the flow is used :

Cyclically, set xSend to FALSE :

8

Send the value to the OPC UA server :

9

10 permit to control the write process.

10permits to send the mail from Node-Red, for test, for example. It sets xSend to TRUE.

 

Here is the code of the flow for firmware v1.x (click the triangle).
[
{
"id": "d35d5c3c.16ca7",
"type": "tab",
"label": "Send Mail",
"disabled": false,
"info": ""
},
{
"id": "a417b066.f07e6",
"type": "OPCUA-IIoT-Inject",
"z": "d35d5c3c.16ca7",
"injectType": "read",
"payload": "",
"payloadType": "date",
"topic": "",
"repeat": "5",
"crontab": "",
"once": false,
"startDelay": "",
"name": "",
"addressSpaceItems": [
{
"name": "xSend",
"nodeId": "ns=4;s=Arp.Plc.Eclr/MainInstance:xSend",
"datatypeName": ""
},
{
"name": "",
"nodeId": "ns=4;s=Arp.Plc.Eclr/MainInstance:strText",
"datatypeName": ""
}
],
"x": 230,
"y": 260,
"wires": [
[
"19ec98c.8b95567"
]
]
},
{
"id": "7fa00122.04423",
"type": "debug",
"z": "d35d5c3c.16ca7",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"x": 1210,
"y": 120,
"wires": []
},
{
"id": "6127de4a.84662",
"type": "debug",
"z": "d35d5c3c.16ca7",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload[0].value",
"x": 1260,
"y": 160,
"wires": []
},
{
"id": "a0ccf188.25283",
"type": "comment",
"z": "d35d5c3c.16ca7",
"name": "Lecture texte à envoyer",
"info": "",
"x": 160,
"y": 80,
"wires": []
},
{
"id": "84cb685c.e42538",
"type": "change",
"z": "d35d5c3c.16ca7",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload[1].value",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1000,
"y": 260,
"wires": [
[
"bf1e6f8f.b43d8",
"7fa00122.04423",
"6127de4a.84662"
]
]
},
{
"id": "bf1e6f8f.b43d8",
"type": "e-mail",
"z": "d35d5c3c.16ca7",
"server": "smtp.gmail.com",
"port": "465",
"secure": true,
"name": "This email address is being protected from spambots. You need JavaScript enabled to view it.",
"dname": "Mail depuis node Red",
"x": 1220,
"y": 260,
"wires": []
},
{
"id": "19ec98c.8b95567",
"type": "OPCUA-IIoT-Read",
"z": "d35d5c3c.16ca7",
"attributeId": "13",
"maxAge": 1,
"depth": 1,
"connector": "626ceb71.fa9014",
"name": "Look at xSend",
"justValue": true,
"showStatusActivities": true,
"showErrors": true,
"parseStrings": false,
"historyDays": "",
"x": 400,
"y": 260,
"wires": [
[
"105cbdfe.da7492"
]
]
},
{
"id": "105cbdfe.da7492",
"type": "OPCUA-IIoT-Response",
"z": "d35d5c3c.16ca7",
"name": "",
"compressStructure": true,
"showStatusActivities": true,
"showErrors": true,
"activateUnsetFilter": false,
"activateFilters": false,
"negateFilter": false,
"filters": [],
"x": 590,
"y": 260,
"wires": [
[
"5297841f.927fec",
"1456a43.819955c",
"72f252c2.58f50c"
]
]
},
{
"id": "5297841f.927fec",
"type": "debug",
"z": "d35d5c3c.16ca7",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload[1].value",
"x": 900,
"y": 440,
"wires": []
},
{
"id": "1456a43.819955c",
"type": "switch",
"z": "d35d5c3c.16ca7",
"name": "Test xSend",
"property": "payload[0].value",
"propertyType": "msg",
"rules": [
{
"t": "true"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 810,
"y": 260,
"wires": [
[
"84cb685c.e42538",
"785029ef.0c5c48"
]
]
},
{
"id": "72f252c2.58f50c",
"type": "debug",
"z": "d35d5c3c.16ca7",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload[0].value",
"x": 900,
"y": 380,
"wires": []
},
{
"id": "785029ef.0c5c48",
"type": "debug",
"z": "d35d5c3c.16ca7",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload[0].value",
"x": 940,
"y": 320,
"wires": []
},
{
"id": "c1606c74.2cbdc",
"type": "OPCUA-IIoT-Inject",
"z": "d35d5c3c.16ca7",
"injectType": "write",
"payload": "false",
"payloadType": "bool",
"topic": "",
"repeat": "5",
"crontab": "",
"once": false,
"startDelay": "",
"name": "",
"addressSpaceItems": [
{
"name": "xSend",
"nodeId": "ns=4;s=Arp.Plc.Eclr/MainInstance:xSend",
"datatypeName": "Boolean"
}
],
"x": 150,
"y": 840,
"wires": [
[
"8ade696b.6cc148"
]
]
},
{
"id": "8ade696b.6cc148",
"type": "OPCUA-IIoT-Write",
"z": "d35d5c3c.16ca7",
"connector": "626ceb71.fa9014",
"name": "Control xSend",
"justValue": true,
"showStatusActivities": false,
"showErrors": true,
"x": 360,
"y": 840,
"wires": [
[
"fcb3a665.c8ce98"
]
]
},
{
"id": "fcb3a665.c8ce98",
"type": "OPCUA-IIoT-Response",
"z": "d35d5c3c.16ca7",
"name": "",
"compressStructure": false,
"showStatusActivities": false,
"showErrors": false,
"activateUnsetFilter": false,
"activateFilters": false,
"negateFilter": false,
"filters": [],
"x": 560,
"y": 840,
"wires": [
[
"205cfbb9.8ba974"
]
]
},
{
"id": "205cfbb9.8ba974",
"type": "debug",
"z": "d35d5c3c.16ca7",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"x": 730,
"y": 840,
"wires": []
},
{
"id": "fcaacf6d.574ba",
"type": "OPCUA-IIoT-Inject",
"z": "d35d5c3c.16ca7",
"injectType": "write",
"payload": "true",
"payloadType": "bool",
"topic": "",
"repeat": "",
"crontab": "",
"once": false,
"startDelay": "",
"name": "",
"addressSpaceItems": [
{
"name": "xSend",
"nodeId": "ns=4;s=Arp.Plc.Eclr/MainInstance:xSend",
"datatypeName": "Boolean"
}
],
"x": 170,
"y": 900,
"wires": [
[
"8ade696b.6cc148"
]
]
},
{
"id": "ef302fdf.a0388",
"type": "comment",
"z": "d35d5c3c.16ca7",
"name": "controle xSend",
"info": "",
"x": 180,
"y": 800,
"wires": []
},
{
"id": "626ceb71.fa9014",
"type": "OPCUA-IIoT-Connector",
"z": "",
"discoveryUrl": "",
"endpoint": "opc.tcp://127.0.0.1:4840",
"keepSessionAlive": true,
"loginEnabled": false,
"securityPolicy": "Basic128Rsa15",
"securityMode": "SIGNANDENCRYPT",
"name": "LOCAL SERVER",
"showErrors": true,
"individualCerts": false,
"publicCertificateFile": "",
"privateKeyFile": "",
"defaultSecureTokenLifetime": "",
"endpointMustExist": false,
"autoSelectRightEndpoint": false,
"strategyMaxRetry": "",
"strategyInitialDelay": "",
"strategyMaxDelay": "",
"strategyRandomisationFactor": "",
"requestedSessionTimeout": "",
"connectionStartDelay": "",
"reconnectDelay": "",
"maxBadSessionRequests": "10"
}
]

With the new firmware version 2019.0, it is now impossible to write a value from node-Red to an OPC UA OutPort.

So, here is a new flow using xSend and xSent as variables to send the mail and to inform the AXC F 2152 that the mail has been sent (click the triangle).
[{
    "id":"10110044.30b59",
    "type": "tab",
    "label": "Send Mail",
    "disabled": false,
    "info": ""
},
{
    "id": "d0cb2109.ab173",
    "type": "OPCUA-IIoT-Inject",
    "z": "10110044.30b59",
    "injectType": "read",
    "payload": "",
    "payloadType": "date",
    "topic": "", 
    "repeat": "5",
    "crontab": "",
    "once": false,
    "startDelay": "",
    "name": "Scan xSend ...",
    "addressSpaceItems": 
        [{
            "name": "xSend",
            "nodeId": "ns=5;s=Arp.Plc.Eclr/MainInstance.xSend",
            "datatypeName": ""
        },
        {
            "name": "",
            "nodeId": "ns=5;s=Arp.Plc.Eclr/MainInstance.strText",
            "datatypeName": ""
        },
        {
            "name": "",
            "nodeId": "ns=5;s=Arp.Plc.Eclr/MainInstance.xSent",
            "datatypeName": ""
        },
        {
            "name": "",
            "nodeId": "ns=5;s=Arp.Plc.Eclr/MainInstance.strMailTo",
            "datatypeName": ""
        },
        {
            "name": "",
            "nodeId": "ns=5;s=Arp.Plc.Eclr/MainInstance.strMailCC",
            "datatypeName": ""
        },
        {
            "name": "",
            "nodeId": "ns=5;s=Arp.Plc.Eclr/MainInstance.strMailBCC",
            "datatypeName": ""
        }],
    "x": 194,
    "y": 257.9999990463257,
    "wires": [["4c0f65aa.553d3c"]]
},
{
    "id": "e3f86348.7ae06",
    "type": "comment",
    "z": "10110044.30b59",
    "name": "Read text to submit",
    "info": "",
    "x": 160,
    "y": 80,
    "wires":[]
},
{
    "id": "33c9ab4f.6e6904",
    "type": "change",
    "z": "10110044.30b59",
    "name": "copy strText in Mail",
    "rules": 
        [{
            "t": "set",
            "p": "to",
            "pt": "msg",
            "to": "payload[3].value",
            "tot": "msg"
        },
        {
            "t": "set",
            "p": "cc",
            "pt": "msg",
            "to": "payload[4].value",
            "tot":"msg"
        },
        {
            "t": "set",
            "p": "bcc",
            "pt": "msg",
            "to": "payload[5].value",
            "tot": "msg"
        },
        {
            "t": "set",
            "p": "payload",
            "pt": "msg",
            "to": "payload[1].value",
            "tot": "msg"
        }],
    "action": "",
    "property": "",
    "from": "",
    "to": "",
    "reg": false,
    "x": 1309.0000228881836,
    "y": 255.00000953674316,
    "wires":[["ab1624f6.a3f398","7518e5a1.a4f6bc","4b371b6a.c3f7c4"]]
},
{
    "id": "ab1624f6.a3f398",
    "type": "e-mail",
    "z": "10110044.30b59",
    "server": "smtp.gmail.com",
    "port": "465",
    "secure": true,
    "name": "",
    "dname": "Sending mail",
    "x": 1550.0000953674316,
    "y": 254.00000953674316,
    "wires": []
},
{
    "id": "4c0f65aa.553d3c",
    "type": "OPCUA-IIoT-Read",
    "z": "10110044.30b59",
    "attributeId": "13",
    "maxAge": 1,
    "depth": 1,
    "connector": "21582029.3743a",
    "name": "...in the local server",
    "justValue": true,
    "showStatusActivities": true,
    "showErrors": true,
    "parseStrings": false,
    "historyDays": "",
    "x": 400,
    "y": 256.9999990463257,
    "wires": [["8b5a0cd8.fb222"]]
},
{
    "id":"8b5a0cd8.fb222",
    "type":"OPCUA-IIoT-Response",
    "z":"10110044.30b59",
    "name":"Wait for answer",
    "compressStructure":true,
    "showStatusActivities":true,
    "showErrors":true,
    "activateUnsetFilter":false,
    "activateFilters":false,
    "negateFilter":false,
    "filters":[],
    "x":629.9999961853027,
    "y":255.99999809265137,
    "wires":[["4abaa77f.5c3dc8","7c7aec60.dd4ea4","abdef645.a4af28"]]
},
{
    "id":"4abaa77f.5c3dc8",
    "type":"switch",
    "z":"10110044.30b59",
    "name":"Test xSend = true",
    "property":"payload[0].value",
    "propertyType":"msg",
    "rules":[{"t":"true"}],
    "checkall":"true",
    "repair":false,
    "outputs":1,
    "x":839,
    "y":257.99999809265137,
    "wires":[["6198d7d9.ae24f8"]]
},
{
    "id":"7518e5a1.a4f6bc",
    "type":"OPCUA-IIoT-Node",
    "z":"10110044.30b59",
    "injectType":"write",
    "nodeId":"ns=5;s=Arp.Plc.Eclr/MainInstance.xSent",
    "datatype":"Boolean",
    "value":"true",
    "name":"Set xSent = true",
    "topic":"",
    "showErrors":false,
    "x":1556.886817932129,
    "y":303.45702934265137,
    "wires":[["e7f659ad.f856d8"]]
},
{
    "id":"e7f659ad.f856d8",
    "type":"OPCUA-IIoT-Write",
    "z":"10110044.30b59",
    "connector":"21582029.3743a",
    "name":"send to local server",
    "justValue":true,
    "showStatusActivities":true,
    "showErrors":true,
    "x":1807.0199127197266,
    "y":434.0039281845093,
    "wires":[["17416cc1.3e6113"]]
},
{
    "id":"17416cc1.3e6113",
    "type":"OPCUA-IIoT-Response",
    "z":"10110044.30b59",
    "name":"Wait for answer",
    "compressStructure":false,
    "showStatusActivities":false,
    "showErrors":false,
    "activateUnsetFilter":false,
    "activateFilters":false,
    "negateFilter":false,
    "filters":[],
    "x":2036.020004272461,
    "y":434.003981590271,
    "wires":[["33609b88.7c4cc4"]]
},
{
    "id":"33609b88.7c4cc4",
    "type":"debug",
    "z":"10110044.30b59",
    "name":"",
    "active":false,
    "tosidebar":true,
    "console":false,
    "tostatus":false,
    "complete":"true",
    "x":2223.020030975342,
    "y":434.0039348602295,
    "wires":[]
},
{
    "id":"6198d7d9.ae24f8",
    "type":"switch",
    "z":"10110044.30b59",
    "name":"Test xSent = false",
    "property":"payload[2].value",
    "propertyType":"msg",
    "rules":[{"t":"false"}],
    "checkall":"true",
    "repair":false,
    "outputs":1,
    "x":1075.0195999145508,
    "y":258.00392723083496,
    "wires":[["33c9ab4f.6e6904"]]
},
{
    "id":"e4f13e7.aeee0c",
    "type":"OPCUA-IIoT-Node",
    "z":"10110044.30b59",
    "injectType":"write",
    "nodeId":"ns=5;s=Arp.Plc.Eclr/MainInstance.xSent",
    "datatype":"Boolean",
    "value":"",
    "name":"Set xSent = false",
    "topic":"ns=5;s=Arp.Plc.Eclr/MainInstance.xSent",
    "showErrors":false,
    "x":1559.519676208496,
    "y":432.0040044784546,
    "wires":[["e7f659ad.f856d8"]]
},
{
    "id":"bbf31571.bd4798",
    "type":"change",
    "z":"10110044.30b59",
    "name":"set xSent = false",
    "rules":
        [{
            "t":"set",
            "p":"payload",
            "pt":"msg",
            "to":"false",
            "tot":"bool"
        }],
    "action":"",
    "property":"",
    "from":"",
    "to":"",
    "reg":false,
    "x":1300.5198135375977,
    "y":436.0039463043213,
    "wires":[["e4f13e7.aeee0c"]]
},
{
    "id":"7c7aec60.dd4ea4",
    "type":"switch",
    "z":"10110044.30b59",
    "name":"Test xSend = false",
    "property":"payload[0].value",
    "propertyType":"msg",
    "rules":[{"t":"false"}],
    "checkall":"true",
    "repair":false,
    "outputs":1,
    "x":828.5195541381836,
    "y":433.00390815734863,
    "wires":[["bbf31571.bd4798"]]
},
{
    "id":"abdef645.a4af28",
    "type":"debug",
    "z":"10110044.30b59",
    "name":"",
    "active":false,
    "tosidebar":true,
    "console":false,
    "tostatus":false,
    "complete":"false",
    "x":977.89453125,
    "y":648.67578125,
    "wires":[]
},
{
    "id":"4b371b6a.c3f7c4",
    "type":"debug",
    "z":"10110044.30b59",
    "name":"",
    "active":false,
    "tosidebar":true,
    "console":false,
    "tostatus":false,
    "complete":"true",
    "x":1534.0195121765137,
    "y":126.00390434265137,
    "wires":[]
},
{
    "id":"21582029.3743a",
    "type":"OPCUA-IIoT-Connector",
    "z":"",
    "discoveryUrl":"",
    "endpoint":"opc.tcp://127.0.0.1:4840",
    "keepSessionAlive":true,
    "loginEnabled":false,
    "securityPolicy":"Basic128Rsa15",
    "securityMode":"SIGNANDENCRYPT",
    "name":"LOCAL SERVER",
    "showErrors":true,
    "individualCerts":false,
    "publicCertificateFile":"",
    "privateKeyFile":"",
    "defaultSecureTokenLifetime":"",
    "endpointMustExist":false,
    "autoSelectRightEndpoint":false,
    "strategyMaxRetry":"",
    "strategyInitialDelay":"",
    "strategyMaxDelay":"",
    "strategyRandomisationFactor":"",
    "requestedSessionTimeout":"",
    "connectionStartDelay":"",
    "reconnectDelay": "",
    "maxBadSessionRequests": "10"
}]

 

 

 

 

Comments  

# anonymous_user_SpJ6A6ZZg0 2019-02-27 15:55
With the new version 2019.0, it is now impossible to write a value from node-Red to an OPC UA OutPort.
So, here is a new flow using xSend and xSent as variables to send the mail and to inform the AXC F 2152 that the mail has been sent :

[{"id":"10110044.30b59","type":"tab","label":"Send Mail","disabled":false,"info":""},{"id":"d0cb2109.ab173","type":"OPCUA-IIoT-Inject","z":"10110044.30b59","injectType":"read","payload":"","payloadType":"date","topic":"","repeat":"5","crontab":"","once":false,"startDelay":"","name":"Scan xSend ...","addressSpaceItems":[{"name":"xSend","nodeId":"ns=5;s=Arp.Plc.Eclr/MainInstance.xSend","datatypeName":""},{"name":"","nodeId":"ns=5;s=Arp.Plc.Eclr/MainInstance.strText","datatypeName":""},{"name":"","nodeId":"ns=5;s=Arp.Plc.Eclr/MainInstance.xSent","datatypeName":""},{"name":"","nodeId":"ns=5;s=Arp.Plc.Eclr/MainInstance.strMailTo","datatypeName":""},{"name":"","nodeId":"ns=5;s=Arp.Plc.Eclr/MainInstance.strMailCC","datatypeName":""},{"name":"","nodeId":"ns=5;s=Arp.Plc.Eclr/MainInstance.strMailBCC","datatypeName":""}],"x":194,"y":257.9999990463257,"wires":[["4c0f65aa.553d3c"]]},{"id":"e3f86348.7ae06","type":"comment","z":"10110044.30b59","name":"Lecture texte à envoyer","info":"","x":160,"y":80,"wires":[]},{"id":"33c9ab4f.6e6904","type":"change","z":"10110044.30b59","name":"copy strText in Mail","rules":[{"t":"set","p":"to","pt":"msg","to":"payload[3].value","tot":"msg"},{"t":"set","p":"cc","pt":"msg","to":"payload[4].value","tot":"msg"},{"t":"set","p":"bcc","pt":"msg","to":"payload[5].value","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"payload[1].value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1309.0000228881836,"y":255.00000953674316,"wires":[["ab1624f6.a3f398","7518e5a1.a4f6bc","4b371b6a.c3f7c4"]]},{"id":"ab1624f6.a3f398","type":"e-mail","z":"10110044.30b59","server":"smtp.gmail.com","port":"465","secure":true,"name":"","dname":"Sending mail","x":1550.0000953674316,"y":254.00000953674316,"wires":[]},{"id":"4c0f65aa.553d3c","type":"OPCUA-IIoT-Read","z":"10110044.30b59","attributeId":"13","maxAge":1,"depth":1,"connector":"21582029.3743a","name":"... In the local server","justValue":true,"showStatusActivities":true,"showErrors":true,"parseStrings":false,"historyDays":"","x":400,"y":256.9999990463257,"wires":[["8b5a0cd8.fb222"]]},{"id":"8b5a0cd8.fb222","type":"OPCUA-IIoT-Response","z":"10110044.30b59","name":"Wait for answer","compressStructure":true,"showStatusActivities":true,"showErrors":true,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":629.9999961853027,"y":255.99999809265137,"wires":[["4abaa77f.5c3dc8","7c7aec60.dd4ea4","abdef645.a4af28"]]},{"id":"4abaa77f.5c3dc8","type":"switch","z":"10110044.30b59","name":"Test xSend = true","property":"payload[0].value","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":839,"y":257.99999809265137,"wires":[["6198d7d9.ae24f8"]]},{"id":"7518e5a1.a4f6bc","type":"OPCUA-IIoT-Node","z":"10110044.30b59","injectType":"write","nodeId":"ns=5;s=Arp.Plc.Eclr/MainInstance.xSent","datatype":"Boolean","value":"true","name":"Set xSent = true","topic":"","showErrors":false,"x":1556.886817932129,"y":303.45702934265137,"wires":[["e7f659ad.f856d8"]]},{"id":"e7f659ad.f856d8","type":"OPCUA-IIoT-Write","z":"10110044.30b59","connector":"21582029.3743a","name":"send to local server","justValue":true,"showStatusActivities":true,"showErrors":true,"x":1807.0199127197266,"y":434.0039281845093,"wires":[["17416cc1.3e6113"]]},{"id":"17416cc1.3e6113","type":"OPCUA-IIoT-Response","z":"10110044.30b59","name":"Wait for answer","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":2036.020004272461,"y":434.003981590271,"wires":[["33609b88.7c4cc4"]]},{"id":"33609b88.7c4cc4","type":"debug","z":"10110044.30b59","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":2223.020030975342,"y":434.0039348602295,"wires":[]},{"id":"6198d7d9.ae24f8","type":"switch","z":"10110044.30b59","name":"Test xSent = false","property":"payload[2].value","propertyType":"msg","rules":[{"t":"false"}],"checkall":"true","repair":false,"outputs":1,"x":1075.0195999145508,"y":258.00392723083496,"wires":[["33c9ab4f.6e6904"]]},{"id":"e4f13e7.aeee0c","type":"OPCUA-IIoT-Node","z":"10110044.30b59","injectType":"write","nodeId":"ns=5;s=Arp.Plc.Eclr/MainInstance.xSent","datatype":"Boolean","value":"","name":"Set xSent = false","topic":"ns=5;s=Arp.Plc.Eclr/MainInstance.xSent","showErrors":false,"x":1559.519676208496,"y":432.0040044784546,"wires":[["e7f659ad.f856d8"]]},{"id":"bbf31571.bd4798","type":"change","z":"10110044.30b59","name":"set xSent = false","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1300.5198135375977,"y":436.0039463043213,"wires":[["e4f13e7.aeee0c"]]},{"id":"7c7aec60.dd4ea4","type":"switch","z":"10110044.30b59","name":"Test xSend = false","property":"payload[0].value","propertyType":"msg","rules":[{"t":"false"}],"checkall":"true","repair":false,"outputs":1,"x":828.5195541381836,"y":433.00390815734863,"wires":[["bbf31571.bd4798"]]},{"id":"abdef645.a4af28","type":"debug","z":"10110044.30b59","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":977.89453125,"y":648.67578125,"wires":[]},{"id":"4b371b6a.c3f7c4","type":"debug","z":"10110044.30b59","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":1534.0195121765137,"y":126.00390434265137,"wires":[]},{"id":"21582029.3743a","type":"OPCUA-IIoT-Connector","z":"","discoveryUrl":"","endpoint":"opc.tcp://127.0.0.1:4840","keepSessionAlive":true,"loginEnabled":false,"securityPolicy":"Basic128Rsa15","securityMode":"SIGNANDENCRYPT","name":"LOCAL SERVER","showErrors":true,"individualCerts":false,"publicCertificateFile":"","privateKeyFile":"","defaultSecureTokenLifetime":"","endpointMustExist":false,"autoSelectRightEndpoint":false,"strategyMaxRetry":"","strategyInitialDelay":"","strategyMaxDelay":"","strategyRandomisationFactor":"","requestedSessionTimeout":"","connectionStartDelay":"","reconnectDelay":"","maxBadSessionRequests":"10"}]
# g.br 2019-03-07 15:31
...code integrated at the end of the article for more convenience...