S7 300 Newbie timer question

Friedmutant

Member
Join Date
Jul 2010
Location
Seattle
Posts
7
Hello All,

I inherited a S7 300 project at work after the previous guy left. I'm completely new to PLCs but have been trying to ramp up for a few weeks now.

I'm currently stuck in trying to figure out this logic: Given input 0.0, energize output coil for 5 minutes. After 5 minutes if input 0.0 is still set, then restart the timer. Keep doing that forever. If input 0.0 drops, then don't restart the timer after the current one expires.

I thought this would be simple but my first efforts failed. I think the problem is that the timer will only restart on a rising edge, so if my input stays high, I will only get 1 run of the timer. That's my guess at least. Either way, I am totally stumped. Any help would be very much appreciated.
 
Hi,

I'm not really sure to have understood what you want to realize, because my english is not very fluent.....
However I attached this example in LAD
immaginekk.png


Reassuming the output A0.0 is energize for all time the input E0.0 is on.
When input E0.0 is on the timer start and remains at on for the time setup (in the image 10s, in your application setup to 5 min.). When the time expired and E0.0 is on, timer start again.
If E0.0 is OFF the output A0.0 will be on untill the time expired.
 
Last edited:
I recommend learning to use IEC timers and Function Blocks. No need to keep track on amount of timers used. This one is SFB 3 (Pulse timer, TP). You can find them in standard library.

timer.png
 
Last edited:
Thanks for the replies. I Will try these out when I get back to the office. I certainly hadn't thought of inhibiting the timer with the timer itself, but that does seem to make sense.
 
In S7 if you use the timer to reset itself, it will not work. Use the timer done to set a coil, this coil resets the timer.

In other platforms you can use the timer done to reset the timer, but this does not work with S7.

I will check this thread again to see how it progresses.
 
I didn't know about midline outputs. Wonderful! Thank you very much. This solves my problem much more elegantly than the stuff I was concocting.

I will definitely learn more about IEC timers as well. Using 'regular' timers seems like more work to keep track of them.
 
A point to note when using s5 timers is that they are updated aynchronously to the program scan. This means that when you check a timer, it's value in one section of logic may not be the same as in another.
 
Iwant ot start one sequence logic base on counter, for this i need a one timer wich generat one pluse evevry second , this is possible in ge plc but in s7 i try but fail please advice how to do
 
Iwant ot start one sequence logic base on counter, for this i need a one timer wich generat one pluse evevry second , this is possible in ge plc but in s7 i try but fail please advice how to do

Dont really get what you mean, how long this pulse should be? One scan? One second? You can set clock byte in hw config (use search, im sure it has been covered in here before).
 
Code example:
A M 99.0
L S5T#1S
SD T 99
AN T 99
= M 99.0

There will allways be a positive edge on M 99.0 after cpu restart (if the M isn't resident).

Edit: Could be this habbit comes from the golden age of Step5.
K
 
Last edited:

Similar Topics

Hi - I am unfamiliar with Siemens PLCs but have been given ownership of an S7-300 CPU318-2 with IO and a network interface card at site. The PLC...
Replies
18
Views
4,271
hello everyone, i m trying to rebuild an old machine sitting idle for many years. it has a OP27 panel and 2 CPUs (314 and 316). i did connect the...
Replies
1
Views
2,269
First time using Siemens... From what I understand, all analog IO raw data is stored on the PLC as 16-bit words. I am configuring 4-20mA...
Replies
10
Views
25,415
I have a CPU 313C here that I was trying to troubleshoot my program. I am still new to Simatic manager. Anyways, I am monitoring the program and I...
Replies
16
Views
5,220
Guys please explain this to me, can't seem to find any SIEMENS literature to disprove or support what I am seeing. I am using the timer below...
Replies
8
Views
2,883
Back
Top Bottom