Help me please on Unity Pro because I need a Pause Timer, it is a kind of timer that will pause the elpse time.
Because this block is available in Concept but in Unity this block is not available anymore.
So help please is there any available options?
[?]: Unity Pro and Pause Timer...
-
- Posts: 58
- Joined: Sat Mar 28, 2009 8:48 pm
- Location: Saudi Arabia
-
- Site Admin
- Posts: 1122
- Joined: Wed Sep 06, 2006 12:03 pm
- Location: CIS
Re: [?]: Unity Pro and Pause Timer...
You can use TON with EN input for this purpose:
-
- Site Admin
- Posts: 1122
- Joined: Wed Sep 06, 2006 12:03 pm
- Location: CIS
Yeah, you are right, it should be a little bit complicated Here is the code of TON_P after conversion from Concept:
it works...
Code: Select all
IF RE ( IN )
THEN Max_summe_time:= t#0s ; ET:= t#0s; Actuel_ton_time :=t#0s;
END_IF;
Trig_St (CLK:= NOT PAUSE);
TON_ST ( IN:= (IN AND NOT PAUSE AND ET <= PT),
PT:=PT);
IF Trig_st.FALL THEN;
ELSE
Actuel_ton_time:= TON_ST.ET;
END_IF;
IF ET < PT THEN
ET:= Max_summe_time + Actuel_ton_time;
Q:= FALSE;
ELSIF ET >= PT THEN
Q:= TRUE;
END_IF;
IF Trig_St.FALL THEN
Max_summe_time := ET;
ELSE;
END_IF;
IF IN =FALSE AND PAUSE =FALSE THEN
ET := t#0s;
Max_summe_time := t#0s;
Q:= FALSE;
END_IF;