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
  • 1) Copy what Inspect.212 posted into a Word or Notepad doc, then save it. You can skip the points. I have a folder full of this stuff, and I always include who wrote it. Print it out.

    2) Open your long program, file-save-as a new version (make this a serious habit for doing any editing!!!!)

    Alternately, you could write both sections as scripts and have any program run them.


    I always do this when I am trying new stuff in proven programs.

    Now you are making my head hurt. Baby steps.

    OK, the program just ran and all I got was a comment that poped up and no time. I know I did something wrong but right know all I can think of is getting out of here for the three day weekend. I will work more on this next week.
Reply
  • 1) Copy what Inspect.212 posted into a Word or Notepad doc, then save it. You can skip the points. I have a folder full of this stuff, and I always include who wrote it. Print it out.

    2) Open your long program, file-save-as a new version (make this a serious habit for doing any editing!!!!)

    Alternately, you could write both sections as scripts and have any program run them.


    I always do this when I am trying new stuff in proven programs.

    Now you are making my head hurt. Baby steps.

    OK, the program just ran and all I got was a comment that poped up and no time. I know I did something wrong but right know all I can think of is getting out of here for the three day weekend. I will work more on this next week.
Children
No Data