con_eng

PID problems

14 posts in this topic

I'm new to the forum and to CX programmer. I recently inherited an old system that I need to make changes to. I read the manual and all the forums I can find and for whatever reason I still can't make this PID(190) give me an output. The plc is a CS1G-H with version 6.0 programmer. Attached is the program please take a look at Loop 1 is the only one I'm concerned with.

 

Any help is appreciated

Copy of FV_01plc01v8.cxp

Share this post


Link to post
Share on other sites

Are you aware that the 2 PID instruction (loop 1 and 2) output to the same word D4091?

Share this post


Link to post
Share on other sites

Your problem appears to be with c+6.  See below:

wfJj4p+u7RB8AAAAABJRU5ErkJggg==

I am assuming that you meant to specify the highlighted yellow settings:

BxbHiAuJFyT5AAAAAElFTkSuQmCC

Therefore, the entry should be #0494.  With it set to #0449, you are selecting a 4 for bits 4-7 and a 9 for bits 0-3, neither of which is a valid option.

Side note:  The PID function does not work in simulation mode.  Just in case you are testing it that way.

Share this post


Link to post
Share on other sites

I'm not sure why I didn't catch that

thank you for your help

I will test that immediately and let you know how it goes

Share this post


Link to post
Share on other sites

Try adding this rung to your code:

 

+Ne8BAAAAcJPJbAIAAACgNIJNAAAAAJRGsAkAAAC

It clears out the "scratch pad" area for the instruction.  Sometimes there can be some invalid data in there that can mess it up. 

 

Also, what values are in D341 and D4000?

 

Share this post


Link to post
Share on other sites

D341 is the pv scaled 0-4000

D4000 is the sp scaled 0-4000

 trying to control it at about 1500

Share this post


Link to post
Share on other sites

I know what the variables are for.  What is the current PV and current SP?  For instance, if the SP was 1500 and the PV was 3000, you would not expect to get an output value.  Did you try the BSET command?

 

Share this post


Link to post
Share on other sites

D341 bounces between 1200 and 1700

D4000 is 1500

Share this post


Link to post
Share on other sites

Yes I did add in the rung you suggested Does there need to be a larger error to get the output?

Share this post


Link to post
Share on other sites

If it is bouncing around your setpoint like that with no output, then it is likely confused.  Try setting your setpoint to 3000.  With the control set up to be reverse mode, the setpoint needs to be higher than the PV to see output (as a general statement).  With PID, you can have some output with the PV>SP in reverse mode to try to avoid oscillation.

Share this post


Link to post
Share on other sites

That was it I now have an output

Thank you very much

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