Ladder Logic - Examples

Examples

Here is an example of what one rung in a ladder logic program might look like. In real world applications, there may be hundreds or thousands of rungs.

For example:

1. -------------|----|------( ) X | Y | S | | |----| Z

The above realizes the function: S = X AND ( Y OR Z )

Typically, complex ladder logic is 'read' left to right and top to bottom. As each of the lines (or rungs) are evaluated the output coil of a rung may feed into the next stage of the ladder as an input. In a complex system there will be many "rungs" on a ladder, which are numbered in order of evaluation.

1. ---------------|------|----( ) X | Y | S | | |------| Z 2. ---------------------------( ) S X T

2. T = S AND X

This represents a slightly more complex system for rung 2. After the first line has been evaluated, the output coil (S) is fed into rung 2, which is then evaluated and the output coil T could be fed into an output device (buzzer, light etc..) or into rung 3 on the ladder. (Note that the contact X on the second rung serves no useful purpose, as X is already defined in the 'AND' function of S from the 1st rung.)

This system allows very complex logic designs to be broken down and evaluated.

For more practical examples see below:


------------------------------------( ) Key Switch 1 Key Switch 2 Door Motor

This circuit shows two key switches that security guards might use to activate an electric motor on a bank vault door. When the normally open contacts of both switches close, electricity is able to flow to the motor which opens the door. This is a logical AND.

+-------+ ----------------------------+ +---- +-------+ Remote Receiver --|--------------+-----------------( ) | | |--------------| Interior Unlock

This circuit shows the two things that can trigger a car's power door locks. The remote receiver is always powered. The lock solenoid gets power when either set of contacts is closed. This is a logical OR.

Often we have a little green "start" button to turn on a motor, and we want to turn it off with a big red "stop" button. The stop button itself is wired as a normally closed switch. This means that when the stop button is in its normal state (not pushed), the PLC input will be true. When the stop button is pushed, the input will go false. This will make the rung false and stop the "run" output. A normally open contact must be used in the ladder diagram, since this input is normally turned on through the normally closed pushbutton contact, and turns off when the button is pressed.

--+------+-------( ) | start | stop run | | +------+ run ---------------------( ) run motor

This latch configuration is a common idiom in ladder logic. In ladder logic it is referred to as seal-in logic. The key to understanding the latch is in recognizing that "start" switch is a momentary switch (once the user releases the button, the switch is open again). As soon as the "run" solenoid engages, it closes the "run" switch, which latches the solenoid on. The "start" switch opening up then has no effect.

Read more about this topic:  Ladder Logic

Famous quotes containing the word examples:

    In the examples that I here bring in of what I have [read], heard, done or said, I have refrained from daring to alter even the smallest and most indifferent circumstances. My conscience falsifies not an iota; for my knowledge I cannot answer.
    Michel de Montaigne (1533–1592)

    It is hardly to be believed how spiritual reflections when mixed with a little physics can hold people’s attention and give them a livelier idea of God than do the often ill-applied examples of his wrath.
    —G.C. (Georg Christoph)

    Histories are more full of examples of the fidelity of dogs than of friends.
    Alexander Pope (1688–1744)