Adding Data Table Values

Scorpip

Member
Join Date
Aug 2004
Posts
15
~PLC 5~

I am sure the FAL istruction is what I am looking to use but I am unsure of the syntac...

I want to add all the values in Data table F53. Float Point F53:0 up to F53:199.

All the values in the table need to be added up so I have a total of all the float points.

Direction is appriciated...


thanks
 
The FAL instruction is indeed what you want.

See the attahced PDF example for three methods.

The first method does all 200 calculations in a single scan. The rung must be conditioned as FAL only executes on false->true transitions. But doing 200 floating point additions in a single scan may not be desirable.

The second method shows doing the 200 calculaltions in 200 scans using FAL. You have to monitor the DN bit so you know when the result is available. This method as shown calculates continuously, starting over once the result is available.

The third method shows doing 10 calculations/scan so you have a result available every 20 scans.
 
Last edited:
I just spotted some mistakes in the PDF file I attahced.

In rung 1 the first instruciton should be XIC R6:1/DN

and in rung 3 the first instruciton should be XIC R6:2/DN
 

Similar Topics

Hello all, I am working on a project utilizing an s7-1200 cpu and Tia Portal v17. I currently have an external PCB with some sensors on it (and...
Replies
1
Views
724
Hi PLCs.net! I'm using Studio5k V32, and I have an EDS file for the Fanuc 30r-ib plus controllers. I have an excel spreadsheet with bitwise...
Replies
1
Views
1,441
Anyone know how to add weather history automatically to an access db? I want to display it on my reports page kind of like windows 10 does it on...
Replies
8
Views
2,224
Hello I was trying to add a "Message" data file in a SLC500 PLC controller. I'm not seeing the Message as a "type" to select. How do I add the...
Replies
4
Views
1,344
Hi, I'm currently trying to use a GSV instruction in an AOI but i get block when it's time to create the parameter for the instance name. I do...
Replies
23
Views
12,910
Back
Top Bottom