Hey Guys,
Was this past week with you guys on your Epic training. Had pending to ask, how can i use NodeRed to turnoff a PID in a RIO when i lose the network connection.
regards
Hey Guys,
Was this past week with you guys on your Epic training. Had pending to ask, how can i use NodeRed to turnoff a PID in a RIO when i lose the network connection.
regards
@torchard and I are reviewing our ideas here. Will update soon…
Like any Node-RED flow, there are often many ways to do the same thing.
Here is how I put this together…
Breaking it down…
Every 30 seconds the RIO polls the EPIC’s milliseconds since power up MMP address.
You should do something a little more substantial than just ping. If the MMP server on the EPIC stops, it will still respond to PING for example.
Ideally, you should put the PID value your writing to the RIO in an MMP scratch pad and read that MMP address every 30 seconds, so you are reading the actual value you are sending via a second pathway.
If the MMP read fails, the status node (the blue one) will report as much.
The status nodes ‘reads’ the writing under other nodes. In our case, it will read the timeout and fail messages that show up under the red mmp address node.
The RBE makes sure that only changes in the network are auctioned. You should not really be setting the PID to auto every 30 seconds. The RBE (report by exception) node blocks sequential good reads and sequential bad reads, it just allows changes to pass down the flow.
Then you have a switch block that is switching the Ok/Fail out its outputs.
Next are the two small function nodes where we change the msg.payload to what the PID MMP area needs, that is either a 1 or a 0.
Lastly, we write it to the RIO MMP PID area.
You can find all the MMP addresses under the groov Manage MMP Caclcuator menu.
And here is the PID in manual if the RIO to EPIC connection times out.
That should at least give you something to work with and experiment with.
Oh, I probably should mention that I needed to download the EPICs public certificate and add it to the RIOs certificate store so I could configure the EPIC via its host name (what ever the SAN is in its cert) in the top part of this flow.