Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
5 views

Lesson 2 Worksheet - Programming Foundation

PLC Programming Foundations

Uploaded by

Nathan Ombui
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Lesson 2 Worksheet - Programming Foundation

PLC Programming Foundations

Uploaded by

Nathan Ombui
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Programming Foundation

Lesson 2 Worksheet

Introduction
The milestone for Lesson 2 is to create a simple ladder logic program to start and stop a
generator and to turn on and off lights to indicate whether the generator’s engine is running or
not.

Make-Seal-Break Method
To begin, I want to show you an important programming technique that is borrowed from
old-school relay logic. This is what I call the “make-seal-break” method. It allows you to seal-in a
circuit and then break the circuit later even when you only have momentary buttons or switches
to turn on the circuit.

What if we wanted to only have to push a momentary push-button once to turn on (and keep on)
an output (light, relay, etc.). And what if we had another momentary push-button that we wanted
to to turn off the output? This is easily done with hardwired electrical circuits by putting one of
the normally-open (N.O.) contacts from a relay in series with the same relay’s coil.

You need to put another contact from another switch or button in parallel with the relay’s N.O.
contact so that you have a way to energize the coil initially. However, once the coil has been
energized by the switch or button, then the relay’s N.O. contact will close, sealing in the circuit.

The final thing you need in the circuit is a way to break the circuit after it has been sealed-in.
This could be done by putting a normally-closed (N.C.) contact in series with the the paralleled
N.O. contacts. When the push-button that drives the N.C.contact is activated the circuit/rung is
broken. In other words, the seal is broken.

IMPORTANT NOTE: when it comes to start/stop logic like we will see in a minute, it is
recommended to use a stop-button such that if the button fails or the wiring on the button
contacts fail, the start circuit will be interrupted and will shut down the motor. This is a safety
precaution to prevent an unstoppable situation arising from a failed wire or button contact. In a
PLC application this means you should use a N.C. contact from the stop push-button as the
input to the PLC. That way if the button is pushed OR if the button or wire fails the input will turn
off and if your logic is setup correctly than it will stop the motor.

Take a look at one example of a common “make-seal-break” circuit/rung. Notice the top N.O.
contact that “makes” the circuit, the lower N.O. contacts in parallel with the upper N.O. contact
that “seals” the circuit and then the N.C. contact in series that “breaks” the circuit (even if one or

1
Programming Foundation

both of the N.O. contacts are closed). Look at the three images to see the purpose of each
element:

2
Programming Foundation

Generator Start/Stop Program


We can replicate the circuit above with Ladder Logic by using the XIC, XIO and OTE
instructions in place of the N.O., N.C. contacts and the relay coil. One key thing to remember is
that one of the XIC instructions needs to have the same address as the OTE in order seal-in the
rung when the OTE is energized.

IMPORTANT NOTE: when it comes to start/stop logic like we will see in a minute, it is
recommended to use a stop-button such that if the button fails or the wiring on the button
contacts fail, the start circuit will be interrupted and will shut down the motor. This is a safety
precaution to prevent an unstoppable situation arising from a failed wire or button contact. In a
PLC application this means you should use a N.C. contact from the stop push-button as the
input to the PLC. That way if the button is pushed OR if the button or wire fails the input will turn
off and if your logic is setup correctly than it will stop the motor.

ALSO, you'll make the logic slightly different than diagrams shown above in that we want the
stop push-button (‘break’ instruction) a XIC instead of XIO. So that the circuit will only work
when the input is ON (in other words, button is NOT pushed and wiring is functional). It will
‘break’ the seal in the circuit (and block it completely) if the button IS pushed or the wiring has
failed.
Imagine the ‘Stop push-button’ is an E-stop, so with the E-stop active it is in the Normally open
position (XIC). We pull the E-stop out this closes the contact and allows you to press ‘Start
Push-button’ and start the machine. When pressed the E-stop will become an open circuit and
stop the machine. Same if the E-stop wiring was to fail the default position will be the safest
condition Normally Open.

Follow the steps below to create a new program with generator start/stop logic.
Start/Stop Logic
1. Open RSLogix Micro
2. Expand window
3. Select ‘File’
4. Select ‘New’
5. Choose a MicroLogix 1100 Series A controller
6. For the Processor Name change from “UNTITLED” to “GENSTART”
7. Click OK
8. Right-click ‘Program files’ in the left Project Organizer
9. Select ‘New’
10. Select ‘OK’ for the ‘Create Program File’
11. Open ‘LAD 2’

3
Programming Foundation

12. Go to the ‘User’ tab of the instructions and drag a new rung into LAD 2
13. Use the right arrow in the instruction list to find the ‘Program Control’ tab
14. Drag a new JSR instruction onto the new rung you added
15. Select the question mark within the JSR instruction and enter ‘3’
16. Open ‘LAD 3’ and add a new rung
17. Create a rung that looks similar to the circuit shown above using three (3) XIC
instructions (substitute a XIC in place of the XIO, see note in red above) and one
OTE instruction.
18. Address the top XIC to input I:0/0
19. Label it ‘Start Push-button’
20. Address the second XIC to input I:0/1 (Why XIC? see note in red above)
21. Label it ‘Stop push-button’
22. Address the OTE to output O:0/0
23. Label it ‘Start Gen Relay’
24. Address the lower XIC also to O:0/0 (so that it seals-in the rung)
25. Download to emulator (review download steps below if necessary as you will use
these repeatedly in the next few lessons)
a. Click “Verify Project

b. If errors exist, fix errors otherwise save the RSLogix Micro file

c. Open RSLogix Emulate 500, locate and open the file you just saved

4
Programming Foundation

d. Give it a station number of 01


e. Back in RSLogix Micro go to ‘System Comms’, locate the MicroLogix
1100 controller under the EMU500 driver and go online/download
26. Test logic by toggling the ‘Stop push-button’ to close the XIC, toggle the ‘Start
Push-button’ to start the gen, the toggling the ‘Start Push-button back to off.
Output should remain on. Toggle ‘Stop Push-button’ to turn it off.

Note: In reality using the start logic in rung 0000 would fire the engine which should then turn on
the input called “Engine Running” and should turn on and off the engine running/stopped
indication lights accordingly, but we don’t have real inputs wired so we need to simulate turning
on/off the “Engine Running” bit to verify the proper output lights turn on/off.

Important Simulating Note: Please note that since we are emulating a PLC with the emulator
software, we do not have any way to simulate inputs turning on and off EXCEPT to toggle the
bits manually. Therefore, when we want to see what happens in our program when an input
changes state, we will have to simulate it by manually toggling the bit on or off.

Engine Running Indication Logic


1. Take program offline to make additions to logic
2. Add two more new rungs
3. On rung 0001, add a XIC and an OTE
4. Address the XIC to input I:0/2
5. Label it ‘Engine Running’
6. Address the OTE to output O:0/1
7. Label it ‘Engine Running Light’
8. On rung 0002, add a XIO and an OTE
9. Address the XIO to I:0/2
10. Address the OTE to O:0/2
11. Label it ‘Engine Stopped Light’
12. Download to emulator
13. Test logic by toggling the ‘Engine Running’ input to see the ‘Engine Running’ and
‘Engine Stopped’ lights toggling on and off (NOTE: this input is NOT controlled by
the ‘Gen Start Relay’ output).

Simulating the logic (click the video thumbnail below and then click link that pops up to watch

🤖
the video):
Simulating PLC Programs + Data Tables - Watch Video

5
Programming Foundation

You might also like