|
proc timer(int type)
8 J8 U" e2 F8 \; v;(1=360Basic,2=360B or AWD,3=360C)
- O: L2 o( o+ ^- Fdef int error
( L& X* G* o3 H, |) ldef string[35] ld_name
& @* I% j6 V7 T( n4 g& F F$ J8 {: n3 b& W, y1 r: m$ E7 O& _
if ($p_subpar[1]==false) or (type<1) or (type>3)2 f3 k) q2 J5 K: d7 O
ld_name=("<Unknown>")# \/ K* }4 l9 y( Y; r
endif
7 B* j* V5 x/ \5 {: B2 aif type==1
+ y5 g0 e6 N, t: C6 g8 {+ R ld_name=("<360Basic>")0 ^: Z: i0 x: C8 \4 \
endif7 A4 t* h1 j* D/ P9 J0 U% L
if (type==2) and (r99==57529)* Q1 J# \$ a- K; a" F
ld_name=("<360B>")8 y/ z8 m0 n5 p0 D
endif+ P& L) \" f6 b5 D7 Y3 p
if (type==2) and (r99==1359)
9 {/ w1 s+ E, K4 {) K9 @ ld_name=("<360AWD>")5 Q$ M8 Q& y" p1 T6 c
endif
3 T# }; I) H' [: F4 ]if type==3
6 v$ {" F a0 A7 Q3 i ld_name=("<360C>")
3 G5 d+ f/ o3 Q/ f# n endif) T! N- r8 _' O2 {# _5 D( l! s& K
7 L: K: R o: ^# Bwrite (error,"/_n_spf_dir/_n_cycle_timer_spf",""<<ld_name<<" Running:"<<$a_year<<"."<<$a_month<<"."<<$a_day<<" "<<$a_hour<<":"<<$a_minute<<":"<<$a_second )
?+ t$ M- W6 l' L: v4 x0 K- u& }' S7 A$ ^" b- G3 F7 F# t J
r600=$a_hour*3600+$a_minute*60+$a_second+$a_msecond/1000-r600% c5 J3 g/ t/ P" }3 Y
if r600<09 O# V' m$ _# b+ M6 _+ e0 |# J- Y
r600=r600+24*3600
0 @9 |7 O# K* D/ g4 R- K! Wendif0 B3 N! O2 M5 A, S4 J: C1 W, o; s) w
if r600>3600+ i X$ J* C z! L: P/ W3 Q$ [/ T! _
r600=04 p! M# r% @; ]! k
endif
* i; R; w/ I2 n% q0 e4 K: Qr600=round(r600)
6 J* [$ Z0 z0 q* V3 X2 U+ w; J7 T1 _
write (error,"/_n_spf_dir/_n_cycle_timer_spf","Cycle time : "<<r600<<" Sec")
, z. {: C- @) ?) \& y: u Y V! U$ H
& u2 H; V& P* W, M5 Fwrite (error,"/_n_spf_dir/_n_cycle_timer_spf","Machining Time: "<<round($ac_timer[1])<<" Sec " ): R: z0 |5 I. W% ]# j* A
& n: F# k* i( ~- R7 j) fr600=$a_hour*3600+$a_minute*60+$a_second+$a_msecond/1000. M% R5 `/ Q0 d; w, h/ g! c
ret |
|