PLC Ladder logic project

Thread Starter

sonny patel

Joined Aug 19, 2019
4
I'm working on a project for a summer internship and was hoping for some assistance with PLC Ladder Logic. I have been trying for the last couple of days to program the PLC to do what I want but have been unsuccessful so far (it's my first time using ladder logic). I am using a LRD12RD024 PLC, a Banner Engineering laser sensor, an LED indicator light, and a foot pedal. The sensor and the foot pedal are my inputs and the LED is my output. My project is to reduce human error in a part-marking operation, more specifically reducing the amount of parts that are marked twice or not marked at all. I am using the background suppression (BGS) feature on the sensor (recognizes background as OFF position and anything placed in front of it turns it ON).

Here is how the intended sequence for the programming would look:

  1. i) Starts on: sensor in BGS and detects fixture as background (sensor light OFF)

    ii) Action: place part on fixture

    iii) Done when: part is recognized on fixture (sensor light ON)

  2. i) Starts on: part on fixture

    ii) Action: press foot pedal to mark part

    iii) Done when: fixture rotates part/part is marked

  3. i) Starts on: marked part is on the fixture

    ii) Action: remove part from fixture

    iii) Done when: part is removed and Sensor detects fixture (sensor light: OFF)

  4. repeat
My hope is that if a part of the sequence is skipped, the indicator LED will turn on. For example, if a part is marked and the operator attempts to press the pedal again (operator presses pedal twice), the the PLC would alert them that they are doing so as they didn't meet the necessary conditions to do so (removing the part and placing a new part on the fixture). Or if they try to remove a part before it is marked (skipping step 3), the PLC would give make the indicator LED go off.

I've attached picture of what I believe is the best starting point that I've had (I've tried to rewrite it different ways 4 times). The software that I came with the PLC uses M and N as auxiliary relays so I have been using them as temporary variables that could be manipulated to do what I want. C is counter, I is input, and Q is output. From the research I have done on Ladder Logic, I believe that these are the only 5 variables needed to make the program work. I have set I01 as the foot pedal, I02 as the sensor, C01 as counter 1, C02 as counter 2, Q01 as the LED indicator light, and the M and N's as temp variables.

The latest problem that I've run into deals with the counters. My idea was to simply have the counter count the number of times the pedal is pressed, but I ran into problems as I needed multiple counters (one for the ideal scenario and one for the undesired one (part marked twice)). Both of the counters need to be reset after each part is removed from the fixtures, but I could not find a way to make it so that the counter for the undesired case reset after the sequence ran through the ideal scenario. In the program I have wrote in the pictures, C02 keeps counting after C01 is reset, so when the sequence is restarted, the first time that the input I01 (foot pedal) is used, it runs both cases (ideal as it counted one input and undesired as it counted two inputs (one from the last cycle)).





If you have any idea of what to do or how the program would look, please let me know. It would be greatly appreciated. Don't hesitate to ask questions.
 

Attachments

MaxHeadRoom

Joined Jul 18, 2013
28,702
You would obviously need to detect when the part is removed, and this would provide a reset for the operator pedal registration, IOW if more than one pedal op without the part removal, then it would void the marking op.
I assume this is what you are looking for?
Max.
 

Thread Starter

sonny patel

Joined Aug 19, 2019
4
You would obviously need to detect when the part is removed, and this would provide a reset for the operator pedal registration, IOW if more than one pedal op without the part removal, then it would void the marking op.
I assume this is what you are looking for?
Max.
Thank you! I just implemented that and I have not run into any bugs with it so far.

Do you have an idea of how I would make sure that a part is marked (ex: light turns ON if a part is placed on the fixture and then removed with out pressing the pedal)?
 

MaxHeadRoom

Joined Jul 18, 2013
28,702
Inhibit removal until pedal is pressed. Also a possible alarm/indicator light to flash?
BTW when creating a ladder, it is ideal to sign a meaningful label to each function.
All S/W I have used usually has this option, as well as the individual address of the Boolean function. I/O, Output etc.
ex. IO2 and below, sensor light.
Incidentally the description 'Light' using indicates an output, not an input function, how is this achieved?
Max.
 
Top