Advice for opto22 beginner

Hello everyone. I’m new to opto22 equipment and seeking advice for the groovRIO. I have a project where I need just a couple each of analog current in and out, voltage in, and discrete in and out. I have so little of each that 90% of all I/O would be wasted on an EPIC. So I decided to just use the RIO. Two RIOs to be more specific. Everything I need fits perfectly within the 20 total channels. My only concern is how I can communicate the data between the two. My go to programming is Node-RED. Will I be able to select the specific module I want to talk to in the Node Configuration? There’s nothing super complicated going on like PIDs or high speed counting or anything like that. Just taking simple analog or discrete readings and sending them to the proper place.

i hope this is understandable for everyone reading this.


Hi Elliot. Welcome to the Opto 22 forums!

Sounds very straight forward.
1 thing you will need to do and 1 thing to think about.

First, you will need put each RIO’s certificate into the other one so you can talk back and forth.
We have a forum post on how to do that here:

Once that is done the thing you will need to think about is if you are going to have a master / slave sort of setup, where one RIO runs the main flow and simply talks over the network to the other RIO, or if you want a sort of hybrid setup where each RIO is doing their own thing in their flows and talking to the other as needed.
If you are going to go with the latter, then you need to be super careful that the two flows don’t both write to the same output with different commands, ie RIO 1 telling DO1 to turn off and RIO 2 telling DO1 to turn on. Chaos will quickly follow. And do note, this is a problem to be solved in all control systems where you have two programs running - be it a human interface or a system like you have.

Feel free to go over the pros and cons with each option or ask any questions you have as you go along, as you can probably tell we are big Node-RED fans and love our little RIOs.


Thank you so much. I will go with master/Slave setup since if something actuates when I want it to do something else, it could be catastrophic for my application. For example if I want to tell the engine to slow down or stop, but the other RIO thinks I’m saying speed up, i can only imagine what would hapen in an emergency stop haha.

Also I wasn’t thinking when I wrote this, I do need to have a PID, to map a 0-10V input signal to a 4-20mA output, and reference the engine speed to keep it there even when the load changes. Will this setup still be able to handle that?

Thanks again!

Yes, no problem. The PID loop will run independently of the Node-RED flow as needed. You can of course change the set point or other parameters on the fly as needed and just ensure your PID loop is tuned as you need it.

What are you using to network the two RIO’s together? Over what distance?
Sounds like it better be a bulletproof link?

In other words, I would be seriously re-thinking the master/slave setup. Sounds like you need to have some solid autonomy in each RIO.

Sorry it took so long to get back. The RIOs are right next to each other, in the same cabinet. It’s about 2 feet of total networking through a switch. I overexaggerated the “Could be catastrophic” part. The engine has a mechanical overspeed, and the governor has a built in shutdown so that’s not really a concern. As for the master slave, basically one RIO will have all the flows, and then the other RIO just acts like a remote I/O Module. The RIO with all the flows will have the governor output and speed reference input so there’s no problems in case the network drops out or something.

Also on the topic of PID, I was going to use a governor that had an independent controller that would compensate for engine droop. I was then introduced to a fully electronic, and much cheaper all in one governor. The only problem is it doesn’t compensate, so I’d need to run a PID on the RIO to do that. It would be fine if I just needed one engine RPM, but I want to have a potentiometer to vary the speed anywhere between 255 and 900 RPM. I read somewhere that I can just use a node or something to adjust the threshold of the PID, and then it would continue to compensate engine RPM by itself. Is there a certain way to do that? Or better yet, a thread/tutorial?

In case it matters, the throttle potentiometer is just a panel mounted 0-10V input, the engine RPM reference is a 4-20mA input, and the governor position control is a 4-20mA output, 4mA being No fuel, 20mA being full fuel.


The PID in RIO is the same math formulas as used in our SNAP PAC controllers.
There are many resources on the web for tuning them etc. The main difference is that you will be using groov Manage to set up the PID and Node-RED to tweak a few values on the fly vs PAC Control for the SNAP gear.
If you have never worked with PIDs before, I’d start with out training guide and go from there:

Also be sure to check out this awsome video: