Sign in to follow this  
Followers 0
METSYSTEM

Analogue to Pulse Addon

5 posts in this topic

Good evening, (UK, afternoon USA) I was wondering if there was, floating around anywhere, or anyone knew of, an addon or function block that converts an analogue (REAL) to a pulsed BOOL? I am more conversant with Rockwell and am hoping someone can help, however, my final application will actually be in the Schneider Unity Pro environment. (Don't ask, its not through choice) Thanks in advance to any help Much obliged Alex

Share this post


Link to post
Share on other sites
This would seem to be pretty easy do in ladder and turn into an AOI that could be used as a function block. Edited by Michael Lloyd

Share this post


Link to post
Share on other sites
Are you talking about taking the output from a PID Controller and turning it into Pulse Width Modulation (PWM)? I've done this before with logic, and it's pretty simple. I set up a self resetting timer with a preset equal to my pulse width. Preferably use a timer with 1ms precision, though that isn't critical. Then I scale my PID control variable to be 0-100%, and multiply this by my timer preset to give me the amount of time that I want the pulse to be ON. Then I use a compare statement to turn the output ON while the accumulated value of the timer is less than the calculated ON-time. I generally use clamping compare statements at the extreme ends of the control variable range. For example, if the output is greater than 95%, keep the output ON, and if it's less that 5%, keep the output OFF. This eliminates chattering on a slow-acting device like a valve. Among other things, I've used this method for controlling the temperature of a chamber with an On/Off steam valve, and it can control within +/- 0.5 degree Celsius.

Share this post


Link to post
Share on other sites
That's the method I use, too. ControlLogix has a specific instruction for this, called Split-Range Time Proportional Output (SRTP), which is part of the Function Block language. But the general format has the advantage of being portable to other operating systems and brands of controller.

Share this post


Link to post
Share on other sites
Here I was thinking he wanted to map a Real to bits to control Christmas lights :o) and you guys are all getting into doing work...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0