Parameter Set AutoCal

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Parameter Set AutoCal

    I've searched the forum for a day or two, but I haven't found a thread that answers my question.

    I use autocal commands in all my problems. I track the dates and times for the calibration of these tip sets in an external file. Based on a time interval, the calibration is triggered. I was asking a programmer friend yesterday if it was possible to pull the date and time of the last calibration directly from PC-DMIS.

    The data is there in the active tip list. My question is how to pull it out. I imagine it will be something like:

    Code:
    ASSIGN/QCOM=GETCOMMAND("LOADPROBE","DOWN",1)
                ASSIGN/VPRBNAME=GETTEXT("LOADPROBE",0,QCOM)
    Anyone out there tried to do this?
    Negative, Ghostrider...the pattern is full...

  • #2
    ASSIGN/V1=PROBEDATA("Date", "tipID", "probefilename")
    ASSIGN/V2=PROBEDATA("Time", "tipID", "probefilename")
    AndersI
    SW support - Hexagon Metrology Nordic AB

    Comment


    • Rookie
      Rookie commented
      Editing a comment
      Thank you Anders!

  • #3
    How to go about getting a tip from a parameter set in the autocal command?
    Negative, Ghostrider...the pattern is full...

    Comment


    • #4
      The tip Id come from the probe file, not from the autocal.
      If you have a set with T1A0B0 and T1A90B90, called set1, for example, then type "T1A0B0" to get A0B0 results.
      You will have the same number of asignments than the number of tip angles.

      Comment


      • Rookie
        Rookie commented
        Editing a comment
        Yea I knew the tip ID is independent of the autocal command. I was wondering if there was a way of getting the individual tip data based on the parameter set. According to the next post from Anders, there's no way of doing that.

    • #5
      I don't know of any way to read parameter sets. You can get the currently selected tip with GETPROBEDATA("ID"), but I have found nothing referencing parameter sets :-(
      The type library (automation) does not contain anything about probe files except the name of the current one.

      I can't even find a way to enumerate the tips (angles) in a probe file - if we had that, it would be possible to discover uncalibrated angles, and other interesting(?) things...
      Last edited by AndersI; 10-29-2019, 09:56 AM.
      AndersI
      SW support - Hexagon Metrology Nordic AB

      Comment


      • Rookie
        Rookie commented
        Editing a comment
        Anders, I'm using this code, but I can't get the text of the name of the probe. Any ideas?
        Code:
        ASSIGN/VPRBCMD=GETCOMMAND("LOAD PROBE","DOWN",1)
                    ASSIGN/VPRBNAME=GETTEXT("LOAD PROBE",0,VPRBCMD)

      • AndersI
        AndersI commented
        Editing a comment
        That's because the data type for the probe file name is "FILENAME" , not "LOAD PROBE".

        ASSIGN/V1=GETCOMMAND("LOAD PROBE", "UP")
        ASSIGN/V2=GETTEXT("FILENAME", 0, V1)

      • Rookie
        Rookie commented
        Editing a comment
        ...feeling kinda dumb right now...
        Why did I not think of that...?

        Thanks

    • #6
      I'm searching the help file to find how to get the next probe file name. Not finding anything so far.
      Negative, Ghostrider...the pattern is full...

      Comment


      • AndersI
        AndersI commented
        Editing a comment
        You increment the DOWN value until you get another name, or you put the code just before the next LOADPROBE command...

    • #7
      Wanted to post what I came up with for those that are interested...

      I still ended up having to use an external log file to track the calibration date and times for the parameter sets, but this code is working like a charm:

      Code:
      ASSIGN/VCALINTERVAL=VCALINTERVAL*100
                  ASSIGN/QCMD=GETCOMMAND("LOAD PROBE","DOWN",1)
                  ASSIGN/VPRBNAME=GETTEXT("FILENAME",0,QCMD)
                  ASSIGN/VMASTERCALTIME=PROBEDATA("TIME","T1A0B0",VPRBNAME)
                  ASSIGN/VMASTERCALDATE=PROBEDATA("DATE","T1A0B0",VPRBNAME)
                  ASSIGN/VMSTRCALHRS=ELEMENT(1,":",VMASTERCALTIME)
                  ASSIGN/VMSTRCALMINS=ELEMENT(2,":",VMASTERCALTIME)
                  ASSIGN/VMASTERCALTIME=VMSTRCALHRS*100+VMSTRCALMINS
                  ASSIGN/VCOMPDATE=SYSTEMDATE("MM/''dd/''yy")
      $$ NO,
                  --------------------------------------------------------------------
                  ASSIGN/VMASTERCAL=0
                  ASSIGN/VTIMEDIFF=VCURRTIME-VMASTERCALTIME
                  IF/VTIMEDIFF>=VCALINTERVAL OR VMASTERCALDATE<>VCOMPDATE
                    ASSIGN/VMASTERCAL=1
                  END_IF/
                  SELECT/VMASTERCAL
                    CASE/1
      E_DELCALFILE    =FILE/EXISTS,VCALFILE
                      IF/E_DELCALFILE==1
                        FILE/DELETE,VCALFILE
                      END_IF/
                      LOADPROBE/HSP-X1H_MASTER
                      TIP/T1A0B0, SHANKIJK=0, 0, 1, ANGLE=0
                      AUTOCALIBRATE/PROBE, PARAMETER_SET=HSP-X1H_MASTER, QUALTOOL_MOVED=YES_DCC, 
                                    SHOW_SUMMARY=NO, OVERWRITE_RESULTSFILE=YES
                      GOTO/L_CALROUTINE1
                    END_CASE/
                  END_SELECT/
      $$ NO,
      
                  ====================================================================================================================================================================================================
                  AUTO CALIBRATION ROUTINES FOR THE PROGRAM PROBES
      
      $$ NO,
      
                  =================================================================================
                  PROGRAM PROBE 1
                  - ROUTINE CHECKS THE CALIBRATION FILE FOR THE PARAMETER SET
                    FOR THIS PROBE
                  - CALIBRATION IS TRIGGERED IF TIME AND DATE CRITERIA ARE
                    NOT MET
      
      $$ NO,
      
                  -------------------------------------------------------
                  -FINDS THE NEXT LOADPROBE COMMAND AND GETS THE PROBE
                   NAME.
                  -CHECKS FOR THE CALIBRATION LOG AND COMPARES
                   THE DATE AND TIME FOR THE PARAMETER SET
                   AGAINST THE CURRENT TIME/DATE AND THE CALIBRATION
                   INTERVAL.
      
                  ASSIGN/VREAD=""
                  ASSIGN/VPRBCAL=0
                  ASSIGN/QCMD=GETCOMMAND("LOAD PROBE","DOWN",1)
                  ASSIGN/VPRBNAME=GETTEXT("FILENAME",0,QCMD)
                  ASSIGN/QCOM=GETCOMMAND("AUTOCALIBRATE ACTIVE PROBE","DOWN",1)
                  ASSIGN/VPARAMSET=GETTEXT("PARAMETER SET",0,QCOM)
                  ASSIGN/VCURRTIME=SYSTEMTIME("HH''mm")
      E_CALFILE  =FILE/EXISTS,VCALFILE
                  IF/E_CALFILE==0
                    ASSIGN/VPRBCAL=1
                    GOTO/L_CALROUTINE1
                  END_IF/
                  ELSE/
        $$ NO,
      
                    ----------------------------------------------------
                    -CHECK THE CAL LOG FOR THE PARAMETER SET NAME AND
                     PROBE NAME. 
      
                    ASSIGN/C=0
      FPTR_CALFILE  =FILE/OPEN,VCALFILE,READ
                    WHILE/VREAD<>"EOF"
      VREAD          =FILE/READLINE,FPTR_CALFILE,{VFILEPRBNAME}+","+{VFILEPARAMSET}+","+{VCALDATE}+","+{VCALTIME}
                      SELECT/VFILEPRBNAME==VPRBNAME AND VFILEPARAMSET==VPARAMSET
                        CASE/1
                          ASSIGN/C=C+1
                          ASSIGN/VTIMEDIFF=VCURRTIME-VCALTIME
                          IF/VCALDATE<>VCURRDATE
                            ASSIGN/VPRBCAL=1
                          END_IF/
                          ELSE_IF/VTIMEDIFF>=VCALINTERVAL
                            ASSIGN/VPRBCAL=1
                          END_ELSEIF/
                        END_CASE/
                      END_SELECT/
                    END_WHILE/
                    FILE/CLOSE,FPTR_CALFILE,KEEP
                  END_ELSE/
                  IF/C==0
                    ASSIGN/VPRBCAL=1
                  END_IF/
      $$ NO,
      
                  -------------------------------------------------------
                  -ROUTINE FOR THE AUTO CALIBRATION
      
      L_CALROUTINE1=LABEL/
                  FILE/CLOSE,VCALFILE,KEEP
                  ASSIGN/QCMD=GETCOMMAND("LOAD PROBE","DOWN",1)
                  ASSIGN/VPRBNAME=GETTEXT("FILENAME",0,QCMD)
                  ASSIGN/QCOM=GETCOMMAND("AUTOCALIBRATE ACTIVE PROBE","DOWN",1)
                  ASSIGN/VPARAMSET=GETTEXT("PARAMETER SET",0,QCOM)
                  SELECT/VPRBCAL
                    CASE/1
                      LOADPROBE/HSP-X1H_2X40
                      TIP/T1A0B0, SHANKIJK=0, 0, 1, ANGLE=0
                      AUTOCALIBRATE/PROBE, PARAMETER_SET=HSP-X1H_2X40_A0B0, QUALTOOL_MOVED=NO, 
                                    SHOW_SUMMARY=NO, OVERWRITE_RESULTSFILE=YES
      FPTR           =FILE/OPEN,VCALFILE,APPEND
                      FILE/WRITELINE,FPTR,VPRBNAME+","+VPARAMSET+","+VCURRDATE+","+VCURRTIME
                      FILE/CLOSE,FPTR,KEEP
                    END_CASE/
                  END_SELECT/
      Negative, Ghostrider...the pattern is full...

      Comment

      Related Topics

      Collapse

      Working...
      X