Step7 7-day timer

frobie

Member
Join Date
Mar 2004
Posts
2
Hello all,
I have been programming InTouch for quite some time and have now gone to ProTool and the transfer is going well but for one area, a 7-day timer.

InTouch used to handle the timer an dthat was a royal you know what to program and I really don't want to attempt it in ProTool.
I am left wondering if Step 7 has a "canned" 7-day timer, like InTouch's Historical Logging engine.

It seems that a 7-day timer would be a popular item, especially for lighting applications and the like.

Has anybody out there successfully programed a 7-day timer?

Thanks in advance!!

Jeff
 
The best way would be to access the system time, and then you could execute a function at any interval or absolute time that you wish. If you do a search on the threads, you will see several programming examples on how to do this.

Let us know if you can't find the threads or need more info.
 
Jeff,

the maximum time for the in-build S7 timers is 9990s or 2h46m30s. You can however use the combination of a timer generating pulses every x seconds and a counter. This way you can time up to a maximum of 999 times 9990s (9980010s or 115d12h13m30s). Seems to me that's long enough for what you need ;) and not too complex to program.

Kind regards,
 
To control ligthing and stuff like that, I guess you would like the timing to be relatively accurate over a looong time.
To use timers or watchdog interrupts would put a little error in every time. Not much, but enough to make the system drift in the long run.
I think that it would be best to use the internal clock in the S7.
Use SFC0 SET_CLK and SFC1 READ_CLK.
Or use Time-of-day interrupts OB10 to OB17 (depends on CPU).
Even the internal S7 clock will drift over time. So put the clock prominently displayed somewhere on your HMI. That will prompt people to adjust it with regular intervals (every 3 months maybe ?).
 
STEP7 HAS IEC TIMER

for programming a 7 day timer in step7, IEC timers (SFB4 - ondelay timer) can be used through SIMETIC MANAGER

sanjay
 
Sanjay,

there is one little problem with the IEC-timers: these are located in SFB's. These SFB's are however NOT available in EVERY CPU. If you have the choice between bying a more expensive CPU and programming the combination of one timer and one counter, what would you do? This combination is also known to form a retentive timer, something Siemens also doesn't have. So this is a fairly common solution.

Kind regards,
 

Similar Topics

Hi! i'm just wondering did there is any chance to change Set Time(TV) on Siemens plc timer without step 7 using c# or python if timer not set in...
Replies
1
Views
1,245
How can I set the duration of a s7 timer in HMI? I need the timer TW input to be read from a word in a DB. I've defined the word (DB7.DBW70) as...
Replies
3
Views
2,009
I have a FC in which I am running a timer. The timer does not time down as it does if I put it in OB1. What am I doing wrong here? For this...
Replies
23
Views
11,162
i am using step 7 with wincc flexible to edit a simatic hmi station. i want to display the accumulated time and be able to write to the set time...
Replies
2
Views
2,959
hello all in my SCADA i wanted to provide PLC healthy/Fail signal. but im unable to get the address of this signal. can any body help me do i need...
Replies
3
Views
5,897
Back
Top Bottom