FIFO Load (FFL) and FIFO Unload (FFU) Instructions


[Command Table] [Main Course Page] [Group Index]

The FFL and FFU instructions are used together. The FFL loads logic words into a user created file called a FIFO stack. The FFU instruction is used to unload the words from the FIFO stack, in the same order as the words were entered. The first word entered is the first word out.

Note: These instructions are only available with the Allen Bradley ML1000, SLC 5/02, SLC 5/03, and SLC 5/04 processors.



The FFL command AB button for FIFO command has several parameters that must be set: When the rung condition goes from being false to true, the Enable Bit (EN) is then set, and copies the Source into the FIFO at the next available position. When all the positions are filled, the Done Bit (DN) is then activated to prohibit loading any more words to the stack.

The FFU command AB button for FIFO command has several parameters that must be set:

When the rung condition goes from being false to true, the Enable Bit (EU) is then set, and unloads the first word copied into the stack into the destination address. The words are then shifted up one position in the stack. The position decreases after each operation. When the position equals zero, this indicates that all words have been unloaded, the Empty Bit (EM) is activated.

PLEASE NOTE:

If you fill the stack using the FFL command and the Done Bit (DN)activates when the stack is full and then unload the stack using the FFU command and activate the Empty Bit (EU) when the stack is empty, the Done Bit and Empty Bit will not RESET (RES).

The above figure demonstrates a simple rung to reset the position counter when the DN bit is activated. To Reset the position counter; insert a rung. Incorporate an examine if closed switch to activate the reset. Specify the examine if closed switch with the control file used in your program. If you specify R6:0 as your control file then, specify the switch as R6:0/DN. This means that when the DN bit becomes active, the reset command will take place. The reset command can only be specified to the element. Therefore, to reset the position, the reset command needs to be specified as "R6:0".

Values and addresses are assigned to the FFL and FFU commands by positioning the cursor to the right of the of the parameter you want to set, and and then double clicking the left mouse button. This opens a text box so that the address can be typed. If integer addresses are used, then the integer data must be placed into the integer data base.


Programming Problem

An operator loads a value into a system for the number of parts he/she wants for assembly by a certain machine. Develop a ladder rung that will take this input, and stores it in a stack. Then remove the inputs based on first in, first out, principle.

In this example a decimal value, 5 was entered into the word address N7:0. When the rung containing the FFL command became true, 5 was entered into the stack starting at position 0, address N7:10. The next value entered into N7:0 was 10 followed by 15. When the rung containing the FFL command became true, 10 and 15 were entered into the stack at the next available positions 1 and 2 respectively. The stack has a length parameter of 4 positions.

When the rung for the FFU command became true, the value 5 stored in position 0, addressed at N7:10 was moved to the destination address N7:20. The values stored in the remaining positions were moved up one position. Therefore, the value 10 was moved from position 1 to position 0. The next time the FFU command would become true, the value 10 would be placed in the address N7:20, writing over the value already being stored there. The figure below shows the ladder logic program.

[Command Table] [Main Course Page] [Group Index]