|
proc timer(int type)
M. F6 a3 c) H7 `# J N0 U/ o;(1=360Basic,2=360B or AWD,3=360C)8 _6 i' F, c' J5 ?* P% W$ I" ^1 W
def int error
( J/ n' j2 u- L9 Gdef string[35] ld_name9 q. q7 d; H- B) G, _/ c. g
: H7 ~/ Y' @1 [+ J0 i$ ^0 @4 _8 \; n, x
if ($p_subpar[1]==false) or (type<1) or (type>3)4 p/ \6 ~1 L8 M# @
ld_name=("<Unknown>")
6 M2 {; Z+ D" B4 `: V3 W) a endif
$ g u v/ c9 e" n1 v: wif type==1$ X, Y8 M6 n8 ?# s* w) M
ld_name=("<360Basic>"), L* P3 E5 k7 c( A
endif
2 E% U. f m$ u0 Z. Q! mif (type==2) and (r99==57529) }8 C* j w: C/ L+ Q' Y
ld_name=("<360B>")7 m$ E# { r3 {- R; l9 @( n/ S
endif
/ E% t0 u8 I& G2 sif (type==2) and (r99==1359)
* `' }* j3 S6 W6 C, N- n% ] ld_name=("<360AWD>")
7 c; u* J( }8 W6 S; K endif# Y" U) m4 t1 P U' ^
if type==3
, V2 u* e! f) D9 w ld_name=("<360C>")- L$ b1 w1 c% Z# s u
endif
9 x' S% `7 A3 u' ^* M% F& _: n, q7 t/ j6 U% O, [& t+ S/ E
write (error,"/_n_spf_dir/_n_cycle_timer_spf",""<<ld_name<<" Running:"<<$a_year<<"."<<$a_month<<"."<<$a_day<<" "<<$a_hour<<":"<<$a_minute<<":"<<$a_second )3 F% H4 A% R. \5 w+ w; {' D( Y4 [
5 K3 F; w h8 G9 br600=$a_hour*3600+$a_minute*60+$a_second+$a_msecond/1000-r600/ M7 W9 Q+ n# a- @
if r600<0
$ Q5 i9 Y% m$ g2 r+ d) L7 br600=r600+24*36009 D# M+ [! `0 W6 m
endif# Z1 u" ?0 f+ Z: u( h
if r600>3600
6 d' |2 I) d; kr600=0" h6 b2 w! S h5 S! J/ j" o
endif) u, K8 M+ T! u* a6 n
r600=round(r600)* h3 y8 B0 g9 V
8 c) N3 C" B9 L8 L. ]0 ~
write (error,"/_n_spf_dir/_n_cycle_timer_spf","Cycle time : "<<r600<<" Sec")
$ ]) i \' L8 z+ t# M. B. c
5 L# k) r6 D6 r2 |7 |4 Z% {5 v- a, zwrite (error,"/_n_spf_dir/_n_cycle_timer_spf","Machining Time: "<<round($ac_timer[1])<<" Sec " )
% q; I% ~9 U; d+ D: p' A9 H/ S0 M C' U
r600=$a_hour*3600+$a_minute*60+$a_second+$a_msecond/1000
) X2 t( ~7 \0 e( l; G5 tret |
|