Rolling data buffer in s7-300

Pollard

Member
Join Date
Feb 2010
Location
Chesterfield
Posts
12
I am currently working on a project that utilizes a pair of digital water flowmeters.
Each flowmeter continuously generates a single pulsed output, the frequency of which is directly proportional to the flow through the meter.
I plan to use the frequency input mode of the PLC (S7 313-c) and buffer the returned value over a number of sample cycles.
Ideally, I would like to have a rolling 20 cycles stored. I will then sum and average the buffer to give a value to be used in further calculations.
When the buffer is full, the oldest sample can be "lost" as a new sample enters.
My question is this (and please excuse my ignorance if the answer is obvious!): what would be the best method of generating the buffers?
 
Here's a simple example assuming the buffer contains INTs. Define your buffer(s) in the STAT area of a function block.
 
Thankyou. I'm sure that will do the trick. I will have to modify it slightly as I will be using multiple DBs but this is easily done. (y)
 

Similar Topics

This is a general question to find what systems/products are in the market (if at all). Operations Manager in my plant has a request of me. he...
Replies
18
Views
8,182
Hello, It my first post here! I have been programming on Schneider PLC for the last few years and am now doing some work with RSLogix. RSLogix...
Replies
3
Views
1,584
Afternoon all, I'm working on setting up a large excel recipe table for porting updates through the Linx Gateway RTD/DDE function into my recipe...
Replies
2
Views
110
Compactlogix controller, program has 28 conveyors that use TON's to start the conveyors. The TT sounds a warning horn during start and the DN...
Replies
10
Views
485
I'm a Manufacturing Engineer with limited PLC experience and I am doing some research for our Controls Department. Does anyone have experience...
Replies
4
Views
177
Back
Top Bottom