[?]: Unity Pro and Pause Timer...

другие контроллеры
Post Reply
macroms
Posts: 57
Joined: Sat Mar 28, 2009 8:48 pm
Location: Saudi Arabia

[?]: Unity Pro and Pause Timer...

Post by macroms » Sun Jul 26, 2009 7:03 pm

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?

RomanR
Posts: 48
Joined: Mon Apr 07, 2008 6:18 am
Location: Israel

Post by RomanR » Wed Jul 29, 2009 4:31 am

hi macromos
its were simpl
you need make smol program with timer in concept
and after this yo need open this program in unity

unity make ney blok (timer )

macroms
Posts: 57
Joined: Sat Mar 28, 2009 8:48 pm
Location: Saudi Arabia

Post by macroms » Sat Aug 01, 2009 7:37 pm

Sir can you make me a converted pause timer on unity because I try to make a simple program in concept but when I open in Unity it gives an error and it cannot open...Help me please???

Schtiel
Site Admin
Posts: 1121
Joined: Wed Sep 06, 2006 12:03 pm
Location: CIS

Re: [?]: Unity Pro and Pause Timer...

Post by Schtiel » Tue Aug 04, 2009 8:12 am

You can use TON with EN input for this purpose:
Image

RomanR
Posts: 48
Joined: Mon Apr 07, 2008 6:18 am
Location: Israel

Post by RomanR » Fri Aug 07, 2009 10:19 am

Hi Schtiel
You simple not gud
because
"IN"=1 and "Pause"=0 and after 10 sec "Pause" going to 1
timer not stoping (waete 20sec and forsing "Pause" to 0 yo can see yo output going to 1 immediately)

Schtiel
Site Admin
Posts: 1121
Joined: Wed Sep 06, 2006 12:03 pm
Location: CIS

Post by Schtiel » Fri Aug 07, 2009 11:08 am

Yeah, you are right, it should be a little bit complicated :D Here is the code of TON_P after conversion from Concept:

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;
it works...

Post Reply