Adding consective numbers with fal

graybeard_61

Member
Join Date
Dec 2010
Location
tx
Posts
24
I need to add 20 consective numbers in a floating point file and store the result in a single element address also in the floating point file. I have used a # before the address in the expression but it still does not work. In my example I am adding f8:150 through f8:169 and storing the result in f8:170. I tried using it in all modes ( inc, all,and Num) with no success as yet. Any help is appreciated.
 
See picture below. Your length and registers will be different. Example below is just to give you an idea of how to make it work.

You will need to clear the total after each addition of the 20 registers before you add them all again.

add.jpg
 
Last edited:
If your processor has the AVERAGE instruction, then a faster implementation would be to AVErage the values, then multiply by the number of values.....

AVE = SUM/LEN

therefore

SUM = AVE*LEN
 

Similar Topics

Hi all I’m looking at adding a RFID card reader to comfort panel pro , how do you set the rfid up can you connect to existing users and password...
Replies
0
Views
39
Hello all! So I have one project with a S7-1214 and a MTP1500 "Project1" and one project with another S7-1214 "Project2". Both of these PLC:s need...
Replies
6
Views
110
Hi Everyone, Currently we have three plants running with Controllogix PLCs (L72, L73, L74). In each of these plants we have 2 FTView SE...
Replies
0
Views
86
Hello, Im building project with 1756-L82ES controller and 1756-IB16S card but i cant find it when trying to add the card to IO configuration...
Replies
3
Views
162
Hello, I have a pair of redundant 1756-L71 controllers rev 24. These controllers currently have produced and consumed tag interfaces to 3 other...
Replies
2
Views
185
Back
Top Bottom