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.
Thanks Ben
Good info and way to do it.
Question, i am getting this security error when tryng to comunicate to the main brain (EPIC).
What i am trying to do, is set the Node Red flow from the RIO to always try to ping the EPIC.
Any thoughts
First, find out what the SAN is for the cert by looking at the decoded certificate in groov Manage on the EPIC.
Was the cert created for a hostname or an IP?
What every the answer is to that, is what you MUST put in the RIO when addressing the EPIC.
Next, download the EPIC public cert.
Then upload it in the RIO via groov Manage.
That three step process should get you going.
Beno,
was thinking about this a bit further. Would it be best to run the PID directly from the Rio itself?
For example, my current setup has a floating variable that comes from the EPIC, i set that value into the PID Input and also, the PID Setpoint is coming form the EPIC. On the floating variable that goes into the PID Input, its a calculation from two variables (1- a chemical flow meter, 2- a manually inputed floating value).
What i am think is that i will calculate that floating value within NodeRed and be able to set the input to the PID within Nodered.
would that be to complicated?
Im thinking that if i ever lose connection, the PID would actually keep running from the last Setpoint.
Unless I misread it, I think you are doing the right thing with the node-red offline/disable PID auto mode thing.
The problem is not the setpoint; it’s the calculated input.
When the RIO goes off-line to the EPIC, the PID input in the RIO becomes stale, and frankly, at that point, who cares what the setpoint is if the input to the PID ‘cannot be trusted’?
It was a simple three-click process for me to get the EPIC cert in the RIO.
Check the SAN.
Export.
Import.
I think once you get past that, it should be smooth to get the off-line detection Node-RED flow working and tweaked to suit your application.