s7 totaliser

mhmtfthnl

Member
Join Date
Nov 2003
Location
everywhere I can go
Posts
42
I am taking 4-20 ma process input (for example water flow) it changes in time.I want to know after (for example) 5 hour how many liters of water passed from the tube.Namely I want to use a totaliser for any kind of variables.If you have any ready program structure or could you help me how to program.

Thank you in advance.
 
Easy option, buy a flowmeter that offers a totalising signal.

Bit more work option, use the flowrate signal together with the PLC scantime. You'll find the last scantime in the OB1 declarations.

Example if your flowmeter shows an instantaneous flowrate of 20 litres/minute and the scantime showed 10mS.

20/60 would give you the flowrate per minute, but you want the rate for for the scantime, so the scantime = scan result/1000 and then divide this into 60 by this value.

60 / (10 (scantime in mS) / 1000) = 6000

Then 20 / 6000 = 0.0033333, add this to the total, then every scan repeat the same calc with the new values for scantime and flowrate and add to total.
 
Why did you divide 20 to 60.is 20 litres for one minute?I think you divided to find the value as second.Your result is seeming true.Thank you.And is there another way to solve this problem.Thank you.
 
Hello mhmtfthnl;
Siemens has integrated SFC2, SFC3 and SFC4 in Step 7 for the setup, start and monitoring of RunTime Meters. Yous can setup 16 distinct RTMs on a S7-300 (monitor 16 different values).
You can find more information abour these functions in the Standard and System Functions manual (in the Simatic/Documentation directory of your Step 7 PC, or downloadable from Siemens' support website).
Note that boolean inputs for these functions (I don't remember which at this time, my computer does not have Step 7 installed at this moment) require an edge-trigger signal for them to function, a detail not mentionned precisely in their documentation.

Hope this helps,
Daniel Chartier
 
Thats more or less correct.

If your reading is litres/minute, then dividing your instantaneous result by 60 would give you the equivalent flow in a second, but you don't want the second value you want a millisecond value to correspond with the scantime.

So perhaps easier to see would be to divide by 60,000, which will give the instantaneous value for 1mS. Then multiply by the number of milliseconds for your last scan.

You'd also need to know your scaling, if 4mA = 0 and 20mA = 30 litres/minute, then you would scale

Litres/Minute = PIW/27648 * 30 = Throughput

Then;

Log_Value = Throughput/60000 * scantime in mS.
 
dchartier said:
Hello mhmtfthnl;
Siemens has integrated SFC2, SFC3 and SFC4 in Step 7 for the setup, start and monitoring of RunTime Meters. Yous can setup 16 distinct RTMs on a S7-300 (monitor 16 different values).
You can find more information abour these functions in the Standard and System Functions manual (in the Simatic/Documentation directory of your Step 7 PC, or downloadable from Siemens' support website).
Note that boolean inputs for these functions (I don't remember which at this time, my computer does not have Step 7 installed at this moment) require an edge-trigger signal for them to function, a detail not mentionned precisely in their documentation.

Hope this helps,
Daniel Chartier


I had a quick look, arn't these different things. I believe these are runtime meters, which time how long a device has run.
 
dchartier said:
Hello mhmtfthnl;
Siemens has integrated SFC2, SFC3 and SFC4 in Step 7 for the setup, start and monitoring of RunTime Meters. Yous can setup 16 distinct RTMs on a S7-300 (monitor 16 different values).
You can find more information abour these functions in the Standard and System Functions manual (in the Simatic/Documentation directory of your Step 7 PC, or downloadable from Siemens' support website).
Note that boolean inputs for these functions (I don't remember which at this time, my computer does not have Step 7 installed at this moment) require an edge-trigger signal for them to function, a detail not mentionned precisely in their documentation.

Hope this helps,
Daniel Chartier

Hi
Thank you.But I do not want to use runtime-meter for this application.I think that has different aim such as operating time for motors.Am I wrong.
 
Input parameter Value is set as a REAL. In OB35 you pass MD10 into the block.


The first instruction is to transfer PIW292 (which is an INT) into DB100.DBD0 (the same REAL that MD10 was passed into).

You need to:

1. SCALE your input from the peripheral word.
2. Convert answer to REAL
3. Both of the above should be done in OB35 and the result stored in MD10 prior to the FB call.
4. The offending code should be removed from the first network in the FB.
 
Hi,

Your Flow meter gives you 4-20mA signal as input to the PLC.
say for it gives a maximum of 20mA for the flowrate of 40 lit / min.

Let
x = counts in plc corresponding to current flow rate.
say for 40 lit / min = 32700 counts in plc
so
current flow rate = x * 40 (lit/min) / 32700
= y
this current flow rate calculated is in lit/ min but the plc scan rate will be in ms.
so
current flow rate = y / 60 *1000
= z lit/ms * plc scan rate
using a adder block in the plc program add value z to the flow totaliser variable in every scan.
After the specified time interval say 5 hours as measured using a timer,read the totaliser variable value which will give the total flow.
 

Similar Topics

Hi Guys, I hope someone here can help me. I'm using an ML1400 with RSL500, I want to take a pulse output 1P/L from a flow meter, totalise it and...
Replies
24
Views
12,248
Hi, Sorry if this has been already posted elsewhere, I couldn't find it doing a quick search. Can anyone advise whether there is a totaliser...
Replies
7
Views
4,303
Dear All, Please help me how to configure totaliser block in Step 7 in Siemens PLC. I want to use it for flow totalisation. Regards, rahman
Replies
0
Views
1,453
In my new project i am using E + H magmeters Promag 10W50 for measuring water flowrate. It has a 4-20 ma output (HART) which i will be using as...
Replies
1
Views
1,888
hello sir i request any body to help me out to solve the program for totalising the input nothing but measuring volume for any plc
Replies
3
Views
2,176
Back
Top Bottom