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

Parents
  • 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/

Reply
  • 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/

Children
No Data