S7 Siemens 300

A

Thread Starter

Arpad Fazekas

Hello Guys!

I have a similar problem with timers.

Let me explain what is my problem.

I have two timers T1 and T2, When i detect a metal the M8.0 memory will addressed and start the T1 Timer. T1 counts 2sec after 2sec on the out T1 will address the M8.1 what is the activation for T2.
T2 will count 4 sec. and this is one cycle. T1+T2= 6sec

I need to make that when i detected the metal the counter will start to work, but if the transporter stops working i want to pause the counting. and when the transporter start to work counter will start do count down where it was paused. If it was stopped on 3 sec that means the T2 will start from 3.1 sec till 4 sec.

Sorry for my bad english and i hope that my explanation is clear.

Thanx, and best regards
 
L

Luca Gallina

while there is a way to do what you need by using S7 system timers (which actually work as S5 timers), I would avoid it. In case, you should stop the timer, read the elapsed time, calculate the new time setpoint and force the timer preset with new calculated value. All that in BCD math plus timebase indication in most significant nibble. Too much complicated.

Better solution: use a INT variable and increment it at regular intervals upon proper conditions. A 10mS call of OB35 should suit, you'll need only a few lines of code.
 
Try the S_ODTS (in ladder) or SS (in STL). This is a retentive timer. You'll need to read the online help or do some experimentation to figure out the actual details.
 
P

Patrick Beckett

I am curious. Why do you not recommend using the S5 timer? the S-ODTS seems perfect, as long as you remember to reset it correctly!

Please explain.

Thanks

Patrick
 
Top