Summing an array in Logix5000 using FAL

dmoore26

Lifetime Supporting Member
Join Date
Jul 2017
Location
Virginia
Posts
10
I am attempting to use the FAL instruction in 5000 to sum an array. The logic is running in a ControlLogix PLC. I have searched this forum and others, but cant seem to find an example of what i want to do. The array is 263 in length(263 foot conveyor). There is a scale on the conveyor that gives me LBS/FT and FT/S. I use that to calculate how fast I move the newest weight measurement into the array. I need to constantly sum the entire array to calculate the total weight on the conveyor. Does anyone have an example on how to sum an array using FAL? I want to use the FAL to make the code cleaner because I have to do this for multiple conveyors.
 
are you confused with how to write the Expression? ... or what? ...

if it's the Expression that's causing you problems, try something like this ...

suppose that your Control entry is MUTT ...

suppose that your array is named Sector_Weight[0] through Sector_Weight[262] ...

suppose that your Destination entry is Total_Weight ...

try entering your Expression as

Total_Weight + Sector_Weight[MUTT.Pos]

note that you'll have to use something like a CLR (Clear) instruction just before the FAL to clear out the old total before you add up the array again ...

if this doesn't fix it - post more details (or better yet a section of your code) and we'll help you nail it down ...

good luck with your project ...
 
Last edited:
My expression is the same as the examples. Maybe i misunderstood how the instruction works, but as the conveyor continues to run and no more material is added to it, a weight of "zero" is moved into the the array for every foot of travel until its nothing but zeros. At that point i would expect it to be summing all zeros and my total should be zero. So at this point, i guess my question is, am i expecting FAL to do something it cannot?
 
If your total is part of the expression. Then the total must be cleared each scan to obtain a new total once the FAL is activated. The instruction can be used to accomplish your task but I do not know what expression your using. There are many examples to choose from. So it would help if you showed us the expression your using.
 

Similar Topics

I have 7 input meters to my Red Lion HMI and I need to get 4 readouts on the panel which give the sum of all of meters selected for that output...
Replies
4
Views
1,708
Hi guys, Fairly new to RxLogix/PLCs here. I am currently working on a project where I have a FIFO buffer that I have populated (lets say, up to 6...
Replies
1
Views
2,803
I have an array of real numbers. The array dimension is 100. How can I get the sum of the entire array? I am using RS5000 v17
Replies
10
Views
2,360
For hopper weighing, if more than one load cell is mounted then a summing circuit is used and output of this circuit is given to indicator or...
Replies
9
Views
10,033
Hello everyone, I'm working on a project that involves controlling an array of nozzles within a CNC environment, where the nozzles travel along a...
Replies
5
Views
118
Back
Top Bottom