Tuesday, July 20, 2010

Roadrunner Fast

Awhile back, I wrote about some of the new configuration features I found in version 11.3 DeltaV associated with Emerson’s electronic marshalling and discrete CHARMs. Once we got a hold of our hardware, I started testing out some of these features to see how I could exploit them. And I’ve had to stop the presses 3 times in writing this post, because the more I dig, the cool stuff I come across.

So I started off by putting together a sample configuration using Continuous Pulse Output functionality associated with DO CHARMS. I’ve even been developing a short video, but that’s going to have to wait. For those of you who are not familiar with Continuous Pulse Outputs, another phrase you might recognize from the old PROVOX days is TPO, or Time Proportional Output.

Way back when, Fisher Controls created a TPO card for the parallel IO subsystem (I think we can thank GE). Basically, you’d set up a duty cycle for the card, and assign the output of a Loop point to a channel on the card. PROVOX would look at the output (from 0 to 100%) and compute a fraction of the duty cycle. You would then wire up a discrete output to the card, and the output would turn on and off, with the on and off times varying based on the output of the loop.

So for instance, if the duty cycle was set to 5 seconds and the output of the loop was 80%, the DO would turn on for 4 seconds, then go off for 1 second. So this was great for applications that used electric heat – you could create a PID loop for temperature control with a final control element of a pulsed heater.

When the Series 20 IO came out for PROVOX, the TPO functionality didn’t follow, and with well meaning reasoning. Now that you had FST’s that could run as fast as 100 ms, you could create TPO functionality without special hardware. The rub was of course, resolution. If my temperature control loop runs at 5 seconds, and my FST is running at 100 ms, then the granularity of my final control element is 1 part in 50 or 2%.

Now fast forward to version 11.3 and CHARMS, and true TPO functionality has returned. And we’re talking fast. Wylie Coyote doesn’t stand a chance. Granularity issues? Not an issue. The Pulse Period (duty cycle) for a DO CHARM can be set anywhere between 2 ms and 130 seconds. That wasn’t a mistype – 2 milliseconds.

If my duty cycle can be as fast as 2 ms, how fast can an output from DO CHARM be turned on, then off? Turns out it’s 1 ms. To test this, Carl Price at our office hooked up a Fluke he uses for Foundation Fieldbus segment checkout to the DO CHARM. I configured a pulse period of 2 ms, tied the channel to an AO block, and gave to SP a value of 50. This would translate into an “on time” of 1 ms. Here’s the scope screenshot:


Back to my temperature control loop. With a 5 second Pulse Period and 1 ms resolution, my final control element granularity is now 1 part in 5000 or 0.02%. All this speed is built into the CHARM, so I’m not going to load up my controller with a bunch of fast executing modules.

What other applications might be out there for being able to turn on a DO for exactly, say, 57 ms? Configure a module to run at 1 second, tie an AO function block off to a Pulse DO CHARM, set the Pulse Period to 1 second, then using a PDET and ACT block, trigger a write of 5.7 to the SP of the AO for a single scan of the module, setting the SP back to 0 the next scan.

Tomorrow, I’ll discuss counting those pulses with a DI CHARM.

No comments: