PDA

View Full Version : FFL Instruction


Jim-F
November 28th, 2007, 03:21 PM
I've been reading a LOT of the past topics, and A-B Knowledgebase, on the FFL/FFU instructions, but I still don't understand a couple of things.

Can you use the FFL instruction by itself, or is it mandatory to use the FFU with it as a pair? As long as you reset the ".POS = 0" when the FFL is done, then wouldn't it just continue to overwrite the existing data elements within the array?

If you have to use the FFU instruction, then do you also have to reset the .POS of the FFU?

Is the length of the FFU the same as the FFL, or is it the length of the DESTination? I will be unloading a 30 element DINT array into a single DINT waste tag, so I don't care if it is overwritten.

Here's what I have set up so far in the FFL/FFU instructions. Screen captures can be done if needed.


FFL:
Source A450 KW Total
FIFO A450 KW Total Array[0]
Control A450 FFL Control[0]
Length 30
POS 0
FFU:
FIFO A450 KW Total Array[0]
DEST A450 FFU Destination
Control A450 FFL Control
Length 30
Position 0

I'm copying the Total Array to a buffer array each time, and sorting that to perform other functions, so if I don't have to unload the FIFO, then it would make things a lot easier.

widelto
November 28th, 2007, 06:19 PM
go to www.control.com and in the download section look for slc_average, they have an excelent example if fou don´t find it let me know.
It is for slc but it applies to control logix also.

Lancie1
November 28th, 2007, 07:49 PM
Can you use the FFL instruction by itself..? ANSWER: YES

or is it mandatory to use the FFU with it as a pair? ANSWER: NO

As long as you reset the ".POS = 0" when the FFL is done, then wouldn't it just continue to overwrite the existing data elements within the array? ANSWER: YES

If you have to use the FFU instruction, then do you also have to reset the .POS of the FFU? ANSWER: When you use them as a pair (normal way), then you do not have to reset the Position. It counts down as FFU unloads the file.

Is the length of the FFU the same as the FFL, or is it the length of the DESTination? ANSWER: It is whatever value is in the "Length" parameter of the FFU, and normally that should be the same as the "Length" of the FFL. If you are not using the FFU, then it's Length will not be relevant. Normally, the "Control" location is made the same for both the FFL and FFU, so that they share the same Status bits, Length, and Position values.

Here is a demonstration program that shows you can use FFL without FFU, and that you can reset the POS word.

http://www.plctalk.net/qanda/uploads/FIFO_DEMO.jpg

Jim-F
November 29th, 2007, 07:25 AM
Lancie1: Thanks for the help. After reading about using them as pairs, I just couldn't see the need for the FFU in my application, and looking at the control flowchart, it seemed like the FFL could stand alone.

Thanks for the verification and the ladder logic. :beerchug:

(8{)} ( .)
November 29th, 2007, 08:01 AM
Whoa gentlemen.

Use a COP instruction instead of the FFL/U. Just copy
from the top down (ie. copy from element 1 to element 0).
The copy length is the length of your queue.

Simpler, cheaper, faster...

Good to be back

(8{)} (: .)

Ron Beaufort
November 29th, 2007, 08:14 AM
welcome back, Yosi ... where've you been? ...

to Jim-F ...

what Yosi is getting at is that the FFL/FFU instructions are ideal for the use for which they are intended ... and as Lancie1 has said, you certainly can use just the FFL by itself ...

but ...

most of the time when people are trying to use just the FFL alone, it's because they're trying to store data into memory locations and then shift that data up or down step-by-step ... sometimes this is called a "ripple" effect ...

while the FFL certainly CAN do this, most programmers eventually discover that the COP approach recommended by our friend with the cryptic name is an easier way to handle this operation ... the topic has been covered before on the forum ... let us know if you're interested and we'll post a link or two ...

if not, then party on with the FFL ...

wildswing
November 29th, 2007, 09:18 AM
We use FFU/FFL pairs a lot to track production orders through our process. It's a linear process so the FIFO FFU/FFL setup works well for us. Ron, I'm interesting in learning more about how you fellas use the COP command. Would you mind posting those links please?

Jim-F
November 29th, 2007, 09:39 AM
Yosi: I tried using the COP commands, and I can see how it would work, but initially I messed it up somewhere, and started looking at the FFL/FFU.

Ron: I've been through most of the COP and FFL/FFU after doing searches on both. I've read a LOT of your postings, and have to thank you for taking the time to share your knowledge with those of us that are new to the PLC world. Sometimes I read too much and start getting things confused.

I came in this morning and started working through the ladder logic, and I got the CLR for the POS set up, removed the FFU, and some other tweaking. When I was all done, I let the logic run and waited for the cycles to get the POS>LEN and the DN bit to set.

When I saw it all work as planned, with everyone's help, I was elated. This PLC is the central processor for our entire steam plant, and if it were to have a major fault, it would be a very bad day around here. Now all I need to do is build some RSView screens, and display the data I'm collecting now.

Thanks to all :beerchug:

Ron Beaufort
November 29th, 2007, 09:42 AM
Greetings Mark ...

see if this link (http://www.plctalk.net/qanda/showthread.php?t=9614) answers your questions ... if not, post again and we’ll nail things down for you ...

wildswing
November 29th, 2007, 12:07 PM
Thanks for the link Ron. That makes sense.

EDIT: For those who've already read my long winded reply. Never mind. I answered my own question. I should read more carefully before replying!