adccommunitymod (AutomationDirect) asked a question.

PID Loops for dummies :)

Created Date: December 24,2012

Created By: rrc1962

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

Hi All...And Merry Christmas... I 've been working with the DL05 and 06 PLC's fro a while now and up until now I 've only done projects using on-off control. I'm wanting to start using PID loops instead. It looks fairly easy to setup but I don't really know where to start or how to set the loop parameters to get the desired results. Basically, I have two voltages, SV and PV. PV comes from a machine and will vary depending on the machines position. SV is set by the operator. I want the PID loop to compare the two and pulse a DC output. The pulse frequency needs to be proportional to the difference between SV and PV. The pulse frequency can also not exceed a high limit. The loop output must also be an absolute value. The loop algorithm may already do this. Here's where I'm headed with this.... I read SV and PV into their respective memory locations, the loop does it's thing and outputs a value into it's memory location. Call it CV In my program I use CV to set the pulse frequency. If CV exceeds the upper limit, I use the upper limit. If not, I use CV. I'd guessing that the gain in the PID setup could be used to multiply CV. For instance if the SV=10 and PV=5, then with a gain of 1, CV should = 5. If I set the gain to 2 then CV should = 10. Am I on the right track there? My other obstacle is writing the code to pulse an output. I 've not done that before either. The plan is to not use the H0-CTRIO module, but rather stay within the 7Khz limitation of the DC output. I'm sending a pulse stream to a servo driver and the servo doesn't need to spin real fast. I'm hoping 7Khz will be adequate. Any guidance would be greatly appreciated. Maybe some PID tutorials on the DL05/06 PLC's....Or just a push in the right direction. Thanks


  • adccommunitymod (AutomationDirect)

    Created Date: December 25,2012

    Created by: Do-more PE

    Take a look at Chapter 8 of the User Manual. It has a ton of information on PID.

    Also there is a good series of videos on the Learn site about PID with the Productivity 3000. While it is a different controller, the basics stay the same.

  • adccommunitymod (AutomationDirect)

    Created Date: December 27,2012

    Created by: rrc1962

    I'll take a look. I'm finding it more of a challenge just getting a clean pulse train. I loaded the example program in the 06 manual and I get very strange scope readings on Y0. The other thing I noticed is that the Y0 led does not light. I loaded a program to just switch the output and it still did not light. I'm wondering if I have a blown output on Y0. This an older 06 that's been kicking around the shop. I have a new 05DD coming.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: December 24,2012

    Created by: rrc1962

    Hi All...And Merry Christmas...

    I 've been working with the DL05 and 06 PLC's fro a while now and up until now I 've only done projects using on-off control. I'm wanting to start using PID loops instead. It looks fairly easy to setup but I don't really know where to start or how to set the loop parameters to get the desired results.

    Basically, I have two voltages, SV and PV. PV comes from a machine and will vary depending on the machines position. SV is set by the operator. I want the PID loop to compare the two and pulse a DC output. The pulse frequency needs to be proportional to the difference between SV and PV.

    The pulse frequency can also not exceed a high limit. The loop output must also be an absolute value. The loop algorithm may already do this.

    Here's where I'm headed with this....

    I read SV and PV into their respective memory locations, the loop does it's thing and outputs a value into it's memory location. Call it CV In my program I use CV to set the pulse frequency. If CV exceeds the upper limit, I use the upper limit. If not, I use CV.

    I'd guessing that the gain in the PID setup could be used to multiply CV. For instance if the SV=10 and PV=5, then with a gain of 1, CV should = 5. If I set the gain to 2 then CV should = 10. Am I on the right track there?

    My other obstacle is writing the code to pulse an output. I 've not done that before either. The plan is to not use the H0-CTRIO module, but rather stay within the 7Khz limitation of the DC output. I'm sending a pulse stream to a servo driver and the servo doesn't need to spin real fast. I'm hoping 7Khz will be adequate.

    Any guidance would be greatly appreciated. Maybe some PID tutorials on the DL05/06 PLC's....Or just a push in the right direction.

    Thanks

    Expand Post