Wednesday, July 21, 2010

A Lot Less Blood, Sweat, and Tears for the Spinning Wheel

OK, I really stretched on the title of today’s post, but I feel like I’ve got some added pressure because of Jim Cahill’s blog yesterday on Emerson Process Experts. Yesterday I told you about the new capabilities built right into the DO CHARM in version 11.3 of DeltaV and its electronic marshalling. Today I’ll share some of the features associated with the DI CHARM.

So first, the DI CHARM can be configured as a pulse count input channel. Now the top frequency is only 10 kHz compared to the 50 kHz of the existing Multifunction IO card, whoever bought a Multifunction IO card? No, really – in the last 10 years, I can count the number of Multifunction cards we’ve used on projects on one hand (and have fingers left over). And the 10 kHz of the CHARM is WAY higher than configuring a channel of a standard DI as a pulse input, which has a frequency limit of a paltry 75 Hz.

Like the Multifunction card, not only do you get access to a counter (going up to 65535), but you get a FREQUENCY value, very handy for determining speed – you don’t need to worry about some 3rd party pulse to 4-20ma converter to figure out how fast you’re spinning.

For testing, we wired a DO CHARM configured as a Pulse Output (see yesterdays post) into a pulse count DI CHARM. The PULSE_PERIOD on the DO CHARM was set to 0.02 or 20 ms. The picture below is from the module I have running at 1 second:

The FREQUENCY value coming from the DI CHARM is 50 Hz (I love it when a plan comes together). FYI – the setpoint of the AO can be used to adjust the pulse width coming out of the DO CHARM. With a setpoint of 30%, the actual pulse width would be 4 ms.

I touched on some of the new signal characterization features for DI CHARMS back in March, before I actually had CHARM hardware to play with. One of the first things I tried out when I got my CIOC and CHARMs was the Extend Output Filter. How many times have you had to develop logic that monitors for an operator to press a button in the field? You stress about “what if he doesn’t hold the button long enough?” or “how fast am I going to have to run my module to pick it up?” With the Extend Output Filter, you can configure how long it would hold the “1” from the momentary button press at the CHARM. The dropdown lets you pick a filter time anywhere from 50 to 30000 ms. Selecting a time of 1100 ms would allow me to run my module at 1 second execution and feel comfortable in knowing I’ll not miss the quick tap of a button.

Output filter types of Latching PDE and Latching NDE are still in the dropdown list, but I’m not sure it’s really implemented in version 11.3 – stay tuned.

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.