hexagon logo

Probe Calibration Interval Stop Gap

I am looking to terminate a program if the probe tips have not been calibrated withing a certain time frame. The warning message just isn't enough for these guys... I think I need functions PROBEDATA() and SYSTEMDATE() but I am not sure what expression I need to evaluate for an "IF" flow control command. Anyone, do anything similar or have experience with this? Need to add a request in idea center. This seems like it should be an option in the probe setup.
Parents
  • Here you go!

    Change the - 2 in the bolded line for the amount of days that you want to wait for a calibration.
    Calibrate Monday, due Thursday -2
    Calibrate Monday due Wednesday -1
    Calibrate Monday due Tuesday -0

    Here is how the schedule would occur (Assuming we calibrated yesterday with a -2)
    Cal Date Due Date
    10/28/20 10/26/20 (current day -2)
    10/28/20 10/27/20
    10/28/20 10/28/20 (cal date = due date nothing will happen)
    10/28/20 10/29/20 (cal date < due date program will not execute until probe is calibrated)

    
    ASSIGN/V1=PROBEDATA("DATE")
    ASSIGN/MONTH=SYSTEMDATE("MM")
    [B]ASSIGN/DAY=SYSTEMDATE("dd")-2[/B]
    ASSIGN/YEAR=SYSTEMDATE("yy")
    ASSIGN/CALDATE=PROBEDATA("DATE")
    ASSIGN/DUEDATE=MONTH+"/"+DAY+"/"+YEAR
    IF_GOTO/CALDATE<DUEDATE,GOTO = L1
    PNT1 =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
    THEO/<-17,638.4,-16>,<0,0,-1>
    ACTL/<-17,638.4,-16>,<0,0,-1>
    TARG/<-17,638.4,-16>,<0,0,-1>
    SHOW FEATURE PARAMETERS=NO
    SHOW CONTACT PARAMETERS=NO
    PNT2 =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
    THEO/<-17,638.4,-16>,<0,0,-1>
    ACTL/<-17,638.4,-16>,<0,0,-1>
    TARG/<-17,638.4,-16>,<0,0,-1>
    SHOW FEATURE PARAMETERS=NO
    SHOW CONTACT PARAMETERS=NO
    PNT3 =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
    THEO/<-17,638.4,-16>,<0,0,-1>
    ACTL/<-17,638.4,-16>,<0,0,-1>
    TARG/<-17,638.4,-16>,<0,0,-1>
    SHOW FEATURE PARAMETERS=NO
    SHOW CONTACT PARAMETERS=NO
    L1 =LABEL/
    
    
Reply
  • Here you go!

    Change the - 2 in the bolded line for the amount of days that you want to wait for a calibration.
    Calibrate Monday, due Thursday -2
    Calibrate Monday due Wednesday -1
    Calibrate Monday due Tuesday -0

    Here is how the schedule would occur (Assuming we calibrated yesterday with a -2)
    Cal Date Due Date
    10/28/20 10/26/20 (current day -2)
    10/28/20 10/27/20
    10/28/20 10/28/20 (cal date = due date nothing will happen)
    10/28/20 10/29/20 (cal date < due date program will not execute until probe is calibrated)

    
    ASSIGN/V1=PROBEDATA("DATE")
    ASSIGN/MONTH=SYSTEMDATE("MM")
    [B]ASSIGN/DAY=SYSTEMDATE("dd")-2[/B]
    ASSIGN/YEAR=SYSTEMDATE("yy")
    ASSIGN/CALDATE=PROBEDATA("DATE")
    ASSIGN/DUEDATE=MONTH+"/"+DAY+"/"+YEAR
    IF_GOTO/CALDATE<DUEDATE,GOTO = L1
    PNT1 =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
    THEO/<-17,638.4,-16>,<0,0,-1>
    ACTL/<-17,638.4,-16>,<0,0,-1>
    TARG/<-17,638.4,-16>,<0,0,-1>
    SHOW FEATURE PARAMETERS=NO
    SHOW CONTACT PARAMETERS=NO
    PNT2 =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
    THEO/<-17,638.4,-16>,<0,0,-1>
    ACTL/<-17,638.4,-16>,<0,0,-1>
    TARG/<-17,638.4,-16>,<0,0,-1>
    SHOW FEATURE PARAMETERS=NO
    SHOW CONTACT PARAMETERS=NO
    PNT3 =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
    THEO/<-17,638.4,-16>,<0,0,-1>
    ACTL/<-17,638.4,-16>,<0,0,-1>
    TARG/<-17,638.4,-16>,<0,0,-1>
    SHOW FEATURE PARAMETERS=NO
    SHOW CONTACT PARAMETERS=NO
    L1 =LABEL/
    
    
Children
  • I just thought of something that would be cool. Add this to the end of your program

    If you need to calibrate it will go to L1 and launch the Operator comment "Calibrate Probe" and then when you hit ok or cancel it will end the program
    If your calibration is good it will run the program and eventually get to GOTO/L2 which will skip the comment

    GOTO/L2
    L1 =LABEL/
    COMMENT/OPER,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO,
    Calibrate Probe!
    L2 =LABEL/