SlideShare a Scribd company logo
1 of 11
Download to read offline
9-1
Dr. D. J. Jackson Lecture 9-1Electrical & Computer Engineering
Programmable Logic
Controllers
Shift and Sequencer Instructions
Dr. D. J. Jackson Lecture 9-2Electrical & Computer Engineering
Application Specific Instructions
• Bit Shift Instructions – Allows for basic
shift and rotate operations
– Bit Shift Left (BSL)
– Bit Shift Right (BSR)
• Sequencer Instructions – Useful for
outputting or comparing a sequence of
data on a recurring basis
– Sequencer Output (SQO)
– Sequencer Compare (SQC)
– Sequencer Load (SQL)
9-2
Dr. D. J. Jackson Lecture 9-3Electrical & Computer Engineering
Bit Shift Instructions Overview
• Entering Parameters
• File is the address of the bit array you want to manipulate. You
must use the file indicator (#) in the bit array address.
• Control is the control element that stores the status byte of the
instruction and the size of the array (in number of bits).
• Note that the control address should not be used for any other
instruction.
• The control element is shown below.
Dr. D. J. Jackson Lecture 9-4Electrical & Computer Engineering
Status Bits
• Status bits of the control element may be addressed by
mnemonic (UL, ER, DN, EN). They include:
• Unload Bit UL (bit 10) stores the status of the bit exited from
the array each time the instruction is enabled.
• Error Bit ER (bit 11), when set, indicates the instruction
detected an error such as entering a negative number for the
length or position. Avoid using the output bit when this bit is
set.
• Done Bit DN (bit 13), when set, indicates the bit array has
shifted one position.
• Enable Bit EN (bit 15) is set on a false-to-true transition of the
rung and indicates the instruction is enabled.
• When the register shifts and input conditions go false, the
enable, done, and error bits are reset.
9-3
Dr. D. J. Jackson Lecture 9-5Electrical & Computer Engineering
Bit Address and Array Length
• Bit Address is the address of the source bit that the
instruction inserts in the first (lowest) bit position
(BSL) or the last (highest) bit position (BSR).
• Length (size of bit array) is the number of bits in
the bit array, up to 2048 bits.
• A length value of 0 causes the input bit to be
transferred to the UL bit.
– For SLC processors, the length is 2048.
– For MicroLogix 1000 series controllers, this length is 1680.
• A length value that points past the end of the
programmed file causes a runtime major error to
occur.
Dr. D. J. Jackson Lecture 9-6Electrical & Computer Engineering
Bit Shift Left (BSL) and Bit Shift
Right (BSR)
• BSL and BSR are output
instructions that load
data into a bit array one
bit at a time.
• The data is shifted
through the array, then
unloaded one bit at a
time.
9-4
Dr. D. J. Jackson Lecture 9-7Electrical & Computer Engineering
Bit Shift Left Instruction
Dr. D. J. Jackson Lecture 9-8Electrical & Computer Engineering
Using BSL
• When the rung goes from false-to-true, the
processor sets the enable bit (EN bit 15) and
the data block is shifted to the left (to a
higher bit number) one bit position.
• The specified bit at the bit address is shifted
into the first bit position.
• The last bit is shifted out of the array and
stored in the unload bit (UL bit 10).
• For wraparound operation, set the position of
the bit address to the last bit of the array or
to the UL bit.
9-5
Dr. D. J. Jackson Lecture 9-9Electrical & Computer Engineering
BSR Example
Dr. D. J. Jackson Lecture 9-10Electrical & Computer Engineering
Sequencer Instructions
• These instructions transfer 16-bit data to
word addresses for the control of sequential
machine operations
• Essentially these instructions provide a
capability for implementing multi-bit state
machines
• An example use is in the traffic control light
problem
9-6
Dr. D. J. Jackson Lecture 9-11Electrical & Computer Engineering
Sequencer Output and Compare
• When the rung transfers from
false-to-true the instruction is
incremented to the next step in
the sequencer file.
• Data from the sequencer file is
then transferred through a mask
and into the destination address
specified in the command.
• The data is updated during each
scan that the rung remains true.
• When the last word in the
sequencer file is transferred the
done bit is set.
• On the next transition from
false-to-true for the rung the
instruction is reset to step one
Dr. D. J. Jackson Lecture 9-12Electrical & Computer Engineering
Sequencer Parameters
• Entering Parameters
• File is the address of the sequencer file. You must use the file
indicator (#) for this address.
• Mask (SQO, SQC) is a hexadecimal code or the address of the
mask word or file through which the instruction moves data.
– Set mask bits to pass data and reset mask bits to mask data.
– If the mask is a file, its length will be equal to the length of the
sequencer file.
– The two files track automatically.
• Source is the address of the input word or file for a SQC from
which the instruction obtains data for comparison to its
sequencer file.
• Destination is the address of the output word or file for a SQO
to which the instruction moves data from its sequencer file.
9-7
Dr. D. J. Jackson Lecture 9-13Electrical & Computer Engineering
Sequencer Control
• Control (SQO, SQC) is the control structure that stores the
– status byte of the instruction,
– the length of the sequencer file,
– and the instantaneous position in the file.
• You should not use the control address for any other
instruction.
Dr. D. J. Jackson Lecture 9-14Electrical & Computer Engineering
Sequencer Status Bits
• CONTROL
– The control parameter is a structure to store the: status byte
of the instruction, length of the sequencer file, and the
instantaneous position in the file. The control address can
not be used for any other instruction.
– Error Bit ER (11)
• This bit is set when the processor detects a negative position
value, or a negative or zero length value. This results in a major
error if not cleared before the END or TND instruction is
executed.
– Done Bit DN (bit 13)
• The done bit is set by SQO instruction after it has operated on
the last word in the sequencer file. It is reset on the next false-
to-true rung transition after the rung goes false.
– Enable EN (bit 15)
• The enable bit is set by a false-to-true rung transition and
indicates the SQO instruction is enabled.
9-8
Dr. D. J. Jackson Lecture 9-15Electrical & Computer Engineering
Sequencer Status Bits (continued)
• LENGTH
– The length is the number of steps of the sequencer file
starting at position 1
– The maximum number of words is 255 (in MicroLogix 1000
controllers the maximum is 104 words)
– The zero position is the startup position
– At the end of each cycle the instruction resets to position 1
(A run time major error will occur if the length value points
past the end of the programmed file)
• POSITION
– The position is the word location or step the sequencer file
from/to which the instruction moves data (A run time major
error occurs if the position value points past the end of the
programmed file)
Dr. D. J. Jackson Lecture 9-16Electrical & Computer Engineering
Using SQO
• This output instruction steps through the sequencer
file whose bits have been set to control various
output devices
• When the rung goes from false-to-true, the
instruction increments to the next step (word) in the
sequencer file
• Data stored there is transferred through a mask to
the destination address specified in the instruction
• Current data is written to the corresponding
destination word every scan that the rung remains
true
• The done bit is set when the last word of the
sequencer file is transferred. On the next false-to-
true rung transition, the instruction resets the
position to step one
9-9
Dr. D. J. Jackson Lecture 9-17Electrical & Computer Engineering
Using SQO (continued)
• If the position is equal to zero at startup, when you
switch the processor from the program mode to the
run mode instruction operation depends on whether
the rung is true or false on the first scan
– If true, the instruction transfers the value in step zero
– If false, the instruction waits for the first rung transition
from false-to-true and transfers the value in step one
• The bits mask data when reset and pass data when
set
– The instruction will not change the value in the destination
word unless you set mask bits
• The mask can be a constant or taken from an
address
Dr. D. J. Jackson Lecture 9-18Electrical & Computer Engineering
SQO Example
9-10
Dr. D. J. Jackson Lecture 9-19Electrical & Computer Engineering
SQC Instruction
• Applications of the SQC
instruction include machine
diagnostics.
• SQC FD bit is set when the
instruction detects that an
input word matches (through
mask) its corresponding
reference word.
• The FD bit R6:21/FD is set in
this example, since the input
word matches the sequencer
reference value using the
mask value.
Dr. D. J. Jackson Lecture 9-20Electrical & Computer Engineering
Sequencer Load (SQL)
• The SQL instruction
stores 16-bit data into a
sequencer load file at
each step of sequencer
operation. The source of
this data can be
– an I/O or storage word
address,
– a file address,
– or a constant.
9-11
Dr. D. J. Jackson Lecture 9-21Electrical & Computer Engineering
SQL Operation

More Related Content

What's hot

NARMA-L2 Controller for Five-Area Load Frequency Control
NARMA-L2 Controller for Five-Area Load Frequency ControlNARMA-L2 Controller for Five-Area Load Frequency Control
NARMA-L2 Controller for Five-Area Load Frequency Controlijeei-iaes
 
Fpga implementation of encryption and decryption algorithm based on aes
Fpga implementation of encryption and decryption algorithm based on aesFpga implementation of encryption and decryption algorithm based on aes
Fpga implementation of encryption and decryption algorithm based on aeseSAT Publishing House
 
Atc On An Simd Cots System Wmpp05
Atc On An Simd Cots System   Wmpp05Atc On An Simd Cots System   Wmpp05
Atc On An Simd Cots System Wmpp05Ülger Ahmet
 
09 28 sep16 12808 26506-1-sm(edit)
09 28 sep16 12808 26506-1-sm(edit)09 28 sep16 12808 26506-1-sm(edit)
09 28 sep16 12808 26506-1-sm(edit)IAESIJEECS
 
6 Switch Fabric
6 Switch Fabric6 Switch Fabric
6 Switch FabricFNian
 
A High Speed Pipelined Dynamic Circuit Implementation Using Modified TSPC Log...
A High Speed Pipelined Dynamic Circuit Implementation Using Modified TSPC Log...A High Speed Pipelined Dynamic Circuit Implementation Using Modified TSPC Log...
A High Speed Pipelined Dynamic Circuit Implementation Using Modified TSPC Log...IDES Editor
 
Iaetsd design of a low power multiband clock distribution circuit
Iaetsd design of a low power multiband clock distribution circuitIaetsd design of a low power multiband clock distribution circuit
Iaetsd design of a low power multiband clock distribution circuitIaetsd Iaetsd
 
Loop parallelization & pipelining
Loop parallelization & pipeliningLoop parallelization & pipelining
Loop parallelization & pipeliningjagrat123
 
Design and Implementation of Area Efficiency AES Algoritham with FPGA and ASIC,
Design and Implementation of Area Efficiency AES Algoritham with FPGA and ASIC,Design and Implementation of Area Efficiency AES Algoritham with FPGA and ASIC,
Design and Implementation of Area Efficiency AES Algoritham with FPGA and ASIC,paperpublications3
 
pipelining and hazards occure in assembly language.
pipelining and hazards occure in assembly language.pipelining and hazards occure in assembly language.
pipelining and hazards occure in assembly language.Zohaib Arshid
 

What's hot (20)

NARMA-L2 Controller for Five-Area Load Frequency Control
NARMA-L2 Controller for Five-Area Load Frequency ControlNARMA-L2 Controller for Five-Area Load Frequency Control
NARMA-L2 Controller for Five-Area Load Frequency Control
 
Project_Report_Debargha
Project_Report_DebarghaProject_Report_Debargha
Project_Report_Debargha
 
Fuzzy logic control vs. conventional pid
Fuzzy logic control vs. conventional pidFuzzy logic control vs. conventional pid
Fuzzy logic control vs. conventional pid
 
Fpga implementation of encryption and decryption algorithm based on aes
Fpga implementation of encryption and decryption algorithm based on aesFpga implementation of encryption and decryption algorithm based on aes
Fpga implementation of encryption and decryption algorithm based on aes
 
Atc On An Simd Cots System Wmpp05
Atc On An Simd Cots System   Wmpp05Atc On An Simd Cots System   Wmpp05
Atc On An Simd Cots System Wmpp05
 
Real time-embedded-system-lec-06
Real time-embedded-system-lec-06Real time-embedded-system-lec-06
Real time-embedded-system-lec-06
 
09 28 sep16 12808 26506-1-sm(edit)
09 28 sep16 12808 26506-1-sm(edit)09 28 sep16 12808 26506-1-sm(edit)
09 28 sep16 12808 26506-1-sm(edit)
 
D031201021027
D031201021027D031201021027
D031201021027
 
6 Switch Fabric
6 Switch Fabric6 Switch Fabric
6 Switch Fabric
 
ucttirm
ucttirmucttirm
ucttirm
 
ate_full_paper
ate_full_paperate_full_paper
ate_full_paper
 
Lect03
Lect03Lect03
Lect03
 
Pipelining In computer
Pipelining In computer Pipelining In computer
Pipelining In computer
 
A High Speed Pipelined Dynamic Circuit Implementation Using Modified TSPC Log...
A High Speed Pipelined Dynamic Circuit Implementation Using Modified TSPC Log...A High Speed Pipelined Dynamic Circuit Implementation Using Modified TSPC Log...
A High Speed Pipelined Dynamic Circuit Implementation Using Modified TSPC Log...
 
Iaetsd design of a low power multiband clock distribution circuit
Iaetsd design of a low power multiband clock distribution circuitIaetsd design of a low power multiband clock distribution circuit
Iaetsd design of a low power multiband clock distribution circuit
 
Loop parallelization & pipelining
Loop parallelization & pipeliningLoop parallelization & pipelining
Loop parallelization & pipelining
 
Design and Implementation of Area Efficiency AES Algoritham with FPGA and ASIC,
Design and Implementation of Area Efficiency AES Algoritham with FPGA and ASIC,Design and Implementation of Area Efficiency AES Algoritham with FPGA and ASIC,
Design and Implementation of Area Efficiency AES Algoritham with FPGA and ASIC,
 
Floor plan & Power Plan
Floor plan & Power Plan Floor plan & Power Plan
Floor plan & Power Plan
 
Pipeline
PipelinePipeline
Pipeline
 
pipelining and hazards occure in assembly language.
pipelining and hazards occure in assembly language.pipelining and hazards occure in assembly language.
pipelining and hazards occure in assembly language.
 

Viewers also liked

The effects of reading method on the comprehension performance of Saudi EFL s...
The effects of reading method on the comprehension performance of Saudi EFL s...The effects of reading method on the comprehension performance of Saudi EFL s...
The effects of reading method on the comprehension performance of Saudi EFL s...Buabuanana
 
Runwal codename walk
Runwal codename walkRunwal codename walk
Runwal codename walkthelaunch
 
The effects of reading method on the comprehension performance of saudi efl s...
The effects of reading method on the comprehension performance of saudi efl s...The effects of reading method on the comprehension performance of saudi efl s...
The effects of reading method on the comprehension performance of saudi efl s...Buabuanana
 
The effects of reading method on the comprehension performance of saudi efl s...
The effects of reading method on the comprehension performance of saudi efl s...The effects of reading method on the comprehension performance of saudi efl s...
The effects of reading method on the comprehension performance of saudi efl s...Buabuanana
 

Viewers also liked (11)

Lect06
Lect06Lect06
Lect06
 
Lect13
Lect13Lect13
Lect13
 
Lect02
Lect02Lect02
Lect02
 
The effects of reading method on the comprehension performance of Saudi EFL s...
The effects of reading method on the comprehension performance of Saudi EFL s...The effects of reading method on the comprehension performance of Saudi EFL s...
The effects of reading method on the comprehension performance of Saudi EFL s...
 
Lect07
Lect07Lect07
Lect07
 
Runwal codename walk
Runwal codename walkRunwal codename walk
Runwal codename walk
 
The effects of reading method on the comprehension performance of saudi efl s...
The effects of reading method on the comprehension performance of saudi efl s...The effects of reading method on the comprehension performance of saudi efl s...
The effects of reading method on the comprehension performance of saudi efl s...
 
Lect12
Lect12Lect12
Lect12
 
Lect14
Lect14Lect14
Lect14
 
Lect04
Lect04Lect04
Lect04
 
The effects of reading method on the comprehension performance of saudi efl s...
The effects of reading method on the comprehension performance of saudi efl s...The effects of reading method on the comprehension performance of saudi efl s...
The effects of reading method on the comprehension performance of saudi efl s...
 

Similar to Lect09

04 sequencer instructions_sp15
04 sequencer instructions_sp1504 sequencer instructions_sp15
04 sequencer instructions_sp15John Todora
 
Microprocessors-based systems (under graduate course) Lecture 6 of 9
Microprocessors-based systems (under graduate course) Lecture 6 of 9 Microprocessors-based systems (under graduate course) Lecture 6 of 9
Microprocessors-based systems (under graduate course) Lecture 6 of 9 Randa Elanwar
 
Microcontroladores: introducción a la programación en lenguaje ensamblador AVR
Microcontroladores: introducción a la programación en lenguaje ensamblador AVRMicrocontroladores: introducción a la programación en lenguaje ensamblador AVR
Microcontroladores: introducción a la programación en lenguaje ensamblador AVRSANTIAGO PABLO ALBERTO
 
Optimizing Data Encoding Technique For Dynamic Power Reduction In Network On ...
Optimizing Data Encoding Technique For Dynamic Power Reduction In Network On ...Optimizing Data Encoding Technique For Dynamic Power Reduction In Network On ...
Optimizing Data Encoding Technique For Dynamic Power Reduction In Network On ...IRJET Journal
 
11 chapter06 slc_int_float_mov_mvm_fa14
11 chapter06 slc_int_float_mov_mvm_fa1411 chapter06 slc_int_float_mov_mvm_fa14
11 chapter06 slc_int_float_mov_mvm_fa14John Todora
 
8051 serial communication
8051 serial communication8051 serial communication
8051 serial communicationcanh phan
 
A Computers Architecture project on Barrel shifters
A Computers Architecture project on Barrel shiftersA Computers Architecture project on Barrel shifters
A Computers Architecture project on Barrel shifterssvrohith 9
 
Level sensitive scan design(LSSD) and Boundry scan(BS)
Level sensitive scan design(LSSD) and Boundry scan(BS)Level sensitive scan design(LSSD) and Boundry scan(BS)
Level sensitive scan design(LSSD) and Boundry scan(BS)Praveen Kumar
 
Pipeline & Nonpipeline Processor
Pipeline & Nonpipeline ProcessorPipeline & Nonpipeline Processor
Pipeline & Nonpipeline ProcessorSmit Shah
 
4-BlockCipher-DES-CEN451-BSE-Spring2022-17042022-104521am.pdf
4-BlockCipher-DES-CEN451-BSE-Spring2022-17042022-104521am.pdf4-BlockCipher-DES-CEN451-BSE-Spring2022-17042022-104521am.pdf
4-BlockCipher-DES-CEN451-BSE-Spring2022-17042022-104521am.pdfNAWAZURREHMANAWAN
 
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015vtunotesbysree
 
Osi week10(1) [autosaved] by Gulshan K Maheshwari(QAU)
Osi week10(1) [autosaved] by Gulshan  K Maheshwari(QAU)Osi week10(1) [autosaved] by Gulshan  K Maheshwari(QAU)
Osi week10(1) [autosaved] by Gulshan K Maheshwari(QAU)GulshanKumar368
 
Accurate Synchronization of EtherCAT Systems Using Distributed Clocks
Accurate Synchronization of EtherCAT Systems Using Distributed ClocksAccurate Synchronization of EtherCAT Systems Using Distributed Clocks
Accurate Synchronization of EtherCAT Systems Using Distributed ClocksDesign World
 
Low power in vlsi with upf basics part 2
Low power in vlsi with upf basics part 2Low power in vlsi with upf basics part 2
Low power in vlsi with upf basics part 2SUNODH GARLAPATI
 
The Role of Inter-Controller Traffic in SDN Controllers Placement
The Role of Inter-Controller Traffic in SDN Controllers PlacementThe Role of Inter-Controller Traffic in SDN Controllers Placement
The Role of Inter-Controller Traffic in SDN Controllers PlacementPaolo Giaccone
 
Implementation of resource sharing strategy for power optimization in embedde...
Implementation of resource sharing strategy for power optimization in embedde...Implementation of resource sharing strategy for power optimization in embedde...
Implementation of resource sharing strategy for power optimization in embedde...Alexander Decker
 
Codec Scheme for Power Optimization in VLSI Interconnects
Codec Scheme for Power Optimization in VLSI InterconnectsCodec Scheme for Power Optimization in VLSI Interconnects
Codec Scheme for Power Optimization in VLSI InterconnectsIJEEE
 

Similar to Lect09 (20)

04 sequencer instructions_sp15
04 sequencer instructions_sp1504 sequencer instructions_sp15
04 sequencer instructions_sp15
 
Microprocessors-based systems (under graduate course) Lecture 6 of 9
Microprocessors-based systems (under graduate course) Lecture 6 of 9 Microprocessors-based systems (under graduate course) Lecture 6 of 9
Microprocessors-based systems (under graduate course) Lecture 6 of 9
 
Microcontroladores: introducción a la programación en lenguaje ensamblador AVR
Microcontroladores: introducción a la programación en lenguaje ensamblador AVRMicrocontroladores: introducción a la programación en lenguaje ensamblador AVR
Microcontroladores: introducción a la programación en lenguaje ensamblador AVR
 
Optimizing Data Encoding Technique For Dynamic Power Reduction In Network On ...
Optimizing Data Encoding Technique For Dynamic Power Reduction In Network On ...Optimizing Data Encoding Technique For Dynamic Power Reduction In Network On ...
Optimizing Data Encoding Technique For Dynamic Power Reduction In Network On ...
 
11 chapter06 slc_int_float_mov_mvm_fa14
11 chapter06 slc_int_float_mov_mvm_fa1411 chapter06 slc_int_float_mov_mvm_fa14
11 chapter06 slc_int_float_mov_mvm_fa14
 
I2C
I2CI2C
I2C
 
8051 serial communication
8051 serial communication8051 serial communication
8051 serial communication
 
A Computers Architecture project on Barrel shifters
A Computers Architecture project on Barrel shiftersA Computers Architecture project on Barrel shifters
A Computers Architecture project on Barrel shifters
 
Allen Bradley- Micrologix PLC Instructions
Allen Bradley- Micrologix PLC InstructionsAllen Bradley- Micrologix PLC Instructions
Allen Bradley- Micrologix PLC Instructions
 
Mc05.ppt
Mc05.pptMc05.ppt
Mc05.ppt
 
Level sensitive scan design(LSSD) and Boundry scan(BS)
Level sensitive scan design(LSSD) and Boundry scan(BS)Level sensitive scan design(LSSD) and Boundry scan(BS)
Level sensitive scan design(LSSD) and Boundry scan(BS)
 
Pipeline & Nonpipeline Processor
Pipeline & Nonpipeline ProcessorPipeline & Nonpipeline Processor
Pipeline & Nonpipeline Processor
 
4-BlockCipher-DES-CEN451-BSE-Spring2022-17042022-104521am.pdf
4-BlockCipher-DES-CEN451-BSE-Spring2022-17042022-104521am.pdf4-BlockCipher-DES-CEN451-BSE-Spring2022-17042022-104521am.pdf
4-BlockCipher-DES-CEN451-BSE-Spring2022-17042022-104521am.pdf
 
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
 
Osi week10(1) [autosaved] by Gulshan K Maheshwari(QAU)
Osi week10(1) [autosaved] by Gulshan  K Maheshwari(QAU)Osi week10(1) [autosaved] by Gulshan  K Maheshwari(QAU)
Osi week10(1) [autosaved] by Gulshan K Maheshwari(QAU)
 
Accurate Synchronization of EtherCAT Systems Using Distributed Clocks
Accurate Synchronization of EtherCAT Systems Using Distributed ClocksAccurate Synchronization of EtherCAT Systems Using Distributed Clocks
Accurate Synchronization of EtherCAT Systems Using Distributed Clocks
 
Low power in vlsi with upf basics part 2
Low power in vlsi with upf basics part 2Low power in vlsi with upf basics part 2
Low power in vlsi with upf basics part 2
 
The Role of Inter-Controller Traffic in SDN Controllers Placement
The Role of Inter-Controller Traffic in SDN Controllers PlacementThe Role of Inter-Controller Traffic in SDN Controllers Placement
The Role of Inter-Controller Traffic in SDN Controllers Placement
 
Implementation of resource sharing strategy for power optimization in embedde...
Implementation of resource sharing strategy for power optimization in embedde...Implementation of resource sharing strategy for power optimization in embedde...
Implementation of resource sharing strategy for power optimization in embedde...
 
Codec Scheme for Power Optimization in VLSI Interconnects
Codec Scheme for Power Optimization in VLSI InterconnectsCodec Scheme for Power Optimization in VLSI Interconnects
Codec Scheme for Power Optimization in VLSI Interconnects
 

Recently uploaded

EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 

Recently uploaded (20)

Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 

Lect09

  • 1. 9-1 Dr. D. J. Jackson Lecture 9-1Electrical & Computer Engineering Programmable Logic Controllers Shift and Sequencer Instructions Dr. D. J. Jackson Lecture 9-2Electrical & Computer Engineering Application Specific Instructions • Bit Shift Instructions – Allows for basic shift and rotate operations – Bit Shift Left (BSL) – Bit Shift Right (BSR) • Sequencer Instructions – Useful for outputting or comparing a sequence of data on a recurring basis – Sequencer Output (SQO) – Sequencer Compare (SQC) – Sequencer Load (SQL)
  • 2. 9-2 Dr. D. J. Jackson Lecture 9-3Electrical & Computer Engineering Bit Shift Instructions Overview • Entering Parameters • File is the address of the bit array you want to manipulate. You must use the file indicator (#) in the bit array address. • Control is the control element that stores the status byte of the instruction and the size of the array (in number of bits). • Note that the control address should not be used for any other instruction. • The control element is shown below. Dr. D. J. Jackson Lecture 9-4Electrical & Computer Engineering Status Bits • Status bits of the control element may be addressed by mnemonic (UL, ER, DN, EN). They include: • Unload Bit UL (bit 10) stores the status of the bit exited from the array each time the instruction is enabled. • Error Bit ER (bit 11), when set, indicates the instruction detected an error such as entering a negative number for the length or position. Avoid using the output bit when this bit is set. • Done Bit DN (bit 13), when set, indicates the bit array has shifted one position. • Enable Bit EN (bit 15) is set on a false-to-true transition of the rung and indicates the instruction is enabled. • When the register shifts and input conditions go false, the enable, done, and error bits are reset.
  • 3. 9-3 Dr. D. J. Jackson Lecture 9-5Electrical & Computer Engineering Bit Address and Array Length • Bit Address is the address of the source bit that the instruction inserts in the first (lowest) bit position (BSL) or the last (highest) bit position (BSR). • Length (size of bit array) is the number of bits in the bit array, up to 2048 bits. • A length value of 0 causes the input bit to be transferred to the UL bit. – For SLC processors, the length is 2048. – For MicroLogix 1000 series controllers, this length is 1680. • A length value that points past the end of the programmed file causes a runtime major error to occur. Dr. D. J. Jackson Lecture 9-6Electrical & Computer Engineering Bit Shift Left (BSL) and Bit Shift Right (BSR) • BSL and BSR are output instructions that load data into a bit array one bit at a time. • The data is shifted through the array, then unloaded one bit at a time.
  • 4. 9-4 Dr. D. J. Jackson Lecture 9-7Electrical & Computer Engineering Bit Shift Left Instruction Dr. D. J. Jackson Lecture 9-8Electrical & Computer Engineering Using BSL • When the rung goes from false-to-true, the processor sets the enable bit (EN bit 15) and the data block is shifted to the left (to a higher bit number) one bit position. • The specified bit at the bit address is shifted into the first bit position. • The last bit is shifted out of the array and stored in the unload bit (UL bit 10). • For wraparound operation, set the position of the bit address to the last bit of the array or to the UL bit.
  • 5. 9-5 Dr. D. J. Jackson Lecture 9-9Electrical & Computer Engineering BSR Example Dr. D. J. Jackson Lecture 9-10Electrical & Computer Engineering Sequencer Instructions • These instructions transfer 16-bit data to word addresses for the control of sequential machine operations • Essentially these instructions provide a capability for implementing multi-bit state machines • An example use is in the traffic control light problem
  • 6. 9-6 Dr. D. J. Jackson Lecture 9-11Electrical & Computer Engineering Sequencer Output and Compare • When the rung transfers from false-to-true the instruction is incremented to the next step in the sequencer file. • Data from the sequencer file is then transferred through a mask and into the destination address specified in the command. • The data is updated during each scan that the rung remains true. • When the last word in the sequencer file is transferred the done bit is set. • On the next transition from false-to-true for the rung the instruction is reset to step one Dr. D. J. Jackson Lecture 9-12Electrical & Computer Engineering Sequencer Parameters • Entering Parameters • File is the address of the sequencer file. You must use the file indicator (#) for this address. • Mask (SQO, SQC) is a hexadecimal code or the address of the mask word or file through which the instruction moves data. – Set mask bits to pass data and reset mask bits to mask data. – If the mask is a file, its length will be equal to the length of the sequencer file. – The two files track automatically. • Source is the address of the input word or file for a SQC from which the instruction obtains data for comparison to its sequencer file. • Destination is the address of the output word or file for a SQO to which the instruction moves data from its sequencer file.
  • 7. 9-7 Dr. D. J. Jackson Lecture 9-13Electrical & Computer Engineering Sequencer Control • Control (SQO, SQC) is the control structure that stores the – status byte of the instruction, – the length of the sequencer file, – and the instantaneous position in the file. • You should not use the control address for any other instruction. Dr. D. J. Jackson Lecture 9-14Electrical & Computer Engineering Sequencer Status Bits • CONTROL – The control parameter is a structure to store the: status byte of the instruction, length of the sequencer file, and the instantaneous position in the file. The control address can not be used for any other instruction. – Error Bit ER (11) • This bit is set when the processor detects a negative position value, or a negative or zero length value. This results in a major error if not cleared before the END or TND instruction is executed. – Done Bit DN (bit 13) • The done bit is set by SQO instruction after it has operated on the last word in the sequencer file. It is reset on the next false- to-true rung transition after the rung goes false. – Enable EN (bit 15) • The enable bit is set by a false-to-true rung transition and indicates the SQO instruction is enabled.
  • 8. 9-8 Dr. D. J. Jackson Lecture 9-15Electrical & Computer Engineering Sequencer Status Bits (continued) • LENGTH – The length is the number of steps of the sequencer file starting at position 1 – The maximum number of words is 255 (in MicroLogix 1000 controllers the maximum is 104 words) – The zero position is the startup position – At the end of each cycle the instruction resets to position 1 (A run time major error will occur if the length value points past the end of the programmed file) • POSITION – The position is the word location or step the sequencer file from/to which the instruction moves data (A run time major error occurs if the position value points past the end of the programmed file) Dr. D. J. Jackson Lecture 9-16Electrical & Computer Engineering Using SQO • This output instruction steps through the sequencer file whose bits have been set to control various output devices • When the rung goes from false-to-true, the instruction increments to the next step (word) in the sequencer file • Data stored there is transferred through a mask to the destination address specified in the instruction • Current data is written to the corresponding destination word every scan that the rung remains true • The done bit is set when the last word of the sequencer file is transferred. On the next false-to- true rung transition, the instruction resets the position to step one
  • 9. 9-9 Dr. D. J. Jackson Lecture 9-17Electrical & Computer Engineering Using SQO (continued) • If the position is equal to zero at startup, when you switch the processor from the program mode to the run mode instruction operation depends on whether the rung is true or false on the first scan – If true, the instruction transfers the value in step zero – If false, the instruction waits for the first rung transition from false-to-true and transfers the value in step one • The bits mask data when reset and pass data when set – The instruction will not change the value in the destination word unless you set mask bits • The mask can be a constant or taken from an address Dr. D. J. Jackson Lecture 9-18Electrical & Computer Engineering SQO Example
  • 10. 9-10 Dr. D. J. Jackson Lecture 9-19Electrical & Computer Engineering SQC Instruction • Applications of the SQC instruction include machine diagnostics. • SQC FD bit is set when the instruction detects that an input word matches (through mask) its corresponding reference word. • The FD bit R6:21/FD is set in this example, since the input word matches the sequencer reference value using the mask value. Dr. D. J. Jackson Lecture 9-20Electrical & Computer Engineering Sequencer Load (SQL) • The SQL instruction stores 16-bit data into a sequencer load file at each step of sequencer operation. The source of this data can be – an I/O or storage word address, – a file address, – or a constant.
  • 11. 9-11 Dr. D. J. Jackson Lecture 9-21Electrical & Computer Engineering SQL Operation