Brktman (Customer) asked a question.

I need to add a counter to a timed drum to a Click pic. I have an input photo switch that I want to count up. Can anyone give me an example of code and the best way to add it to the timed drum? I have added a new step to DS2 along with the input but can’t

Click PLC- Counter in a timed drum


    • Brktman (Customer)

      Thanks Garry,

       

      I have watched the video before, that is what got me this far. How do I add the contact counter in parallel with the enable condition, and what would that code look like? That’s where I’m having trouble.

       

      Could I add a new step feature and add the counter contact in parallel with that instead?

       

       

      Expand Post
      • Todd Dice (Customer)

        Not knowing exactly what you want, I believe Garry is describing something like this:Screenshot 2021-02-27 094123

      • Brktman (Customer)

         

        Am I even on the right track? Notice the error. This sequence needs to start after step 5 in the middle of the drum, count up to 8 then continue to step 6Screenshot (1)

      • Todd Dice (Customer)

        First error has to do with your enable to your drum, and second is you're missing a line of logic to reset your counter.

         

        To do what you ask:

         

        • You need a compare (DS1 *equal* 5) after the N.O. X3, on your counter.
        • Past whatever condition(s) you have enabling the drum, you'll need a compare (DS1 *not equal* 5) and ORing around the compare you'll want a N.O. CT1.
        • You'll need a condition to reset your counter, so use a compare (DS1 *equal* 6) .

         

        You can winzip your code, attach, and I or another can give some assistance.

        Expand Post
  • Brktman (Customer)

    Does this look correct now? I don't get any errors when checked. Sorry I couldn't get all the code in one screen shot. Thanks for the help!Screenshot (3)Screenshot (2)

    Expand Post
  • Garry (Customer)

    Your CT1 contact should be in parallel with the compare contact. This should be on the enable rung for the Drum instruction.

    If you attach your program we can look at it.

    Regards,

    Garry

  • Brktman (Customer)

    This must still be wrong as now I get an errorScreenshot (4)

10 of 37