Sign in to follow this  
Followers 0
bodyx

Analog out in digital out PID function

7 posts in this topic

Hi friends, tell me how I transform output register of the PID function digital output to control a normal ssr, plc is FX2N and analog card is FX0N-3A, thank you very much

Share this post


Link to post
Share on other sites
You'll use pulse width modulation to turn the control output of the PID into a digital on/off pulse. First decide on the length of the pulse. This depends on the process, but let's say one second (1000ms). Create a self-resetting timer with that as the preset. I usually try to use a 1ms timer for this. Then convert the output of PID into a percentage (0-100%) and multiply that times your cycle time. The result is your ON time of the cycle. For example, if your control output is 40%, you'll want the SSR to be on for 400ms, then off for 600ms, etc. Compare the accumulated value of the timer with the calculated ON time, and when it's greater, turn your SSR on. I seem to think I answered a similar forum question with more detail, but I need to head out, so I don't have time to search for it. Maybe when I return.

Share this post


Link to post
Share on other sites
Ok, I found the post, and, funnily enough, what I wrote is almost verbatim what I wrote above. The only thing I added was that I generally clamp the output in the top and bottom 5% of the range. In other words if the control output is above 95%, keep the output on all the time, and if it's less than 5% keep it off. This eliminates some chatter. Might not be a problem for you since you are using an SSR, but something to keep in mind.

Share this post


Link to post
Share on other sites
JRoss Thanks, I'll try that, probably bother you with some questions

Share this post


Link to post
Share on other sites
"Then convert the output of PID into a percentage (0-100%)" Can you tell me how to do this, do not really know, thanks Bodyx

Share this post


Link to post
Share on other sites
Scale the numeric output from the PID to a range of 0-100%

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