OptoBlog

TPO on groov RIO

Posted by Ben Orchard on Jul 28, 2021 9:38:49 AM

Learn more about Time Proportional Output (TPO) and how you can use it on the groov RIO edge I/O module.

Do you need to control a digital output from an analog input?

If so, perhaps TPO is the solution you seek. Did you know that a groov RIO has 8 built-in TPO controllers and each can be configured for a different time period? We just need a little setup assistance in the form of a Node-RED flow. Before we get into that, let's talk more about just what TPO is.

Background

Time Proportional Output (TPO) is a form of pulse-width modulation (PWM) that allows an analog input signal to control a digital output signal using on/off control. The digital signal is modulated with a time constant from 0 to 100% based on the analog signal's level.

For example, think of a temperature probe in an oven and the TPO is the automatic function that is switching the heating element on and off to control the oven temperature to a given setpoint. The closer the oven gets to the setpoint, the less time the heating element needs to be turned on.

TPO percentWhile you can do a crude form of TPO control with simple if-its-cold-turn-on-the-heater sort of logic, TPO offers both much better temperature control and is more automatic. Once you configure the TPO, it will run on its own, no logic or programming required to run the TPO.

Most times, the TPO is controlled by a PID loop targeting the desired process setpoint. Of course, the PID loop should still need to be tuned as all loops should be.

The final and critical piece of TPO is the time period. What is the span of time that the digital output will be modulated over? Again, this is another tuning parameter that the user will need to adjust for each and every application.

Why is it needed? Back to the oven example. A small oven might get up to temperature quicker than a larger one. That volume/heating element efficiency time difference must be taken into account.

Recall that the 0 to 100% output of the PID needs to slice up this total period. So for example, if your period is 10 seconds, and the PID output is at 50%, the digital output will be on for 5 seconds, off for 5 seconds and back on for 5 seconds. You will have a 50% duty cycle square wave on the digital output. As the PID output varies, the duty cycle of the output will change with a total period (on plus off) of 10 seconds.

TPO groov RIO

Configuration

Ok, now that you have some background....what’s involved in setting this up in a groov RIO? Just like the RIO has 4 PID loops built-in, 8 of the RIO's 10 configurable channels support the TPO feature. Note: The two mechanical relays are not supported in TPO mode.

In groov Manage, you would set the output Value Type of the PID loop to Host and the output range to 0 to 100%. (See chapter 9 of the groov RIO User's Guide.)

If you are using the groov RIO as remote IO from a groov EPIC, then the PAC Control strategy can be used to configure the TPO. We have a nice set of commands that help the programmer get up and running quickly. In fact, if you have the groov EPIC learning center, you can download the example strategy from training.opto22.com. It includes a lesson on setting up and using TPO.

If you need to run TPO on a stand-alone RIO without a control engine, then you need to use some other programming interface to set up and enable the TPO parameters in the correct way. Enter Node-RED.

Node-RED is a low/no-code visual programming environment. With the groov-io nodes, you can directly access the I/O points and OptoMMP addresses of your groov RIO. This makes setting up the TPO area just a matter of following the configuration steps in order.

For specific how-to instructions to import the Node-RED flow and configure it, head over to our Opto 22 Forums and read the thread that has all the details about setting up and using the TPO function on a groov RIO.

Till next time,

Cheers Mate.

-Ben

 

Topics: Node-RED, groov EPIC, groov RIO, OptoForum, time proportional output

Written by Ben Orchard

    Subscribe to Email Updates

    Recent Posts

    Posts by Topic

    see all