nasir_ash

PID parameters settings

13 posts in this topic

Dear Mates, Happy New Year!!! i am new in plc programming, want to learn use of PID command i am using a 4-20mA input and scale it (#30---#7FF that converts to 0--100) make a small step for continous change of the input and getting a perfect output after scaling when i am using the scalled output in PID command, as Input word and setting the parameters as below, getting no output. the error flag is ON ( program is attached) For C #100 For P, C+1 &500 For I, C+2 turn if off &9999 For D, C+3 turn if off &0000 For t, C+4 say &50 which corresponds to a 0.5 sec sampling period Leave C5 &0001 C6 #0404 C7 to onwords not using please help me, whats going wrong here. regards NASIR PID TEST.cxp

Share this post


Link to post
Share on other sites
NASIR When I do PID in an Omron PLC, I use '9' for digit xxXx in C+6. Instead of 0404 in D00036, try 0494.

Share this post


Link to post
Share on other sites
Dear Mate after making settings dm36=9999, or dm36=0494 the P_CY flag turn ON and OFF, Try to reduce the Prop Gain to 50, and fixed the sampling time to 0.1s, b but the out put is still ZERO.

Share this post


Link to post
Share on other sites

Hi, here is an example of PID control that is copied from a program for CJ2H, but I have tried to strip out the incompatible parts. Also, the parameters are supposed to be entered from a PC-HMI, but there should be no problem just entering them directly into the program.

PID example.cxp

2 people like this

Share this post


Link to post
Share on other sites
It is a good idea to set the "Work Area" of the PID function to 0 on first scan. In the attached example above, you would do a BSET #0 D3109 D3138 to set the values of D3109 to D3138 to 0 on the first scan (P_First_Cycle). Adding this one step has fixed issues with the PID instruction in the past for me. It is recommended in the programming manual.
1 person likes this

Share this post


Link to post
Share on other sites
Also, The PID instruction does not operate in simulation mode , you need the physical hardware.

Share this post


Link to post
Share on other sites

Dear guy,

how can i download the above example?

i cannot see any link or button to download it. Please guide. thanks.

Share this post


Link to post
Share on other sites

Chou, there was issues with a recent site update.  I have added it back to the post for you.

Share this post


Link to post
Share on other sites

Hi

I have a problem with PID function on a CP1-e plc.

I try to simulate the PID in the CX-Programmer with no success .

I try all the variant PID, PIDAT, but i do not obtain any value to the output word.

Any solution?

Is an limitation of the program ?

Thank you

Share this post


Link to post
Share on other sites

It is normal, it don't work in simulator.

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