small question on timers ?

ZYD

Member
Join Date
May 2008
Location
Cal
Posts
6
i have a small question ? hope you guys ansewer me

i have a siemens plc , and i want to switch on any object for example a fan , and i want it to run for 10 seconds , the problem is that when i switch off the fan during the 10 seconds and i switch it on again , it will start again to run for a 10 seconds.

so the question is how can i let the timer count the rest of the time , not running from the beginning ?



 
Last edited:
You need a retentive timer, these timers stops timing when the input goes off and continue from where it stops when enabled. The rest of the timers resets when the input goes off.

But I'm not sure whether Siemens have retentive timers, never worked with Siemens before.

Regards
_________
 
thanks guys for replaying unfortunately we dot have a retentive timers we have pulse odt , etc

my friend said that i must use a comporators is that right ?
 
What Siemens PLC are you using?
If S7-200 have a look at the TONR type timer.
If S7-300/400 have a look at the S_ODTS type timer
 
moggie said:
What Siemens PLC are you using?
If S7-200 have a look at the TONR type timer.
If S7-300/400 have a look at the S_ODTS type timer

yeah i am using S7-300

give me a clue ? , i did used it but not functionaly
 
i have a siemens plc , and i want to switch on any object for example a fan , and i want it to run for 10 seconds , the problem is that when i switch off the fan during the 10 seconds and i switch it on again , it will start again to run for a 10 seconds.
The first thing to do is to define how it should work exactly.
As you describe it above, it is not 100% clear.
For example: You say "switch" it on, but as you describe that it must run for 10 seconds, it sounds more like you should press a button to start the fan for 10 seconds, rather than turning a switch.
In case that you have really used a switch:
If the switch is in the "on" position constantly, I guess that the fan shall run for 10 seconds and stop, or .. ?
If the switch is changed to the "off" position while the fan is running, shall the fan finish its 10 seconds run, or shall ot stop immediately ?
And you write that it is a problem if it starts again when you turn the switch again. Is the problem that you want a minimum stop time before restarting, or .. ?

You will find that if you describe the task exactly, then the program will almost write itself.

edit:
Btw. the way the user shall operate the fan is part of the task description. How the buttons, swithces and lamps shall function.
 
Last edited:
ZYD said:
yeah i am using S7-300

give me a clue ? , i did used it but not functionaly
Under CPU properties in hardware configuration go to the Retentive Memory tab.
Probably because they are not set up as retentive.
You can set a number of bytes,timers and counters as retentive.
Just remember that first timer/counter has to be 0 and then add a few more (like 5)
You'll end up with timers T0-T6 as being retentive
 
Warning! Spatial Tangential! (Adults ONLY!)

First of all, ZYD... you have done a pi$$-poor job of clearly defining your objective - poorly indeed.

Are you really just looking for a way to pause your fan and timer?

If so... what happens if you restart your fan with .1-seconds left on the timer? It will then start and stop as quickly as it started... if you push the start button again... you will restart the 10-second timer!

Is that what you are really looking for???

Having to guess what you are really looking for is more effort than any of us should have to exert! You could do yourself and us a great favor by carefully considering just what it is that you need.

There is an age-old adage in problem solving... if you can’t define, or at least identify, the problem, then you can’t solve the problem.

The search for the greatest cosmological answers produces an abundance of WHAT’s, as in... what is being observed and/or detected. Each of these “WHAT’s” should lead naturally to an abundance of WHY’s.

That is...
WHAT, exactly, happened?
WHY, exactly, did it happen?

As an aside... It is surprising to me, more and more these days, that the "WHY" simply does NOT seem to hold as much import as the "WHAT"... what a shame. It seems that a lot more doors would be opened to us if "WHY" carried at least as much import as that of "WHAT".

Nonetheless, in the Process Control World, since we are trying to effect control over our environment, the reverse order applies...

WHY am I trying to do this?
WHAT exactly is it that I’m trying to do?

In the cosmos we are trying to determine WHAT happened, then WHY.

In "OUR" Control World we are try to determine WHY something should happen, and then WHAT that something should be.

Of course, that "WHY something should happen" opens a really huge can of worms... or perhaps a Pandora's Box!

All of that aside... ZYD, how about more carefully defining your need?
 
I do not use Siemens by choice but the following should be possible. Use a counter with an internal clock pulse to increment/decrement the counter. Interupt the pulse when you do not want the count to continue. The counter will be retentive until you reset it.

Another method is to incremenet a register in the same way. When you reset the register you need to MOV 0 into it. Very easy quite frankly.
 
So, Bob...

Have you somehow devined what it is that he is really trying to do?

Are you poking an answer without really knowing the question?
 
Terry, I believe I have determined what he wants to know from a PLC programmers perspective. The definition is not good but I have had a lot worse thrown at me over the years.

I believe that the following is pretty definative
how can i let the timer count the rest of the time , not running from the beginning ?

That is what I have used to base my reply. Could be wrong though.
By the way, good to see you back. You have contributed enormously to this forum over the years I have been a member.
 

Similar Topics

Hi Guys, I was wondering if you guys could help me out. I want a tag to display a certain word depending on a set of tags. There are six flag...
Replies
8
Views
2,530
Hello I'm new with the PLC :) so my Question is that I want O/1 to be on when I push I/1 and when I push I/1 again O/1 becomes off. considering...
Replies
4
Views
1,907
Here is the logic i am designing. The X3 is basically a push button when u press it once it put something in on position. when u press it again it...
Replies
7
Views
5,347
my dear friends, plz tell me how can i compare 2 words? I dont want to convert the words to integer.
Replies
7
Views
6,238
Dear friend in CPU S7, can you tell me the diference between IW(input word) and PIW(peripheral input word)? Regards
Replies
8
Views
3,166
Back
Top Bottom