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


    LOL - I haven't done that more advanced step yet either. Baby steps = win.


    1) Have a good 3-day Labor-free weekend!

    2) Ok, you're back to work. 1st make sure that the HH is capitals and the mm and ss are lower case. Then double-check all the variable names for typos.

    3) In the operator comment, re-type the variable ELAPSED_MIN. In my 4.3, the demon actually asks me if I mean to reference the variable. This way the value of the variable gets included in the pop-up.

    - Josh




    This may be the problem. I am using 3.5MR2, and 3.7MR3

    Nope that was not the problem. I have it working now. Don't know what I did, but it is working.
    Now I am going to see if I can get it to print out on the inspection report. I am hopeing all I need to do is change the report type.

    Yes it works sending it to the report. I just change the output to report and it printed at the bottom of the report.

    (Sounds like I am talking to myself, and worse yet, I have answered myself twice.)
Reply
  • +1


    LOL - I haven't done that more advanced step yet either. Baby steps = win.


    1) Have a good 3-day Labor-free weekend!

    2) Ok, you're back to work. 1st make sure that the HH is capitals and the mm and ss are lower case. Then double-check all the variable names for typos.

    3) In the operator comment, re-type the variable ELAPSED_MIN. In my 4.3, the demon actually asks me if I mean to reference the variable. This way the value of the variable gets included in the pop-up.

    - Josh




    This may be the problem. I am using 3.5MR2, and 3.7MR3

    Nope that was not the problem. I have it working now. Don't know what I did, but it is working.
    Now I am going to see if I can get it to print out on the inspection report. I am hopeing all I need to do is change the report type.

    Yes it works sending it to the report. I just change the output to report and it printed at the bottom of the report.

    (Sounds like I am talking to myself, and worse yet, I have answered myself twice.)
Children
No Data