[?]: temporisation with step7

SIMATIC S7-200/300/400, Step7, PCS7, CFC, SFC, PDM, PLCSIM,
SCL, Graph, SPS-VISU S5/S7, IBHsoftec, LOGO ...
abdou999
Posts: 10
Joined: Wed Jan 11, 2012 7:00 pm

[?]: temporisation with step7

Post by abdou999 »

good evening
I have a problem running a timer I want to start a "stopwatch" to evaluate the running time of a pump (how to initialize a timer to zero and not limit it?

thank you in advance
SHKODRAN
Posts: 199
Joined: Wed Dec 24, 2008 4:37 pm
Location: Europe

Re: [?]: temporisation with step7

Post by SHKODRAN »

What do you want to measure?
The total time duration of the pump?
or time of a start / stop?
Here you have a simple example...

Call this code on OB10 every 1 minute.

Code: Select all

A  PM06.RUN
JCN   Y250
L     PM06RTm      //Minute data type Dint
L     1
+D    
T     PM06RTm     //Minute data type Dint
L     60
/D    
T     PM06RTh       //Hours data type Dint

Y250: Nop 0
abdou999
Posts: 10
Joined: Wed Jan 11, 2012 7:00 pm

Re: [?]: temporisation with step7

Post by abdou999 »

i want to mesure the total time duration of the pump
dsekulic
Posts: 186
Joined: Sun Feb 12, 2006 5:47 pm
Location: Europe

Re: [?]: temporisation with step7

Post by dsekulic »

Hi,
Maybe You should look for SFC101 (Handling Runtime Meters), alongside with SFC2 (SET_RTM), SFC3 (CTRL_RTM) and SFC4 (READ_RTM).
Description of this functions You will find in System Software for S7-300/400
System and Standard Functions
.
regards
SHKODRAN
Posts: 199
Joined: Wed Dec 24, 2008 4:37 pm
Location: Europe

Re: [?]: temporisation with step7

Post by SHKODRAN »

abdou999 wrote:i want to mesure the total time duration of the pump
So, if you do not work for "NASA" that do not need a high precision,
the code I wrote above is just fine!
Just create a DB to save partial and totals data.
Good luck.
abdou999
Posts: 10
Joined: Wed Jan 11, 2012 7:00 pm

Re: [?]: temporisation with step7

Post by abdou999 »

thank you for all