hexagon logo

Feature Run Timer

I got this from another on here and edited it very little but thought it worthy of posting in here.

This will give the total amount of time (in minutes) for any number of features to run on the CMM.

ASSIGN/TIME1=SYSTEMTIME("HH':'mm':'ss")
            ASSIGN/SEC1=RIGHT(TIME1,2)
            ASSIGN/MIN1=MID(TIME1,3,2)
            ASSIGN/HOUR1=LEFT(TIME1,2)
            ASSIGN/HOUR_TO_SEC_1=(HOUR1)*3600
            ASSIGN/MIN_TO_SEC_1=(MIN1)*60
            ASSIGN/TOTAL_SEC_1=(HOUR_TO_SEC_1)+(MIN_TO_SEC_1)+(SEC1)
$$ NO,add features here
            MOVE/INCREMENT,<0,0,500>
PNT1       =FEAT/CONTACT/VECTOR POINT,CARTESIAN
            THEO/<0,0,0>,<0,0,1>
            ACTL/<0,0,0>,<0,0,1>
            TARG/<0,0,0>,<0,0,1>
            SHOW FEATURE PARAMETERS=NO
            SHOW CONTACT PARAMETERS=NO
            MOVE/INCREMENT,<0,0,500>
PNT2       =FEAT/CONTACT/VECTOR POINT,CARTESIAN
            THEO/<10,0,0>,<0,0,1>
            ACTL/<10,0,0>,<0,0,1>
            TARG/<10,0,0>,<0,0,1>
            SHOW FEATURE PARAMETERS=NO
            SHOW CONTACT PARAMETERS=NO
            MOVE/INCREMENT,<0,0,500>
PNT3       =FEAT/CONTACT/VECTOR POINT,CARTESIAN
            THEO/<20,0,0>,<0,0,1>
            ACTL/<20,0,0>,<0,0,1>
            TARG/<20,0,0>,<0,0,1>
            SHOW FEATURE PARAMETERS=NO
            SHOW CONTACT PARAMETERS=NO
            MOVE/INCREMENT,<0,0,500>
$$ NO,Add dimension of last feature to force PC-DMIS 
     ,to "catch up" before reporting end time.
     ,Set output to NONE
DIM LOCTIME1= LOCATION OF POINT PNT1  UNITS=MM ,$
GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=NONE
AX       MEAS    NOMINAL       +TOL       -TOL        DEV     OUTTOL
X       0.000      0.000      0.800      0.800      0.000      0.000 --#---
END OF DIMENSION LOCTIME1
            ASSIGN/TIME2=SYSTEMTIME("HH':'mm':'ss")
            ASSIGN/SEC2=RIGHT(TIME2,2)
            ASSIGN/MIN2=MID(TIME2,3,2)
            ASSIGN/HOUR2=LEFT(TIME2,2)
            ASSIGN/HOUR_TO_SEC_2=(HOUR2)*3600
            ASSIGN/MIN_TO_SEC_2=(MIN2)*60
            ASSIGN/TOTAL_SEC_2=(HOUR_TO_SEC_2)+(MIN_TO_SEC_2)+(SEC2)
            ASSIGN/ELAPSED_SEC=(TOTAL_SEC_2)-(TOTAL_SEC_1)
            ASSIGN/ELAPSED_MIN=(ELAPSED_SEC)/60
            COMMENT/OPER,YES,"The elasped time to run the feature(s) was " + ELAPSED_MIN + " minutes."
Parents
  • I wanted to try this to see what how it works.


    I entered it exactly as you said to (or so I think)


    This is at the beginning of program....

    ASSIGN/TIME1 = SYSTEMTIME("HH':'mm':'ss")
                ASSIGN/SEC1 = RIGHT(TIME1,2)
                ASSIGN/MIN1 = MID(TIME1,3,2)
                ASSIGN/HOUR1 = LEFT(TIME1,2)
                ASSIGN/HOUR_TO_SEC_1 = (HOUR1)*3600
                ASSIGN/MIN_TO_SEC_1 = (MIN1)*60
                ASSIGN/TOTAL_SEC_1 = (HOUR_TO_SEC_1)+(MIN_TO_SEC_1)+(SEC1)




    This is at the end....


    ASSIGN/TIME2 = SYSTEMTIME("HH':'mm':'ss")
                ASSIGN/SEC2 = [COLOR="Red"]RIGHT(TIME2,2)[/COLOR]
                ASSIGN/MIN2 = [COLOR="Red"]MID(TIME2,3,2)[/COLOR]
                ASSIGN/HOUR2 = [COLOR="Red"]LEFT(TIME2,2)[/COLOR]
                ASSIGN/HOUR_TO_SEC_2 = [COLOR="Red"](HOUR2)*3600[/COLOR]
                ASSIGN/MIN_TO_SEC_2 = (MIN1)*60
                ASSIGN/TOTAL_SEC_2 = [COLOR="Red"](HOUR_TO_SEC_2)+(MIN_TO_SEC_2)+(SEC2)[/COLOR]
                ASSIGN/ELAPSED_SEC = (TOTAL_SEC_2)-(TOTAL_SEC_1)
                ASSIGN/ELAPSED_MIN = (ELAPSED_SEC)/60
                COMMENT/OPER,NO, 
                               ,The elapsed time to run this program was "+ELAPSED_MIN+" minutes
                               ,




    The stuff in red is showing up red in program. What's wrong with it? And why my comment pops up the end it just reads:

    The elapsed time to run this program was "+ELAPSED_MIN+" minutes
Reply
  • I wanted to try this to see what how it works.


    I entered it exactly as you said to (or so I think)


    This is at the beginning of program....

    ASSIGN/TIME1 = SYSTEMTIME("HH':'mm':'ss")
                ASSIGN/SEC1 = RIGHT(TIME1,2)
                ASSIGN/MIN1 = MID(TIME1,3,2)
                ASSIGN/HOUR1 = LEFT(TIME1,2)
                ASSIGN/HOUR_TO_SEC_1 = (HOUR1)*3600
                ASSIGN/MIN_TO_SEC_1 = (MIN1)*60
                ASSIGN/TOTAL_SEC_1 = (HOUR_TO_SEC_1)+(MIN_TO_SEC_1)+(SEC1)




    This is at the end....


    ASSIGN/TIME2 = SYSTEMTIME("HH':'mm':'ss")
                ASSIGN/SEC2 = [COLOR="Red"]RIGHT(TIME2,2)[/COLOR]
                ASSIGN/MIN2 = [COLOR="Red"]MID(TIME2,3,2)[/COLOR]
                ASSIGN/HOUR2 = [COLOR="Red"]LEFT(TIME2,2)[/COLOR]
                ASSIGN/HOUR_TO_SEC_2 = [COLOR="Red"](HOUR2)*3600[/COLOR]
                ASSIGN/MIN_TO_SEC_2 = (MIN1)*60
                ASSIGN/TOTAL_SEC_2 = [COLOR="Red"](HOUR_TO_SEC_2)+(MIN_TO_SEC_2)+(SEC2)[/COLOR]
                ASSIGN/ELAPSED_SEC = (TOTAL_SEC_2)-(TOTAL_SEC_1)
                ASSIGN/ELAPSED_MIN = (ELAPSED_SEC)/60
                COMMENT/OPER,NO, 
                               ,The elapsed time to run this program was "+ELAPSED_MIN+" minutes
                               ,




    The stuff in red is showing up red in program. What's wrong with it? And why my comment pops up the end it just reads:

    The elapsed time to run this program was "+ELAPSED_MIN+" minutes
Children
No Data