I will modify my flow above - so you can add your plc Nodes directly instead - if the problem was only the missing topic.
So you can see the whole object and then the result which comes out when you subtract t0-t1
[{"id":"2f12098b5d79577b","type":"join","z":"cb05e14b.326a9","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":530,"y":500,"wires":[["675f9b230d46ed95","4955a3635ee96cdd"]]},{"id":"5d30c0bd802ccec2","type":"debug","z":"cb05e14b.326a9","name":"result","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1000,"y":500,"wires":[]},{"id":"675f9b230d46ed95","type":"switch","z":"cb05e14b.326a9","name":"Difference < > 5","property":"payload.t1 - payload.t0","propertyType":"jsonata","rules":[{"t":"gt","v":"5","vt":"num"},{"t":"lt","v":"5","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":690,"y":500,"wires":[["a00e3f8dc5d6738a"],["0e1560893c977356"]]},{"id":"a00e3f8dc5d6738a","type":"change","z":"cb05e14b.326a9","name":"= 1","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":860,"y":480,"wires":[["5d30c0bd802ccec2"]]},{"id":"0e1560893c977356","type":"change","z":"cb05e14b.326a9","name":"= 0","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":860,"y":520,"wires":[["5d30c0bd802ccec2"]]},{"id":"f2386f5cae401760","type":"inject","z":"cb05e14b.326a9","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"142","payloadType":"num","x":190,"y":460,"wires":[["2a8b0803c56f0b58"]]},{"id":"57a19d7cabaee9a5","type":"inject","z":"cb05e14b.326a9","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"396","payloadType":"num","x":190,"y":520,"wires":[["9e7dd48c8a33fbff"]]},{"id":"2a8b0803c56f0b58","type":"change","z":"cb05e14b.326a9","name":"topic = t0","rules":[{"t":"set","p":"topic","pt":"msg","to":"t0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":460,"wires":[["2f12098b5d79577b"]]},{"id":"9e7dd48c8a33fbff","type":"change","z":"cb05e14b.326a9","name":"topic = t1","rules":[{"t":"set","p":"topic","pt":"msg","to":"t1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":520,"wires":[["2f12098b5d79577b"]]},{"id":"4955a3635ee96cdd","type":"debug","z":"cb05e14b.326a9","name":"object","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":710,"y":420,"wires":[]}]
If the output of the PLC Nodes are strings instead of numbers the use the change node to convert the payload in a number:

add the conversion to both change nodes if necessary.