Hello CodeShepherd, I got it Thank you for your reply! Below is my node red flow: [
{
"id": "b2877cafbca42cf0",
"type": "trigger",
"z": "b052b93d5f84889b",
"name": "",
"op1": "1",
"op2": "0",
"op1type": "str",
"op2type": "str",
"duration": "-1",
"extend": false,
"overrideDelay": false,
"units": "s",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 960,
"y": 220,
"wires": [
[
"a8bbd8933e5e95a8"
]
]
},
{
"id": "f7b1bd6d2bc3e375",
"type": "switch",
"z": "b052b93d5f84889b",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 730,
"y": 220,
"wires": [
[
"b2877cafbca42cf0",
"a46ab9947e2d09aa"
]
]
},
{
"id": "e36410cfd03fd9cf",
"type": "function",
"z": "b052b93d5f84889b",
"name": "function 1",
"func": "if (msg.payload == true){\n msg.payload = 1\n}else{\nmsg.payload =0\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 540,
"y": 220,
"wires": [
[
"f7b1bd6d2bc3e375"
]
]
},
{
"id": "ec2fb91b01ca9d98",
"type": "debug",
"z": "b052b93d5f84889b",
"name": "debug 36",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 540,
"y": 160,
"wires": []
},
{
"id": "bc39c6782c1dc096",
"type": "ctrlx-datalayer-subscribe",
"z": "b052b93d5f84889b",
"subscription": "966476dc2fbcc0ca",
"path": "plc/app/Application/sym/GVL/bStartRecord",
"name": "",
"x": 280,
"y": 220,
"wires": [
[
"ec2fb91b01ca9d98",
"e36410cfd03fd9cf"
]
]
},
{
"id": "966476dc2fbcc0ca",
"type": "ctrlx-config-subscription",
"device": "ec1807ac.c7c0e8",
"name": "ctrlX",
"publishIntervalMs": ""
},
{
"id": "ec1807ac.c7c0e8",
"type": "ctrlx-config",
"name": "ctrlX",
"hostname": "192.168.1.1",
"debug": true
}
] In my PLC program i wrote my BOOL variable to stay TRUE for 5 seconds so that my node red will not have response time issue. Warmest regards,
... View more