I have a Tulip Edge IO device connected to a Yokogawa oven controller via RS-485 and Node-RED.
As long as the oven is turned on I'm having very good success polling the controller. As the lab turns the oven off at the end of the day I need a way to reliably detect when the controller is off.
I can try using the states but that cycles through as reconnect attempts are made.
Could you not hook something into the power circuit to tell you when the oven was energized ?
Or a CT clamp on the circuit that feeds the oven ?
Failing that there would be a time differential i would imagine between a successful read and a failed read/timeout because the device is offline - would be worth doing some testing
So
Start time tracker
perform read
End time tracker
Compare the times for a succesful read as against a failed read and see if there is a noticeable and reproducible difference
Yeah, I was just seeing if there was a slick way to handle this using the Modbus/RTU handling.
The controller has outputs so there's a good chance there's one for monitoring whether it's up or not, but that would require removing it from the oven to access the terminals whereas I can toy with the NodeRED remotely
I added picking up msg.status.text = failure which seems to work. Now I just need to wait until someone turns the oven on tomorrow to see what text is sent for success!
Hello Richard .. instead of the states i used in my modbus project the option in the Modbus nodes
to send an empty msg on fail. (fail in this case would be the device being switched off and not replying to requests)
With this option checked i still get a msg from the mod. nodes that i later handle with a Function node after it.
If you're an expert user then probably, because you understand what it does. For a more novice user the fact there's no connection to the Modbus getter node it could be confusing.
Why would there be no connection to the modbus node? Presumably when it is working you send the output somewhere. If you position the modbus and status nodes immediately one above the other then when there is good data it comes out of the modbus node, and when it fails the error comes out from a switch node following the status node. Give the status node a name such as Modbus Status and it should be clear what is going on. However if using the blank payload to split the flow into good data and failure fits your needs better then that is fine.