Announcement

Collapse
No announcement yet.

Using counter and Compare Command

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts


  • Using counter and Compare Command

    Alternating Pumps 12 hr test.zip
    Hello all,

    I'm using a Click C0-01DD1-D to control 2 pumps that I want to altenate every 12 hours.

    I attached a copy of what I got so far, ( with the help of this fourm members) I have this on the bench and it does work. This is working for a 2 pump design, but what if I wanted to alternate between more pumps. What I would like to do is use a counter and compare the vaule in the counter to alternate between the pumps. I been trying a few things but I'm having problems, I can't figure out how to reset the counter and not change the current pump running. Any ideas to push me in the right direction?
    Last edited by celect; 05-18-2011, 08:51 AM.


  • #2
    Here is what i came up with and it seems to be working.
    I was using a counter with a count of 2. Instead of using 0 and 1 to compare I was using 1 and 2.
    Attached Files

    Comment



    • #3
      celect,

      I have always found it beneficial to view another guy's work. You have already shown yours so here is mine.
      Attached Files
      PERCUSSIVE MAINTENANCE: The fine art of whacking the devil out of an electronic device to get it to work again.

      Vaughn

      Comment



      • #4
        Very nice! I like your thought process.

        I'm just getting up to speed automation direct PLC's I bought a Click PLC to see what it can do.

        I use Allen Bradley, with AB I used to move vaules into bits to get what I wanted done.

        I haven't been able to solve this with the Click yet.

        Thanks for repling and sharing your knowledge.
        Last edited by celect; 05-19-2011, 05:19 PM. Reason: typo

        Comment



        • #5
          Originally posted by celect View Post
          I use Allen Bradley, with AB I used to move vaules into bits to get what I wanted done.

          I haven't been able to solve this with the Click yet.
          Can you elaborate on the move values into bits thing? Maybe I can think of something.
          PERCUSSIVE MAINTENANCE: The fine art of whacking the devil out of an electronic device to get it to work again.

          Vaughn

          Comment



          • #6
            @milldrone
            Thanks for sharing your program. In Celect's program he mentioned he wanted the current pump to stay online until the next one is confirmed online. I took the liberty of adding that logic to your program.
            Attached Files

            Comment



            • #7
              An example of what I would do is set up a major fault bit.

              @ milladrone Thanks here is what I was speaking of:

              In Allen Bradley I would use the NEQ and Source A would be B3:5 and source B would be set to 0.
              So I would look at the whole word of B3:5 and if any bit had anything other then 0 in it I would engerized my major fault bit B3:20/0.

              So lets say I had a sensor that was blocked too long or faulty I would latch a bit say B3:5/11.
              So now a 1 was place into B3:5/11 and my B3:20/0 bit would be engerzied.
              I would set up different faults for the bits in B3:5

              I would then use an Input from a Reset button to Clear B3:5.

              When using an HMI I would also send to it using a MOV instruction to display the fault information.

              @ ebalrde Thanks for your insight, that is a good idea.

              Comment



              • #8
                celect,

                See if this meets your needs. The bit to word and word to bit handling in the CLICK is not as flexible or powerful as in some other PLC's.
                alarmword.zip

                Originally posted by celect View Post

                @ ebalrde Thanks for your insight, that is a good idea.
                As I said I always like to see what the "other guy" does to handle a situation.
                PERCUSSIVE MAINTENANCE: The fine art of whacking the devil out of an electronic device to get it to work again.

                Vaughn

                Comment



                • #9
                  Thanks, this was very intresting.
                  I'm going to write some logic using Copy/pack instruction.

                  Comment

                  Working...
                  X