SlideShare a Scribd company logo
1 of 5
Download to read offline
10-1
Dr. D. J. Jackson Lecture 10-1Electrical & Computer Engineering
Programmable Logic
Controllers
File (Queue) Instructions
Dr. D. J. Jackson Lecture 10-2Electrical & Computer Engineering
File Instruction Types
• FFL - First In, First Out (FIFO) Load
• FFU - First In, First Out (FIFO) Unload
• LFL - Last In, First Out (LIFO) Load
• LFU - Last In, First Out (LIFO) Unload
10-2
Dr. D. J. Jackson Lecture 10-3Electrical & Computer Engineering
FIFO Load Instruction
• On a false-to-true rung
transition, the FFL
instruction loads words
or long words into a
user-created file called
a FIFO stack.
Dr. D. J. Jackson Lecture 10-4Electrical & Computer Engineering
FIFO Load Operands
• Source - The source operand is a constant or
address of the value used to fill the currently
available position in the FIFO stack.
– The address level of the source must match the FIFO stack.
If FIFO is a word size file, source must be a word value or
constant. If FIFO is a long word size file, source must be a
long word value or constant. The data range for the source
is from -32768 to 32767 (word) or -2,147,483,648 to
2,147,483,647 (long word).
• FIFO - The FIFO operand is the starting address of
the stack.
• Control - This is a control file address. The status
bits, stack length, and the position value are stored
in this element.
10-3
Dr. D. J. Jackson Lecture 10-5Electrical & Computer Engineering
FIFO Control Structure
• Length - The length operand contains the number of elements in the
FIFO stack to receive the value or constant found in the source. The
length of the stack can range from 1 to 128 (word) or 1 to 64 (long
word). The position is incremented after each load.
• Position - This is the current location pointed to in the FIFO stack. It
determines the next location in the stack to receive the value or
constant found in source. Position is a component of the control
register. The position can range from 0 to 127 (word) or 0 to 63 (long
word).
Dr. D. J. Jackson Lecture 10-6Electrical & Computer Engineering
FIFO Loading & Unloading
10-4
Dr. D. J. Jackson Lecture 10-7Electrical & Computer Engineering
FIFO Unload Instruction
• On a false-to-true rung
transition, the FFU
instruction unloads words or
long words from a user-
created file called a FIFO
stack.
• The data is unloaded using
first-in, first-out order.
• After the unload completes,
the data in the stack is
shifted one element toward
the top of the stack and the
last element is zeroed out.
• FFU operands are exactly as
described in the FFL
instruction.
Dr. D. J. Jackson Lecture 10-8Electrical & Computer Engineering
LFL - Last In, First Out (LIFO) Load
• On a false-to-true rung
transition, the LFL
instruction loads words
or long words into a
user-created file called
a LIFO stack.
• This instruction’s
counterpart, LIFO
unload (LFU), is paired
with a given LFL
instruction to remove
elements from the LIFO
stack.
10-5
Dr. D. J. Jackson Lecture 10-9Electrical & Computer Engineering
LIFO Loading & Unloading

More Related Content

More from Abhishek Gupta (12)

Lect14
Lect14Lect14
Lect14
 
Lect13
Lect13Lect13
Lect13
 
Lect12
Lect12Lect12
Lect12
 
Lect11
Lect11Lect11
Lect11
 
Lect09
Lect09Lect09
Lect09
 
Lect08
Lect08Lect08
Lect08
 
Lect07
Lect07Lect07
Lect07
 
Lect06
Lect06Lect06
Lect06
 
Lect05
Lect05Lect05
Lect05
 
Lect04
Lect04Lect04
Lect04
 
Lect03
Lect03Lect03
Lect03
 
Lect02
Lect02Lect02
Lect02
 

Recently uploaded

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
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
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 

Recently uploaded (20)

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
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...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 

PLC File Instructions: FIFO & LIFO Load/Unload

  • 1. 10-1 Dr. D. J. Jackson Lecture 10-1Electrical & Computer Engineering Programmable Logic Controllers File (Queue) Instructions Dr. D. J. Jackson Lecture 10-2Electrical & Computer Engineering File Instruction Types • FFL - First In, First Out (FIFO) Load • FFU - First In, First Out (FIFO) Unload • LFL - Last In, First Out (LIFO) Load • LFU - Last In, First Out (LIFO) Unload
  • 2. 10-2 Dr. D. J. Jackson Lecture 10-3Electrical & Computer Engineering FIFO Load Instruction • On a false-to-true rung transition, the FFL instruction loads words or long words into a user-created file called a FIFO stack. Dr. D. J. Jackson Lecture 10-4Electrical & Computer Engineering FIFO Load Operands • Source - The source operand is a constant or address of the value used to fill the currently available position in the FIFO stack. – The address level of the source must match the FIFO stack. If FIFO is a word size file, source must be a word value or constant. If FIFO is a long word size file, source must be a long word value or constant. The data range for the source is from -32768 to 32767 (word) or -2,147,483,648 to 2,147,483,647 (long word). • FIFO - The FIFO operand is the starting address of the stack. • Control - This is a control file address. The status bits, stack length, and the position value are stored in this element.
  • 3. 10-3 Dr. D. J. Jackson Lecture 10-5Electrical & Computer Engineering FIFO Control Structure • Length - The length operand contains the number of elements in the FIFO stack to receive the value or constant found in the source. The length of the stack can range from 1 to 128 (word) or 1 to 64 (long word). The position is incremented after each load. • Position - This is the current location pointed to in the FIFO stack. It determines the next location in the stack to receive the value or constant found in source. Position is a component of the control register. The position can range from 0 to 127 (word) or 0 to 63 (long word). Dr. D. J. Jackson Lecture 10-6Electrical & Computer Engineering FIFO Loading & Unloading
  • 4. 10-4 Dr. D. J. Jackson Lecture 10-7Electrical & Computer Engineering FIFO Unload Instruction • On a false-to-true rung transition, the FFU instruction unloads words or long words from a user- created file called a FIFO stack. • The data is unloaded using first-in, first-out order. • After the unload completes, the data in the stack is shifted one element toward the top of the stack and the last element is zeroed out. • FFU operands are exactly as described in the FFL instruction. Dr. D. J. Jackson Lecture 10-8Electrical & Computer Engineering LFL - Last In, First Out (LIFO) Load • On a false-to-true rung transition, the LFL instruction loads words or long words into a user-created file called a LIFO stack. • This instruction’s counterpart, LIFO unload (LFU), is paired with a given LFL instruction to remove elements from the LIFO stack.
  • 5. 10-5 Dr. D. J. Jackson Lecture 10-9Electrical & Computer Engineering LIFO Loading & Unloading