adccommunitymod (AutomationDirect) asked a question.

CLICK Programming

Created Date: February 01,2014

Created By: kevindoss

**** 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.****

I am trying to do what I thought was a simple thing with the click PLC. I am new to PLC programming, and may be over thinking things, but this is what I am trying to do. If X001 Active Then SET Y001 out Until X002 Active Then RESET Y001 ELSE If X001 and X002 Active Then SET Y002 and Y003 Active Until X003 Active Then RESET Y002 and Y003 ELSE If X001 and X003 Active Then SET Y004 and Y005 Active Until X002 Active Then RESET Y004 and Y005 End Of Program I need it to continually loop through this checking for the status of the inputs. I have tried this several different ways using the ladder logic of the main program and also using the call function to call subroutines with varied results, but never exactly what I am looking for. Any help for a rookie would be appreciated. Thanks in advance


  • adccommunitymod (AutomationDirect)

    Created Date: February 01,2014

    Created by: plcnut

    Three rungs:

    STR X001 ANDN X002 OUT Y001

    STR X001 AND X002 ANDN X003 OUT Y002 OUT Y003

    STR X001 AND X003 ANDN X002 OUT Y004 OUT Y005

  • adccommunitymod (AutomationDirect)

    Created Date: February 01,2014

    Created by: kevindoss

    More Detail

    Let me give a little more detail.

    X001 - Momentary Push Button

    X002 - Positive Limit

    X003 - Negative Limit

    Y001 - Turn On Spinner

    Y002 - Move Positive

    Y003 - Move Negative

    So here is what should happen when I hit the start button

    X001 (if X002 or X003 NOT Active) Set Y003 (Move the head Negative)

    X003 (Limit for Negative Direction) Reset Y003 (Stop Motion)

    If

    X001 and X003 (Start Button and Neg Limit) Set Y001 and Y002 (Turn Head on and Move Positive)

    X002 (Pos Limit) Reset Y001 and Y002 (Turn Head Off and Stop Pos Motion)

    Else If

    X001 and X002 (Start Button and Pos Limit) Set Y001 and Y003 (Turn Head on and Move Negative)

    X003 (Neg Limit) Reset Y001 and Y003 (Turn Head Off and Stop Neg Motion)

    Not sure if this make better since or not.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: February 01,2014

    Created by: plcnut

    Now the SET's make more sense.

    Try this:

  • adccommunitymod (AutomationDirect)

    Created Date: February 01,2014

    Created by: kevindoss

    Thanks plcnut

    Got another question though.

    What is using the Positive Differential contact doing. Is it because its a momentary contact?

    Sorry for all the questions, just trying to get my head wrapped around this.

  • adccommunitymod (AutomationDirect)

    Created Date: February 01,2014

    Created by: plcnut

    Positive differential means that the contact will only be on for 1 scan when the input turns on. If you used a normal contact, then if someone held the start button down, as soon as one cycle completed, the next cycle would start. The program I posted will not start the next cycle unless the start button is released and pressed again.

  • adccommunitymod (AutomationDirect)

    Created Date: February 01,2014

    Created by: milldrone

    kevindoss,

    In this file there are two versions that may work for you. The first one, (above the end rung) uses the explanation you provided (note the rung comments) and is laid out just like your explanation.

    The second version (below the end rung) should also work, but in my opinion is hard to understand and rung order is important (resets need to be before the sets).

    Edit: I just noticed that the first example used a Y1 OUT on rung 6 it should have been an Y1 RST, sorry.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: February 03,2014

    Created by: kevindoss

    Thanks to PLCNut and MillDrone for all the help. This has given me a better understanding of the Logic behind what the PLC is doing.

    This should give me the ground work to better utilize PLC's into the many applications that I use.

    Thanks Again

  • adccommunitymod (AutomationDirect)

    Created Date: February 04,2014

    Created by: kevindoss

    Here is another thing I am not understanding. I got the program working they way I wanted it to work, Then I chenged out my limit switches for normally closed thinking that all I should have to do is change the inputs to a normally closed contact. For some reason doing it this way causes one limit to cancel out the other when going through the ladder logic because it is already closed. I have attached the file to see if anybody can figure out what is wrong with it.

    Thanks

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: February 04,2014

    Created by: plcnut

    I'm using my iPhone, so I can't look at your program, but...

    I would guess that your problem is an AND vs. OR problem.

    A simple fix (without being able to look at your program), would be to replace the X bits with C bits in your program.

    Now at the top of your ladder enter:

    X001 C001

    -]/[--(OUT)

    For each of your inputs.

    This will effectively 'invert ' the logic All you have to do is Change the NOT at the 'X ' level, and all the rest of your logic is fine.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: February 05,2014

    Created by: kevindoss

    Is there an programmers guide that explains all this stuff. I got it working by using the down edge on the limits that were normally closed on a rung that was resetting. I 've got a lot of redundant checks to make sure the position of the head of the machine before running. This was causing it to drop out some of the out puts because it was checking it when it opened the limit and closing it.

    Would still like to find a good guide that explains all the contacts and how to use them.

    Love to get into the analog inputs and calculations that can be done.

    Thanks for all the help.

    Expand Post
10 of 12