Page 1 of 1
[?]: temporisation with step7
Posted: Wed May 30, 2012 8:42 pm
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
Re: [?]: temporisation with step7
Posted: Sat Jun 02, 2012 6:53 pm
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
Re: [?]: temporisation with step7
Posted: Sun Jun 03, 2012 12:22 am
by abdou999
i want to mesure the total time duration of the pump
Re: [?]: temporisation with step7
Posted: Sun Jun 03, 2012 9:48 am
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
Re: [?]: temporisation with step7
Posted: Sun Jun 03, 2012 6:55 pm
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.
Re: [?]: temporisation with step7
Posted: Mon Jun 04, 2012 8:36 pm
by abdou999
thank you for all