Clx Pid

jim767

Member
Join Date
Sep 2006
Location
ohio
Posts
84
I'm using a PID to control a guide. PV is +/- 10 VDC, CV is +/- 10 VDC.Setpoint will be when the PV is at 0 VDC. Must be able to switch from auto mode to manual mode and move the guide using manual pushbuttons. Wanted to know if my use of the PID timer is correct and logic for .swm basically a quick look at the logic for guide1 would sincerely be appreciated, I'm still in the learning process.
Thanks
Jim
 
jim767 said:
I'm using a PID to control a guide. PV is +/- 10 VDC, CV is +/- 10 VDC.Setpoint will be when the PV is at 0 VDC. Must be able to switch from auto mode to manual mode and move the guide using manual pushbuttons. Wanted to know if my use of the PID timer is correct and logic for .swm basically a quick look at the logic for guide1 would sincerely be appreciated, I'm still in the learning process.
Thanks
Jim

What is the purpose of PID_Timer. I don't see it doing anything in the code.

I would put the PID is the main continuous task and increase the loop update time to about 0.25 to 0.5 seconds. If this is a guide vane for a compressor that should be fast enough, but if not use 0.05 to .1 secs.

Introduce some deadband based on how stable you analog input is .
If the an in is bouncing +/- 0.01v when all is steady, then set deadband to at least that. This will prevent the PID from being too jittery.

Have you actually tried this PID or are you just 'messing' around on the bench. I noticed there is no 'I'.
 
Last edited:
I was thinking the timer was my PID trigger but since I have it in a periodic task. Are you saying its meaningless? I thought I had it in a continuous task. I should remove it and set my update time for the PID the same as the update of the periodic task, correct?

The threads that I've read say it is much better to use a periodic task, why do you suggest continuous. In the continuous I will need the trigger timer from what I have read.

This is for a center guide for large metal coils. The detector outputs 0 when the strip is on center. Output to the hydraulics is done by a (+/- 10 VDC) signal to a bosch servo valve with on board electronics. Currently I have a test bench set up and the code works with actual detector and output (+/- 10 volts) to a small drive which runs a actuator but I want to learn the proper method for writing the logic so I am in the write, learn, test mode and will eventually have to provide something.

Normally our company made controllers which we did not need to use any Integral for this type of guiding. Even though the unit provided adjustment for it. Normally it was set at zero, but since we will be replacing the control with CLX, I would like to provide the flexability to use the I and D also. As did the old controller, therefore the need to set it up correctly.

Thanks, I'd appreciate more suggestions and will revise the code.
 
pidex_1.jpg



Typically this is how I do PIDs. It is always in a continuous task, as it works for me. I just have an enable bit to turn on the PID. When the PID is OFF, I always force the output from the PID to 0.


pidesx_2.jpg



Ian
 
I would put the PID is the main continuous task and increase the loop update time to about 0.25 to 0.5 seconds.

It is always in a continuous task, as it works for me.

I thought I had it in a continuous task. I should remove it and set my update time for the PID the same as the update of the periodic task, correct?

The threads that I've read say it is much better to use a periodic task, why do you suggest continuous. In the continuous I will need the trigger timer from what I have read.

Using PID in periodic task is a better (and prefered in CLX) way.
With task rate equal to loop update time you will execute PID on exact time basis.
I beleive this timer you see was used originally to trigger PID while it was in cont.task - this method is OK as well but less efficient than periodic task.

With CLX (or PLC5) you can't run PID uncondiitonal in cont task like you do in SLC: time based gains will not calculate correctly and CV will be scan time dependent.


How many time people at this forum asked:

I just upgraded my PLC5 to a newer (faster) PLC5 model and now my PID is not working correcly - why I have to re-tune it?
Same with CLX switching from L1 to L6x.
This is a direct result of using PID in cont task without a trigger.
http://www.plctalk.net/qanda/showthread.php?t=11391
http://www.plctalk.net/qanda/showthread.php?t=16769
http://www.plctalk.net/qanda/showthread.php?t=2473
http://www.plctalk.net/qanda/showthread.php?t=2404
 
Last edited:
Wow, you are correct. I have been reading (RTFM) about the PID and I have been doing wrong all along, eventhough the PIDs have been working.

I am doing a startup in 2 weeks with 2 PID loops, both identical. For Sh*ts and giggles, I will try both methods, the right way and my way and see what happens

Ian
 
For Sh*ts and giggles, I will try both methods, the right way and my way and see what happens
Guess what? both will work, just gains will be different.

Once you got them working modify to the program, so cont task scan time increases or decreases 5 times and test you PID again
Trigger type will be still working, "your way" PID will have to be re-tuned.
 

Similar Topics

Has anyone ever converted a the PID instruction from a PLC5 to a CLX platform? The issue I am facing concerns the difference between a PID...
Replies
10
Views
3,456
Having to recreate an existing SLC/RS500 program into a CLX/RS5000 version. 99% is complete, but one issue remains: a half-dozen PID instructions...
Replies
4
Views
4,442
Anyone have a tested methodology of converting SLC ladder PID parameters to ControlLogix ladder PID (not FB PIDE) parameters. Talked to Rockwell...
Replies
10
Views
7,916
I have an application using an eddy current coupling to transmit torque from an AC motor to a brake module. The coupling is needed so the AC motor...
Replies
3
Views
4,093
I am tuning a small drive that turns a flywheel and moves it to different setpoints. As far as I know, the PID instruction should be in a...
Replies
6
Views
4,493
Back
Top Bottom