08 chapter03 06_status_bits_otl_otu_scan_logic_fa14
Post on 27-Jun-2015
384 Views
Preview:
TRANSCRIPT
Chapter 03 Logic Concepts, Latch/Unlatch, Intro to Processor Status FilePLC Memory Structure and Programming concepts
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.
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.
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.
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
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
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
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
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)
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)
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
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
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
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.
AND Gate Circuits
ANDGate
LS10
LS10ASOL010Inputs
Output
Two input AND gate
Electromechanical Ladder Diagram
PLC/PAC Ladder Diagram
OR Gate Circuits
ORGate
LS011
LS012Sol011Inputs
Output
Two input OR gate
Electromechanical Ladder Diagram
PLC/PAC Ladder Diagram
Combinations of Gates
ORGate AND
Gate
LS013
LS014 LT013
InputsOutput
CR
Electromechanical Ladder Diagram
PLC/PAC Ladder Diagram
Combination of Gates
ANDGate
ORGate
ORGate
LS015
LS016
LT016Inputs
OutputCR01
CR02
Electromechanical Ladder Diagram
PLC/PAC Ladder Diagram
Combination of Gates
ANDGate
ORGate
LS017
LS031
AH017Inputs Output
LS018
Electromechanical Ladder Diagram
PLC/PAC Ladder Diagram
Combination of Gates
ANDGate
ORGate
ANDGate
PB019
PB020
LT019InputsOutput
PB021
PB022
Electromechanical Ladder Diagram
PLC/PAC Ladder Diagram
Why is thisinstruction
programmed open?
Combination of Gates
ANDGate
CR6
LS021
SOL021Inputs Output
CR6
Electromechanical Ladder Diagram
PLC/PAC Ladder Diagram
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
Combination of Gates
ANDGate
ORGate
AB
M
Inputs
OutputCD
Electromechanical Ladder Diagram
Draw the PLC/PACladder diagram
for this logic
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
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
The Siemens Set/Reset output instruction work exactly the same as the AB OTL/OTU instructions.
Latch/Unlatch Coils – Siemens
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
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
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
Status Data Table Dialog Box (SLC500s)
The status file dialog box is several pages in length and is organized using index tabs.
Status Data Table Dialog Box (LogixPro)
The status file dialog box is several pages in length and is organized using index tabs.
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.
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.
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
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
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
top related