08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

36
Chapter 03 Logic Concepts, Latch/Unlatch, Intro to Processor Status File PLC Memory Structure and Programming concepts

Upload: john-todora

Post on 27-Jun-2015

384 views

Category:

Education


1 download

TRANSCRIPT

Page 1: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

Chapter 03 Logic Concepts, Latch/Unlatch, Intro to Processor Status FilePLC Memory Structure and Programming concepts

Page 2: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

The Binary Concept – Multiple Input

This two-state binary concept, applied to gates, can be the basis for making decisions in ladder logic.

The gate is a device that has one or more inputs and one output.

The gate will perform a logical decision based on the status of its inputs and produce a result at its one output.

Page 3: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

Using Gates to Make Decisions

The logical AND gate or function. All inputs must be true to obtain an output.

ANDGate

HeadlightSwitch

High Beam Switch

High BeamLight

The automotive high beam light can be turned on when the light switch AND the high beam switch are on.

Page 4: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

Using Gates to Make Decisions

The logical OR gate or function. Any one input must be true to obtain an

output.

ORGate

PassengerDoor Switch

Driver DoorSwitch

Dome Light

The automotive dome light will be on when the passenger door OR the driver door or both door switch(s) is activated.

Page 5: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

The AND Function

The AND function has two or more inputs and one output. The input signals are labeled A, B, C, etc. and the output signal is labeled Y.

A binary 1 represents the presence of a voltage (signal). A binary 0 represents the absence of voltage (no signal, 0 V or ground).

Logic functions can be represented using a truth table. The truth table lists all possible input status conditions with the corresponding output status for each set of input condition.

ANDGate

A

BYInputs

Output

Two input AND gate

Page 6: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

An AND Gate Application

An AND gate functions like switches in series. The light will only be ON when switch A AND

switch B are both closed.

ANDGate

PB1 = 1LT1 ON

PB2 = 1

Page 7: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

The OR Function

The OR function has two or more inputs and one output. The input signals are labeled A, B, C, etc. and the output signal is labeled Y.

A binary 1 represents the presence of a voltage (signal). A binary 0 represents the absence of voltage (no signal, 0 V or ground).

Logic functions can be represented using a truth table. The truth table lists all possible input status conditions with the corresponding output status for each set of input condition.

ORGate

A

BYInputs

Output

Two input OR gate

Page 8: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

An OR Gate Application

An OR gate functions like switches in parallel. The light will be ON when either or both switch A

OR switch B are closed.

ORGate

PB3 = 1

PB4 = 0LT2 ON

Page 9: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

The NOT Function (Inverter)

The NOT function gate, also called an inverter, has one input and one output.

The NOT gate functions like its name states, it inverts the input signal status.

If the input is a 1 the output is a 0.

If the input is a 0, the output is a 1.

Input InputA A

(not A)

Page 10: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

A NOT Gate Application

The NOT gate functions like a normally closed switch. The light will be ON if the switch is NOT being activated

and OFF when the switch IS being activated.

Input InputPB5 PB5

(not PB5)

Page 11: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

The NAND Function

The NAND gate functions like an AND gate with an INVERTER on its output.

The only time that the output of a NAND gate is a 0 is when all the inputs are a binary 1.

NANDGate

PB6

PB7Light

Two input NAND gate

Page 12: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

The NOR Function

The NOR gate functions like an OR gate with an INVERTER on its output.

The only time that the output of a NOR gate is a 1 is when all the inputs are a binary 0.

NORGate

PB8

PB9

LT5

Two input NOR gate

Page 13: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

The XOR (Exclusive- OR) Function

The XOR gate has two inputs and one output.

The output of this gate is a 1 when the two inputs are opposite to each other. Therefore, one input a 1 and the other a 0.

The output of this gate is a 0 when both inputs are the same, either two 0’s or two 1’s.

XORGate

PB10

PB11

LT6

Page 14: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

Important!

When reading or designing PLC/PAC ladder logic it’s not enough to only have the PLC/PAC ladder logic. You MUST know the status of the input field device(s).

The circuits on the following slides will help support this idea.

While reading the following circuits, remember how the I/O interacts with the PLC/PAC instructions in memory.

Page 15: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

AND Gate Circuits

ANDGate

LS10

LS10ASOL010Inputs

Output

Two input AND gate

Electromechanical Ladder Diagram

PLC/PAC Ladder Diagram

Page 16: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

OR Gate Circuits

ORGate

LS011

LS012Sol011Inputs

Output

Two input OR gate

Electromechanical Ladder Diagram

PLC/PAC Ladder Diagram

Page 17: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

Combinations of Gates

ORGate AND

Gate

LS013

LS014 LT013

InputsOutput

CR

Electromechanical Ladder Diagram

PLC/PAC Ladder Diagram

Page 18: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

Combination of Gates

ANDGate

ORGate

ORGate

LS015

LS016

LT016Inputs

OutputCR01

CR02

Electromechanical Ladder Diagram

PLC/PAC Ladder Diagram

Page 19: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

Combination of Gates

ANDGate

ORGate

LS017

LS031

AH017Inputs Output

LS018

Electromechanical Ladder Diagram

PLC/PAC Ladder Diagram

Page 20: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

Combination of Gates

ANDGate

ORGate

ANDGate

PB019

PB020

LT019InputsOutput

PB021

PB022

Electromechanical Ladder Diagram

PLC/PAC Ladder Diagram

Page 21: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

Why is thisinstruction

programmed open?

Combination of Gates

ANDGate

CR6

LS021

SOL021Inputs Output

CR6

Electromechanical Ladder Diagram

PLC/PAC Ladder Diagram

Page 22: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

Why are theseinstruction

programmed open?

Combination of Gates

ANDGate

ORGate

ANDGate

PB10

PB11

LT6Inputs

Output

This is an XOR circuit

Electromechanical Ladder Diagram

PLC/PAC Ladder Diagram

Page 23: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

Combination of Gates

ANDGate

ORGate

AB

M

Inputs

OutputCD

Electromechanical Ladder Diagram

Draw the PLC/PACladder diagram

for this logic

Page 24: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

Latch coils – Output Latched (OTL) instructions energize when the rung containing the OTL is true and will stay energized when the rung goes false.

Unlatch coils – Output Unlatch (OTU) instructions will unlatch or de-energize an OTL instruction having the same address as the OTU when the rung containing the OTU becomes true.

If the OTU instruction remains true the OTL instruction with the same address will never energize.

The OTU instruction can turn off any bit in the processor memory that is set to a logic 1.

Latch/Unlatch Coils – SLC500/LogixPro

Page 25: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

ControlLogix uses the same instruction and work exactly the same as the SLC500/LogixPro; OTL, OTU.

The difference is that the instruction will be assigned a tag name of data type Bool.

Latch/Unlatch Coils – ControlLogix

Page 26: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

The Siemens Set/Reset output instruction work exactly the same as the AB OTL/OTU instructions.

Latch/Unlatch Coils – Siemens

Page 27: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

Processor Status File – Data File #2 (SLC500/LogixPro)

The processor status file, S2, stores information about processor, project and hardware status. The file indicates, but is not limited to the following information:

Minor faults Diagnostic information on major faults Processor modes Scan time I/O status Various other data

Page 28: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

Obtaining the process status in a ControlLogix processor is an advance topic and will not be discussed in this course.

A few status bits will be discussed when needed.

Processor Status – ControlLogix

Page 29: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

Obtaining the process status in a Siemens processor is an advance topic and will not be discussed in this course.

Any status required will be discussed when needed.

Processor Status – Siemens

Page 30: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

Status Data Table Dialog Box (SLC500s)

The status file dialog box is several pages in length and is organized using index tabs.

Page 31: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

Status Data Table Dialog Box (LogixPro)

The status file dialog box is several pages in length and is organized using index tabs.

Page 32: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

Addressing the Status File (SLC500/LogixPro)

Addressing the status file uses the same addressing structure as any other AB data file.

The status file can be addressed to word or bit level A bit level example is:

S2:1/15 or simply S:1/15 = Status file, Word 1, Bit 15 – First Pass Bit A word level example is:

S2:6 or simply S:6 = Status file, Word 6 – Major error code The ControlLogix do not have a processor status file. Status is

handle by using something called “classes”. We will discuss this in later classes.

We will only be scratching the surface of the status file.

Page 33: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

Useful Status File Addresses (SLC500/LogixPro & ControlLogix)

The following status file address will be useful for this and many labs in the PLC/PAC courses: S:1/15 – First Pass Bit

This bit will be set to a logic ‘1’ at the beginning of the very first scan of the program. At the beginning of the next scan this bit will reset to a logic ‘0’ and will not set to a logic ‘1’ again until the processor is switched from PROG mode to RUN mode.

S:FS – First Scan Bit This is the tag for the First Scan Bit in the

ControlLogix processor. It functions exactly like the SLC500 S:1/15 bit.

Page 34: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

Useful Status File Addresses (SLC500s)

The following status file addresses could be useful: S:4/0 through S:4/15 – Free running clocks

Each one of these bits are a free running clock bit. Each bit clocks at a different rep rate as shown below:

Free running clocks are not available in ControlLogix.

Status Bit Duty Cycle Status Bit Duty Cycle

S:4/0 20mS S:4/8 5,120mS

S:4/1 40mS S:4/9 10,240mS

S:4/2 80mS S:4/10 20,480mS

S:4/3 160mS S:4/11 40,960mS

S:4/4 320mS S:4/12 81,920mS

S:4/5 640mS S:4/13 163,840mS

S:4/6 1,280mS S:4/14 327,680mS

S:4/7 2,560mS S:4/15 655,360mS

Page 35: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

Free Running Clocks

The free running clock times are expressed in duty cycle as illustrated below. The free running clock bit: S:4/5 has a duty cycle of 640mS – 320mS on/320mS off, as shown below:

Logic 0

Logic 1

320mS 320mS

640mS

Page 36: 08 chapter03 06_status_bits_otl_otu_scan_logic_fa14

References

ebay. (2013). Car Vehicle Interior Door Courtesy Light Switch Button Part. Retrieved September 30, 2014, from ebay: http://www.ebay.com/itm/Car-Vehicle-Interior-Door-Courtesy-Light-Switch-Button-Part-/370749940274

frbiz.com. (2009). City road at night must be careful to use high beam - high beam, city road - Automotive repair and maintenance industry. Retrieved September 30, 2014, from frbiz.com: http://news.frbiz.com/city_road_at_night_must_be-228344.html

Hyundai. (2014). High beam operation. Retrieved September 30, 2014, from Hyundai: http://www.hyundaimanuals.org/hyundai-749.html

iJDMTOY. (2012, June 18). 2011 Chevy Camaro equipped with LED Interior Dome Lights. Retrieved September 30, 2014, from iJDMTOY Blog For Automatice Lighting: http://ijdmtoy.com/BLOG/wordpress/2012/06/18/2011-chevy-camaro-equipped-with-led-interior-dome-lights/

MSN. (2014). msn autos. Retrieved September 30, 2014, from Motor Trend: http://preview.msn.com/en-us/autos?post=3ed328c9-01c1-4016-9780-bc308a477b08

Rehg, J. A., & Sartori, G. J. (2007). Programmable Logic Controllers (2nd ed.). Upper Saddle River, New Jersey: Pearson Prentice hall.

Skycraft Parts & Supplies. (2014). 240 VAC Latching Realy, 4PDT 10 AMP. Retrieved October 13, 2014, from Skycraft Parts & Supplies: http://www.skycraftsurplus.com/240vaclatchingrelay4pdt10amp.aspx