Sei sulla pagina 1di 40

Programmable Logic Controllers

Programmable Logic controller

Automation Lab PLC Architecture

Programmable Logic controller

Micrologix 1100 Panel

Micrologix 1100 I/Os

Analog Input Module

Analog Output Module

Relay Contacts

Micrologix 1100

I/O Addressing

Programmable Logic controller

I/O Addressing Examples

10

Instruction Set

XIC [Examine if Closed]


This instruction (also called "examine on" or "normally opened") functions as an input or storage bit. If the corresponding memory bit is a "1" (on), this instruction will allow rung continuity and outputs will be energized.

Programmable Logic controller

11

Instruction Set

XIO [Examine if Open]


This instruction (also called "examine off" or "normally closed") functions as an input or storage bit. If the corresponding memory bit is a "1" (on), this instruction will not allow rung continuity and outputs on its rung will be de-energized. If the corresponding memory bit is a "0" (off), this instruction will assume its normal status and allow rung continuity and outputs on the rung will be energized.
Programmable Logic controller 12

Instruction Set

OTE [Output Energize]


This instruction sets the specified bit when rung continuity is achieved (rung goes true). Under normal operating conditions, if the set bit corresponds to an output device, the output device will be energized when the rung goes true.

Programmable Logic controller

13

Instruction Set

OTL [Output Latch]


This instruction functions much the same as the OTE with the exception that once a bit is set with an OTL, it is "latched" on. Once an OTL bit has been set "on" (1 in the memory) it will remain "on" even if the rung condition goes false. The bit must be reset with an OTU instruction. Latch and unlatch instructions must be assigned the same address in your logic program. Output addresses are specified to the bit level.
Programmable Logic controller 14

Instruction Set

OTU [Output Unlatch]


Use this output instruction to unlatch (reset) a latched (set) bit which was set by an OTL instruction. The OTU address must be identical to the OTL address which originally set the bit. Note: In the event of a power loss, any OTL controlled output device will energize with the return of power if the OTL bit was set when power was lost.

Programmable Logic controller

15

Timers & Counters


Delay turning ON an output: Delay turning OFF an output: Time an event retentively:

TON TOF RTO CTU CTD

Count Up: Count Down:

Programmable Logic controller

16

Understanding Timer and Counter Instruction Terms

Accumulated Value (ACC)


For

a timer, this is the number of timebase intervals the instruction has counted. For a counter, this is the number of false-to-true transitions that have occurred.

Preset Value (PRE)


The

preset value is the set point that you enter in the timer or counter instruction. When the accumulated value becomes equal to or greater than the preset value, the done status bit is set. You can use this bit to control an output device.
17

Understanding Timer and Counter Instruction Terms

Timebase
The

timebase determines the duration of each timebase interval.

Timer Data File Element


15
Word

14 TT

13 DN

12

11 0

0: Word 1: Word 2:

EN

Preset Value Accumulated Value


18

Understanding Timer and Counter Instruction Terms

Counter Data File Element


15
Word

14 CD

13 DN

12 OV

11 0 UN

0: Word 1: Word 2:

CU

Preset Value Accumulated Value

19

TON [Timer On-Delay]


Use the TON instruction to turn an output on or off after the timer has been ON for a preset time interval. This output instruction begins timing (at either one second or one hundredth of a second intervals) when its rung goes "true." It waits the specified amount of time (as set in the PRESET), keeps track of the accumulated intervals which have occurred (ACCUM), and sets the DN (done) bit when the ACCUM (accumulated) time equals the PRESET time.

Programmable Logic controller

20

TON [Timer On-Delay]

Preset Accum

As long as rung conditions remain true, the timer adjusts its accumulated value (ACC) each evaluation until it reaches the preset value (PRE). The accumulated value is reset when rung conditions go false, regardless of whether the timer has timed out. If power is lost while a TON is timing but has not reached its preset value, the EN, and TT bits remain set , and the accumulated value (ACCUM) remains the same.
21

DN

TON Example
Cylinder 1A1 extends, if start button S1 is actuated. Once this has been extended for 2s, a second cylinder 2A1 move to its forward end position. Sensors 1B1 and 1B2 indicates the retracted and the forward end positions of cylinder 1A1.

22

TOF [Timer Off-Delay]


Preset Accum

Use the TOF instruction to turn an output on or off after its rung has been off for a preset time interval. The TOF instruction begins to count timebase intervals when the rung makes a true-to-false transition. As long as rung conditions remain false, the timer increments its accumulated value (ACC) based on the timebase for each scan until it reaches the preset value (PRE). The Accumulated value is reset when rung conditions go true regardless of whether the timer has timed out.
23

DN
Programmable Logic controller

TOF [Timer Off-Delay]


Status bits: 13 = DN (done bit): Set when rung conditions are true; remain so until rung conditions go false and the accumulated value is greater than or equal to the preset value. 14 = TT (timer timing bit): Set when rung conditions are false and the accumulated value is less than the preset value; remain so until rung conditions go true or when the done bit is reset. 15 = EN (enable bit): Set when rung conditions are true; remain so until rung conditions go false.
24

RTO [Retentive Timer On-Delay]

Preset Accum

DN

An RTO function the same as a TON with the exception that once it has begun timing, it holds its count of time even if the rung goes false, a fault occurs, or power is lost. When rung continuity returns (rung goes true again), the RTO begins timing from the accumulated time which was held when rung continuity was lost. By retaining its accumulated value, retentive timers measure the cumulative period during which rung conditions are true. The accumulated value can be reset by the RES instruction.
25

RTO Example
Pressing of the start button S2 is to cause the piston of a cylinder to advance. This mechanism is used to clamp workpieces. When the piston advance fully, it is to remain in this position for 20 seconds. The cylinder then returns to its initial position.

26

RES [Reset]

The RES instruction is used to reset timers and counters. When conditions preceding it in the rung are true, the RES resets the accumulated value and control bits of the timer or counter. Make sure that the timer or counter being controlled by the reset instruction has the same address as the reset instruction. For example, if your RTO address is T4:1, your RES address must also be T4:1.
27

RES [Reset]

When resetting a counter, if the RES instruction is enabled and the counter rung is enabled, the CU or CD bit is reset. Warning! Do not use the RES instruction to reset a TOF instruction. A RES always clears the status bits and the accumulated value. This could result in unpredictable machine operation or injury to personnel.

28

CTU [Count Up]

This output instruction counts up for each false-to-true transition of conditions preceding it in the rung and produces an output when the accumulated value reaches the preset value. Rung transitions might be triggered by a limit switch or by parts traveling past a detector. The ability of the counter to detect false-to-true transitions depends on the speed (frequency) of the incoming signal. The on and off duration of an incoming signal must not be faster than the scan time.

Programmable Logic controller

29

CTU [Count Up]

Each count is retained when the rung conditions again become false, permitting counting to continue beyond the preset value. This way you can base an output on the preset but continue counting to keep track of inventory/parts, etc. Note: Use a RES (reset) instruction with the same address as the counter, or another instruction in your program to overwrite the value.

Programmable Logic controller

30

CTU [Count Up]


Counter files use three words per element. Instruction Bits:


12 = OV (count up overflow) bit 13 = DN (done) bit 15 = CU (count up enable) bit

The ON or OFF status of counter done, overflow, and underflow bits is retentive. The accumulated value and control bits are reset when a RES is enabled.
31

Programmable Logic controller

CTD [Count Down]

This output instruction counts down for each false-to-true transition of conditions preceding it in the rung and produces an output when the accumulated value reaches the preset value. Rung transitions might be triggered by a limit switch or by parts traveling past a detector. Each count is retained when the rung conditions again become false. The count is retained until a RES (reset) instruction with the same address as the counter is enabled.
32

Programmable Logic controller

CTU [Count Down]


Counter files use three words per element. Instruction Bits:


11 = UN (count down underflow) bit 13 = DN (done) bit 14 = CD (count down enable) bit

The accumulated value and control bits are reset when a RES is enabled.

Programmable Logic controller

33

CTU Example

Parts are to be ejected from a gravity-feed magazine via a cylinder. If Push button S1 is actuated, the cylinder is to advance, eject a workpiece and then retract again. 15 parts are to be ejected in this way. When 15 parts have been ejected, it should no longer be possible to trigger a cylinder movement via push button S1. First the counter must be reset by actuating push button S2.
34

Level Application

We are controlling lubricating oil being dispensed from a tank. This is possible by using two sensors. We put one near the bottom and one near the top, as shown in the picture.

Here, we want the fill motor to pump lubricating oil into the tank until the high level sensor turns on. At that point we want to turn off the motor until the level falls below the low level sensor. Then we should turn on the fill motor and repeat the process.
Programmable Logic controller 35

Level Application

Here we have a need for 3 I/O (i.e. Inputs/Outputs).


2 are inputs (the sensors) and 1 is an output (the fill motor). Both of our inputs will be NC (normally closed) fiber-optic level sensors. When they are NOT immersed in liquid they will be ON. When they are immersed in liquid they will be OFF.
Low Level High Level I:0.0/0 I:0.0/1 O:0.0/0 B3:0/0
Programmable Logic controller 36

Input:

Output: Fill Motor Internal Utility Relay

Level Application

Initially the tank is empty. Therefore, input I:0.0/0 is TRUE and input I:0.0/1 is also TRUE Gradually the tank fills because O:0.0/0 (fill motor) is ON. After some scans the oil level rises above the low level sensor and it becomes open. (i.e. FALSE). Fill motor remains ON till oil level reaches and touches high level sensor and it also becomes open. (i.e. FALSE).
Programmable Logic controller 37

Level Application

As soon as both sensors are false, we want fill motor OFF. Oil level starts decreasing making High Level sensor ON. As soon as Low level sensor is ON, we want fill motor to ON again. And this sequence continues.

Programmable Logic controller

38

PLC Problem Class Assignment

Programmable Logic controller

39

PLC Problem

When a part is placed on the conveyor at position 1, it automatically moves to position 2. Upon reaching position 2, it stops and is stamped. After stamping, it automatically moves to position 3. It stops at 3, where the part is removed manually from the conveyor. Assume that only one part is on the conveyor at a time. The three visual indicators are showing status of the system, Light: Power ON, Go: Part is in process, Stop: Process stopped. LS1, LS2, and LS3 are magnetic proximity switches. LSUP and LSDN are two limit switch to sense the position of stamper. Up & Dn are two solenoids to control operation of double acting stamping cylinder. Conveyor motor is controlled by an external ON/OFF relay to get the desired conveyor movement.
Programmable Logic controller 40

Potrebbero piacerti anche