Guys for some reason OPC-Communication between my RaspPi and my S7 only works for around 1-2min and then it stops working. As mentioned before I am using subscription-mode for reading the values.
I´ll give you a snippet of my flow:
[
{
"id": "a6282cbcf1e02818",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID 0",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "2",
"crontab": "",
"once": true,
"onceDelay": "0.2",
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[0].\"CurrentToolID\";datatype=Number",
"payloadType": "date",
"x": 230,
"y": 360,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "82e86f9e7f8bc1d4",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID1",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "2",
"crontab": "",
"once": true,
"onceDelay": "0.2",
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[1].\"CurrentToolID\";datatype=Number",
"payloadType": "date",
"x": 220,
"y": 395.714285714286,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "5b8d61396a7ff47f",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID2",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "2",
"crontab": "",
"once": true,
"onceDelay": "0.2",
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[2].\"CurrentToolID\";datatype=Number",
"payloadType": "date",
"x": 220,
"y": 441.8367346938778,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "a263a110c21bdc23",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID3",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "2",
"crontab": "",
"once": true,
"onceDelay": "0.2",
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[3].\"CurrentToolID\";datatype=Number",
"payloadType": "date",
"x": 220,
"y": 487.9591836734696,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "b0f55e0b7b7f7354",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID 0 CycleCount",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "2",
"crontab": "",
"once": true,
"onceDelay": "0.5",
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[0].\"CycleCountfromSQL\";datatype=Number",
"payloadType": "date",
"x": 260,
"y": 534.0816326530614,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "2eec11d460917830",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID 1 CycleCount",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "2",
"crontab": "",
"once": true,
"onceDelay": "0.5",
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[1].\"CycleCountfromSQL\";datatype=Number",
"payloadType": "date",
"x": 260,
"y": 580.2040816326532,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "27c7feb8fbef5f13",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID 2 CycleCount",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "2",
"crontab": "",
"once": true,
"onceDelay": "0.5",
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[2].\"CycleCountfromSQL\";datatype=Number",
"payloadType": "date",
"x": 260,
"y": 620,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "8003654de2489fea",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID 3 CycleCount",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "2",
"crontab": "",
"once": true,
"onceDelay": "0.5",
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[3].\"CycleCountfromSQL\";datatype=Number",
"payloadType": "date",
"x": 260,
"y": 672.4489795918369,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "2ab58409868dafdb",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID 0 Temporary Count",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[0].\"TemporaryCount\";datatype=Number",
"payloadType": "date",
"x": 280,
"y": 718.5714285714287,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "3932c99118b0eb0a",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID 1 Temporary Count",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[1].\"TemporaryCount\";datatype=Number",
"payloadType": "date",
"x": 280,
"y": 764.6938775510205,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "59ec4bd4d4f199a4",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID 2 Temporary Count",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[2].\"TemporaryCount\";datatype=Number",
"payloadType": "date",
"x": 280,
"y": 810.8163265306123,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "c2bf21e76abcf0e0",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID 3 Temporary Count",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[3].\"TemporaryCount\";datatype=Number",
"payloadType": "date",
"x": 280,
"y": 856.9387755102041,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "c04eab0a391d7938",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID 4",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "2",
"crontab": "",
"once": true,
"onceDelay": "0.2",
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[4].\"CurrentToolID\";datatype=Number",
"payloadType": "date",
"x": 230,
"y": 900,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "2c6c6f41388821eb",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID5",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "2",
"crontab": "",
"once": true,
"onceDelay": "0.2",
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[5].\"CurrentToolID\";datatype=Number",
"payloadType": "date",
"x": 220,
"y": 946.1224489795918,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "456eb772c6fb24d1",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID6",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "2",
"crontab": "",
"once": true,
"onceDelay": "0.2",
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[6].\"CurrentToolID\";datatype=Number",
"payloadType": "date",
"x": 220,
"y": 992.2448979591836,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "53de9e40ac4bd7ab",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID7",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "2",
"crontab": "",
"once": true,
"onceDelay": "0.2",
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[7].\"CurrentToolID\";datatype=Number",
"payloadType": "date",
"x": 220,
"y": 1038.3673469387754,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "ed7abfb343425fa9",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID 4 CycleCount",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "2",
"crontab": "",
"once": true,
"onceDelay": "0.5",
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[4].\"CycleCountfromSQL\";datatype=Number",
"payloadType": "date",
"x": 260,
"y": 1061.4285714285713,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "678ec96364bb4a3c",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID 5 CycleCount",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "2",
"crontab": "",
"once": true,
"onceDelay": "0.5",
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[5].\"CycleCountfromSQL\";datatype=Number",
"payloadType": "date",
"x": 260,
"y": 1107.5510204081631,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "a2f2d79ae4eb501d",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID 6 CycleCount",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "2",
"crontab": "",
"once": true,
"onceDelay": "0.5",
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[6].\"CycleCountfromSQL\";datatype=Number",
"payloadType": "date",
"x": 260,
"y": 1153.673469387755,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "4fa69036cc3ce915",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID 7 CycleCount",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "2",
"crontab": "",
"once": true,
"onceDelay": "0.5",
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[7].\"CycleCountfromSQL\";datatype=Number",
"payloadType": "date",
"x": 260,
"y": 1199.7959183673468,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "3b5d9b58b50b5448",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID 4 Temporary Count",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[4].\"TemporaryCount\";datatype=Number",
"payloadType": "date",
"x": 280,
"y": 1245.9183673469386,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "c5b181c9655f1332",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID 5 Temporary Count",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[5].\"TemporaryCount\";datatype=Number",
"payloadType": "date",
"x": 280,
"y": 1292.0408163265304,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "a29b5eb65fb75a15",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID 6 Temporary Count",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[6].\"TemporaryCount\";datatype=Number",
"payloadType": "date",
"x": 280,
"y": 1338.1632653061222,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "df7939abbf15e073",
"type": "inject",
"z": "6a150d561d4e6972",
"name": "Tool ID 7 Temporary Count",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "ns=3;s=\"Online_RFIDs\".\"THIS\"[7].\"TemporaryCount\";datatype=Number",
"payloadType": "date",
"x": 280,
"y": 1384.285714285714,
"wires": [
[
"c6f8120301d4870c"
]
]
},
{
"id": "c6f8120301d4870c",
"type": "OpcUa-Client",
"z": "6a150d561d4e6972",
"endpoint": "e00e2f355739f286",
"action": "subscribe",
"deadbandtype": "a",
"deadbandvalue": 1,
"time": "1000",
"timeUnit": "ms",
"certificate": "n",
"localfile": "",
"localkeyfile": "",
"securitymode": "None",
"securitypolicy": "None",
"name": "Read Online IDs",
"x": 1080,
"y": 1500,
"wires": [
[
"72d3b99df2bab52e"
]
]
},
{
"id": "72d3b99df2bab52e",
"type": "switch",
"z": "6a150d561d4e6972",
"name": "",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "[0].\"CurrentToolID",
"vt": "str"
},
{
"t": "cont",
"v": "[1].\"CurrentToolID",
"vt": "str"
},
{
"t": "cont",
"v": "[2].\"CurrentToolID",
"vt": "str"
},
{
"t": "cont",
"v": "[3].\"CurrentToolID",
"vt": "str"
},
{
"t": "cont",
"v": "[0].\"CycleCountfromSQL",
"vt": "str"
},
{
"t": "cont",
"v": "[1].\"CycleCountfromSQL",
"vt": "str"
},
{
"t": "cont",
"v": "[2].\"CycleCountfromSQL",
"vt": "str"
},
{
"t": "cont",
"v": "[3].\"CycleCountfromSQL",
"vt": "str"
},
{
"t": "cont",
"v": "[0].\"TemporaryCount",
"vt": "str"
},
{
"t": "cont",
"v": "[1].\"TemporaryCount",
"vt": "str"
},
{
"t": "cont",
"v": "[2].\"TemporaryCount",
"vt": "str"
},
{
"t": "cont",
"v": "[3].\"TemporaryCount",
"vt": "str"
},
{
"t": "cont",
"v": "[4].\"CurrentToolID",
"vt": "str"
},
{
"t": "cont",
"v": "[5].\"CurrentToolID",
"vt": "str"
},
{
"t": "cont",
"v": "[6].\"CurrentToolID",
"vt": "str"
},
{
"t": "cont",
"v": "[7].\"CurrentToolID",
"vt": "str"
},
{
"t": "cont",
"v": "[4].\"CycleCountfromSQL",
"vt": "str"
},
{
"t": "cont",
"v": "[5].\"CycleCountfromSQL",
"vt": "str"
},
{
"t": "cont",
"v": "[6].\"CycleCountfromSQL",
"vt": "str"
},
{
"t": "cont",
"v": "[7].\"CycleCountfromSQL",
"vt": "str"
},
{
"t": "cont",
"v": "[4].\"TemporaryCount",
"vt": "str"
},
{
"t": "cont",
"v": "[5].\"TemporaryCount",
"vt": "str"
},
{
"t": "cont",
"v": "[6].\"TemporaryCount",
"vt": "str"
},
{
"t": "cont",
"v": "[7].\"TemporaryCount",
"vt": "str"
},
{
"t": "cont",
"v": "[0].\"IDextension",
"vt": "str"
},
{
"t": "cont",
"v": "[1].\"IDextension",
"vt": "str"
},
{
"t": "cont",
"v": "[2].\"IDextension",
"vt": "str"
},
{
"t": "cont",
"v": "[3].\"IDextension",
"vt": "str"
},
{
"t": "cont",
"v": "[4].\"IDextension",
"vt": "str"
},
{
"t": "cont",
"v": "[5].\"IDextension",
"vt": "str"
},
{
"t": "cont",
"v": "[6].\"IDextension",
"vt": "str"
},
{
"t": "cont",
"v": "[7].\"IDextension",
"vt": "str"
},
{
"t": "cont",
"v": "[0].\"TagPresent",
"vt": "str"
},
{
"t": "cont",
"v": "[1].\"TagPresent",
"vt": "str"
},
{
"t": "cont",
"v": "[2].\"TagPresent",
"vt": "str"
},
{
"t": "cont",
"v": "[3].\"TagPresent",
"vt": "str"
},
{
"t": "cont",
"v": "[4].\"TagPresent",
"vt": "str"
},
{
"t": "cont",
"v": "[5].\"TagPresent",
"vt": "str"
},
{
"t": "cont",
"v": "[6].\"TagPresent",
"vt": "str"
},
{
"t": "cont",
"v": "[7].\"TagPresent",
"vt": "str"
},
{
"t": "cont",
"v": "[0].\"MaxCycles",
"vt": "str"
},
{
"t": "cont",
"v": "[1].\"MaxCycles",
"vt": "str"
},
{
"t": "cont",
"v": "[2].\"MaxCycles",
"vt": "str"
},
{
"t": "cont",
"v": "[3].\"MaxCycles",
"vt": "str"
},
{
"t": "cont",
"v": "[4].\"MaxCycles",
"vt": "str"
},
{
"t": "cont",
"v": "[5].\"MaxCycles",
"vt": "str"
},
{
"t": "cont",
"v": "[6].\"MaxCycles",
"vt": "str"
},
{
"t": "cont",
"v": "[7].\"MaxCycles",
"vt": "str"
},
{
"t": "cont",
"v": "[0].\"Maintenance",
"vt": "str"
},
{
"t": "cont",
"v": "[1].\"Maintenance",
"vt": "str"
},
{
"t": "cont",
"v": "[2].\"Maintenance",
"vt": "str"
},
{
"t": "cont",
"v": "[3].\"Maintenance",
"vt": "str"
},
{
"t": "cont",
"v": "[4].\"Maintenance",
"vt": "str"
},
{
"t": "cont",
"v": "[5].\"Maintenance",
"vt": "str"
},
{
"t": "cont",
"v": "[6].\"Maintenance",
"vt": "str"
},
{
"t": "cont",
"v": "[7].\"Maintenance",
"vt": "str"
},
{
"t": "cont",
"v": "SQLinError",
"vt": "str"
},
{
"t": "cont",
"v": "Nodered\".\"Lifebit",
"vt": "str"
},
{
"t": "cont",
"v": "aLifebit",
"vt": "str"
}
],
"checkall": "true",
"repair": true,
"outputs": 59,
"x": 1410,
"y": 1500,
"wires": [
[
"fefdd5b91b87a328"
],
[
"7d76e959d9b0d046"
],
[
"acd747210071b1eb"
],
[
"b35d1cae6dee1dec"
],
[
"f555ace81cc30f2c"
],
[
"a5a08438d22e257a"
],
[
"3799574dccdb4927"
],
[
"f099d21dda71d538"
],
[
"de106ed4f1f4e269"
],
[
"4d82656f2f7d11a3"
],
[
"f21b3848e5d19162"
],
[
"8dd1d832eba88774"
],
[
"24d6230193bf6b0b"
],
[
"d90f92426089ffdf"
],
[
"b9044ec2c4ba14a9"
],
[
"dda5768ed20f05e0"
],
[
"a9666dab31efa349"
],
[
"30514608a4a0244d"
],
[
"b58526c30f8844d7"
],
[
"48d49287caee2742"
],
[
"f11204af29d3ce4b"
],
[
"36ac2aeca54e0301"
],
[
"363a466007317625"
],
[
"e28ab18f17c1264d"
],
[
"cafc5482ef5a16b9"
],
[
"3395d569053361fd"
],
[
"80494224f14f6a8c"
],
[
"232fcbf2cac15bb7"
],
[
"3e620741ea9ceced"
],
[
"494e19f7b29f94f4"
],
[
"123cdb5bc4e2894f"
],
[
"c99880c64f53e0d3"
],
[
"395e9ef8f3f42b57"
],
[
"224ab59e13b7c941"
],
[
"ee6d7daa663f6d45"
],
[
"27bc30e7fe463c8e"
],
[
"98a52dfae5b3efe4"
],
[
"d5c8ad7f409b16a6"
],
[
"b3afd205e2082d6f"
],
[
"6285c8be622a8db2"
],
[
"3d352024d68d07ba"
],
[
"c132ff3ebe63b90d"
],
[
"3346b8b2f56a66c1"
],
[
"f8306190925e7b1e"
],
[
"fb9bd7801a99874a"
],
[
"845219d3b7664480"
],
[
"bad2a391de3049a7"
],
[
"78b415e6c0e40792"
],
[
"4b4fbc471bf97658"
],
[
"5243f1efb801c45e"
],
[
"10998ab0fb65724c"
],
[
"5ec50f561b189e66"
],
[
"91cec7947aa20840"
],
[
"213bc82ac144d46f"
],
[
"b9d40884a342caa6"
],
[
"27d59bb6db6fd57c"
],
[
"27c705b30ac1e9e1"
],
[
"8b7dff89709b5ca8"
],
[
"8f96734a7e1f75e4"
]
]
},
{
"id": "e00e2f355739f286",
"type": "OpcUa-Endpoint",
"endpoint": "opc.tcp://172.16.200.170:4840",
"secpol": "None",
"secmode": "None",
"login": false
}
]
In total i need to read around 350 values from my S7.
I do the reading in 6 different subflows, do you think this might cause the issue?
Thoughts?
EDIT: Could figure it out. Needed to rasie Intervaltime for OPC-Communication on S7 side.