|
proc timer(int type)
8 B6 W$ ~6 e& u$ q;(1=360Basic,2=360B or AWD,3=360C); `- t& U0 I' g0 V4 t5 @
def int error% k1 F+ Y( }0 O8 b: n/ \
def string[35] ld_name
3 `' t4 a5 `0 p8 G
1 z& |% k7 @; cif ($p_subpar[1]==false) or (type<1) or (type>3)
4 h Q, i& A( y0 { ld_name=("<Unknown>")
$ x7 `4 y* ]+ E7 I0 ^ endif: t/ p* B. p d% A* m( R
if type==1
9 F( E- B- g, `: Y, ^) A7 z8 j ld_name=("<360Basic>")& S9 M% R7 O/ ^
endif
4 z2 l0 P% ]! S0 W9 ~6 x- rif (type==2) and (r99==57529), b& V# D8 _# y' ^
ld_name=("<360B>") t: T* R( {5 q# B
endif0 J, v4 b# f! V1 x+ a% w
if (type==2) and (r99==1359)5 ]7 K. v5 t7 e( I' f, H! @
ld_name=("<360AWD>")
* {# u3 n1 v, J8 w* a7 Q2 [+ w- a endif0 E# J* | E6 v# a
if type==36 v5 c& g" ~. w4 v
ld_name=("<360C>")* S! f7 }. d; h) E5 g
endif
" ]0 p& x& k% B5 r- @0 {: y( R
7 m3 m) i% l* J; ~& Wwrite (error,"/_n_spf_dir/_n_cycle_timer_spf",""<<ld_name<<" Running:"<<$a_year<<"."<<$a_month<<"."<<$a_day<<" "<<$a_hour<<":"<<$a_minute<<":"<<$a_second )
$ ]. C4 l9 o$ n0 S3 Y. C
1 F# }& K+ `5 Lr600=$a_hour*3600+$a_minute*60+$a_second+$a_msecond/1000-r6006 n: ^# ?, Q8 H2 D
if r600<04 }" g6 d/ ~: j3 Y' A
r600=r600+24*3600
$ x; N; N6 O& `6 P7 A8 E$ K: Yendif
5 I' P- l3 _5 j! S5 ~+ Yif r600>3600/ r+ i/ b% }# b& J- h5 i
r600=0
! @3 V5 Y. `$ [: rendif/ s, m) Z Y* I
r600=round(r600); U: \! O2 u- j% K6 c8 j& c! w
8 d" w8 a4 p; n2 A
write (error,"/_n_spf_dir/_n_cycle_timer_spf","Cycle time : "<<r600<<" Sec")+ T2 {. [' O" d6 ?
3 T1 x3 q# q% w2 F: t; z& Iwrite (error,"/_n_spf_dir/_n_cycle_timer_spf","Machining Time: "<<round($ac_timer[1])<<" Sec " )
1 X+ q7 R% ^8 G3 z( q7 n" y0 g; K7 P
r600=$a_hour*3600+$a_minute*60+$a_second+$a_msecond/1000
0 f1 e: v) r' uret |
|