FIFO instructions in Rslogix 5000
RSLogix 5000 First In First Out
Learn How To Use A FIFO in RSLogix 5000
If you have been a programmer for a while or a beginner, this article & support videos will show you how to start a program in RSlogix 5000 for an example. In the example, we will show installing the file load & the file unload instructions being used for loading an array of data then unloading that array so that you can see the data shifting & getting used to the way a FIFO works.
Being that some of you may not have programmed things from scratch so we made the first video around 20 minutes showing the task being edited then the two instructions being added. Also, the program example that is shown is an emulated program so there is no real hardware because we are showing how to program then watch the data shift.
Making the data arrays needed for the FIFO system to work correctly, I also show the different data types that can be used.
The two instructions being listed below:
- FFL
- FFU
Note that the 1st video below also shows how to download to an emulator processor in RSlinx so really you are getting a great tutorial about what a FIFO does using these two instruction sets. The FFL instruction & the FFU instruction, let’s top ahead & watch the video so that you can get the fist part of how they work then we will pick back up.
Please don’t skip anything, you’ll only be hurting your learning so please watch everything.
RSLogix 5000 FIFO Load and Unload Example [Official Video]
After watching the video, I want to provide a resource that I talked about which is Indirect Addressing which I have made another video-based article on this website to better help with passing on this knowledge. Using test bits in the program is an easy way to do system teaching because of points of stopping, starting, & allowing a run in auto feature so you get the best.
Being that there are only 3 rungs in this program is all it takes to show how to transfer data from an array using a FIFO & as you saw in the video, we can pull up the processor data in the view tab.
To list all of the RSLogix 5000 instructions used in the:
- Standard Bits (Test1, Test2)
- TON (RunningTMR)
- FFL (FIFOControl)
- FFU (FIFOControl)
Source data types: SINT, INT, DINT, REAL, String type
CONTROL – Tag data type – control structure for the operation typically use the same CONTROL as the associated FFU
Length – DINT data type – the immediate maximum number of elements the FIFO can hold at one time
Position – DINT data type – immediate next location in the FIFO where the instruction loads data initial value is typically 0
Instruction Control Tag uses:
.EN (BOOL)
The enable bit indicates the FFL instruction is enabled.
.DN (BOOL)
The done bit is set to indicate that the FIFO is full. The .DN bit inhibits loading the FIFO until .POS < .LEN.
.EM (BOOL)
The empty bit indicates the FIFO is empty. If .LEN £ 0 or .POS < 0, the .EM bit and .DN bits are set.
.LEN (DINT)
The length word specifies the maximum number of elements in the FIFO.
.POS (DINT)
The position word identifies the location in the FIFO where the instruction loads the next value.
Shown in the image below:
Notice that the tag named FIFOControl is the same for FFL instruction & the FFU instruction, this is because there is only one central point of control even though two instructions are being used. More like features would be the array that is being used & the length of that array so that the data can be transmitted properly.
Now that we have watched video 1, let’s go ahead to video 2…..In this video, I build off of what we have built in the 1st video so I hope you didn’t skip through it because you are going to miss some key components.
We are going to re-structure the FIFO & ladders that we made so that new knowledge can be passed on to you.
RSLogix 5000 FIFO Load and Unload Quick Scan Example
Video two of the RSLogix 5000 FIFO load and unload showing the use of test bits to trigger the FFL and the FFU instructions. Also stressing the importance of using the same control tag for the FFL and the FFU instructions so that the FIFO works properly. This is often what throws people off and can be tricky if you have never done one before.
I also show the use of a NOP and a dummy rung to show the data being transferred through the array.
Very helpful when troubleshooting.
Lastly, I want to welcome you to all the education you need in PLC programming from Online PLC Support, made by Shane Welcher who has over 17 years of programming experience so the views & logical controls are of us & not of Rockwell Automation even though Shane has been trained by Rockwell.
Learn How To Use A FIFO in RSLogix 5000
If you have been a programmer for a while or a beginner, this article & support videos will show you how to start a program in RSlogix 5000 for an example. In the example, we will show installing the file load & the file unload instructions being used for loading an array of data then unloading that array so that you can see the data shifting & getting used to the way a FIFO works.
Being that some of you may not have programmed things from scratch so we made the first video around 20 minutes showing the task being edited then the two instructions being added. Also, the program example that is shown is an emulated program so there is no real hardware because we are showing how to program then watch the data shift.
Making the data arrays needed for the FIFO system to work correctly, I also show the different data types that can be used.
The two instructions being listed below:
- FFL
- FFU
Note that the 1st video below also shows how to download to an emulator processor in RSlinx so really you are getting a great tutorial about what a FIFO does using these two instruction sets. The FFL instruction & the FFU instruction, let’s top ahead & watch the video so that you can get the fist part of how they work then we will pick back up.
Please don’t skip anything, you’ll only be hurting your learning so please watch everything.
RSLogix 5000 FIFO Load and Unload Example [Official Video]
After watching the video, I want to provide a resource that I talked about which is Indirect Addressing which I have made another video-based article on this website to better help with passing on this knowledge. Using test bits in the program is an easy way to do system teaching because of points of stopping, starting, & allowing a run in auto feature so you get the best.
Being that there are only 3 rungs in this program is all it takes to show how to transfer data from an array using a FIFO & as you saw in the video, we can pull up the processor data in the view tab.
To list all of the RSLogix 5000 instructions used in the:
- Standard Bits (Test1, Test2)
- TON (RunningTMR)
- FFL (FIFOControl)
- FFU (FIFOControl)
Source data types: SINT, INT, DINT, REAL, String type
CONTROL – Tag data type – control structure for the operation typically use the same CONTROL as the associated FFU
Length – DINT data type – immediate maximum number of elements the FIFO can hold at one time
Position – DINT data type – immediate next location in the FIFO where the instruction loads data initial value is typically 0
Instruction Control Tag uses:
.EN (BOOL)
The enable bit indicates the FFL instruction is enabled.
.DN (BOOL)
The done bit is set to indicate that the FIFO is full. The .DN bit inhibits loading the FIFO until .POS < .LEN.
.EM (BOOL)
The empty bit indicates the FIFO is empty. If .LEN £ 0 or .POS < 0, the .EM bit and .DN bits are set.
.LEN (DINT)
The length word specifies the maximum number of elements in the FIFO.
.POS (DINT)
The position word identifies the location in the FIFO where the instruction loads the next value.
Shown in the image below:
Notice that the tag named FIFOControl is the same for FFL instruction & the FFU instruction, this is because there is only one central point of control even though two instructions are being used. More like features would be the array that is being used & the length of that array so that the data can be transmitted properly.
Now that we have watched video 1, let’s go ahead to video 2…..In this video, I build off of what we have built in the 1st video so I hope you didn’t skip through it because you are going to miss some key components.
We are going to re-structure the FIFO & ladders that we made so that new knowledge can be passed on to you.
RSLogix 5000 FIFO Load and Unload Quick Scan Example
Video two of the RSLogix 5000 FIFO load and unload showing the use of test bits to trigger the FFL and the FFU instructions. Also stressing the importance of using the same control tag for the FFL and the FFU instructions so that the FIFO works properly. This is often what throws people off and can be tricky if you have never done one before.
I also show the use of a NOP and a dummy rung to show the data being transferred through the array.
Very helpful when troubleshooting.
Lastly, I want to welcome you to all the education you need in PLC programming from Online PLC Support, made by Shane Welcher who has over 17 years of programming experience so the views & logical controls are of us & not of Rockwell Automation even though Shane has been trained by Rockwell.
More PLC Topics
RSLogix 5000 Section
-
RSLogix 5000 Add-On Instructions
-
How to Capture Allen Bradley Processor Faults
-
RSlogix 5000 Structured Text
-
RSlogix 5000 PID Tuning
-
Studio 5000 Indirect Addressing
-
User-Defined Data Types For Motion Applications
-
Allen Bradley PLC Servos Controls
-
Controlling Servo Motion With SFC Programming
-
Connecting a 1203-USB to A Kinetix 6000
-
Servo Motion Mastery Training
-
Advanced Servo Motion Mastery Training
-
Allen Bradley PLC Training
-
Ladder Logic
PLC Controls Section
RSLogix 5000 Add-On Instructions
How to Capture Allen Bradley Processor Faults
Studio 5000 Indirect Addressing
User-Defined Data Types For Motion
Allen Bradley PLC Servos Controls
Servo Motion With SFC Programming
Connect a 1203-USB to Kinetix 6000
Advanced Servo Motion Mastery PLC Training