hexagon logo

Get current tip position to variable in PC-DMIS

I need the current tip position to variable for safety reasons in PC-DMIS.

I know, that the current tip position is shown in the status bar.

But I would like to calculate automatically with the values of the tip.

Do any of you know a way to transfer the current position of the tip into a variable?

I thank you in advance

  • Create a read point (Ctrl-G). Assign a variable to equal a pointer to the feature, and then you can refer to the values as variable.X, variable.Y, and variable.Z.

    PNT1       =FEAT/POINT,CARTESIAN
                THEO/<1,2,3>,<0,1,0>
                ACTL/<1,2,3>,<0,1,0>
                READPOINT/
                ASSIGN/LOCATION={PNT1}
                ASSIGN/LX=LOCATION.X

  • Piggybacking off this idea. Readpoint is certainly the best bet here.

    Just something I quickly threw together to give errors within parameters you can set.

    PNT1       =FEAT/POINT,CARTESIAN
                THEO/<-25,25,20>,<0,0,1>
                ACTL/<-25,25,20>,<0,0,1>
                READPOINT/
                ASSIGN/LOC={PNT1}
    $$ NO,
                Adjust assignments for your own limits below
                ASSIGN/LIMITX=35
                ASSIGN/LIMITY=35
                ASSIGN/LIMITZ=25
    $$ NO,
                If X position of Tip is 25 or -25, throw warning. End routine automatically if desired, even if operator does not hit cancel.
                Set your own min/max in each statement
                IF/LOC.X >= 25 OR LOC.X <= -25
                  COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,OVC=NO,
                  "Warning, exceeding X limits! Only " +(LIMITX-ABS(LOC.X))+ " units remain"
                  ROUTINE/END
                END_IF/
                IF/LOC.Y >= 25 OR LOC.Y <= -25
                  COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,OVC=NO,
                  "Warning, exceeding Y limits! Only " +(LIMITY-ABS(LOC.Y))+ " units remain"
                  ROUTINE/END
                END_IF/
                IF/LOC.Z >= 20 OR LOC.Z <= -20
                  COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,OVC=NO,
                  "Warning, exceeding Z limits! Only " +(LIMITZ-ABS(LOC.Z))+ " units remain"
                  ROUTINE/END
                END_IF/

  •             ASSIGN/V1=GETSETTING("LASTHITMOVE(X)") 

    Also works... change the x to y or z based on what you need. 

  • I was also playing with this, and it is essentially giving you the X, Y, Z of the last hit of the feature you measured. If you have avoidance moves, clearplanes or move increments after features this won't truly be your probe tip's X, Y, and Z. But this was definitely on my radar. I tested it and it did not update the X, Y, Z after any move commands. This could still work, so long as you know that it's the last position the probe physically touched the part. Readpoint is more accurate like Dismas said, because it gets active probe tip location, and doesn't need to move or touch anything to acquire it.

  • yep, you're right, mine updates, but randomly. 

  • It's actually quite frustrating, because you can get the Tip A angle, B angle, IJK, and last parameter "Angle", but you cannot get the XYZ. If there is a secret way to find the X, Y, and Z this way please share. These are displayed in the status window. So I feel like there IS a way.

                TIP/T1A0B0, SHANKIJK=0, 0, 1, ANGLE=0
                ASSIGN/V1=GETCOMMAND("Set Active Tip", "UP",1)
                ASSIGN/WRIST=GETTEXT(3, "TOP", V1)
                ASSIGN/TIPI=GETTEXT(229, "TOP", V1)
                ASSIGN/TIPJ=GETTEXT(230, "TOP", V1)
                ASSIGN/TIPK=GETTEXT(231, "TOP", V1)
                ASSIGN/TIPANG=GETTEXT(38, "TOP", V1)
                COMMENT/REPT,
                "Active Tip is " +WRIST+ " ShankIJK is " +TIPI+","+TIPJ+","+TIPK+" and angle is " +TIPANG

  • There is a way, but it involves scripting. The object model includes a "machine" object. You would have to create an instance of that class and monitor the Readout Event. It just doesn't seem to be exposed to the pc-dmis program itself. If you were automating, however, and responding already to application events, you could always add that in.

  • Hello everyone,
    I have tested the whole thing and have to say that unfortunately I cannot use it. In manual mode, the read point is updated and everything runs as desired. In CNC mode, there is no update, which is absolutely necessary.
    Using it in CNC mode is dangerous!
    When running the program in CNC mode, the coordinate measuring machine starts to perform undefined movements when assigning the variables!!!!
    PC-DMIS for Windows V.2022.1 Build 260 SP2

  • It absolutely should not be making random moves while the variables are being assigned values. I don't even know where to begin with that. The only thing I can suggest is to set MODE/MANUAL prior to the READPOINT and MODE/DCC after. But again, it should not be making any moves that you haven't programmed.