BoneSkier Posted February 8, 2012 Share Posted February 8, 2012 1. How can I tell if I am in RAPID, LINEAR, CIRCLE1, or CIRCLE2 for move mode? Coord[n].MoveMode seems to tell only part of the story. 2. How can I tell if I am using "normal k-1", "normal j-1", or "normal i-1"? 3. How can I tell if cutter comp is "CC1" (right), "CC2" (left), or "CC0" (off)? Link to comment Share on other sites More sharing options...
curtwilson Posted February 9, 2012 Share Posted February 9, 2012 To find the move mode, first look at Coord[x].MoveMode. A value of 3 indicates RAPID mode, a value of 0 indicates one of the "blended" modes: LINEAR, CIRCLE1, CIRCLE2. Coord[x].Omega0[0] equals 0.0 for LINEAR mode moves (including CIRCLE mode moves with no IJK vector or R, which execute as LINEAR). Bit 4 of Coord[n].Cdata is 0 for CIRCLE1 and 1 for CIRCLE2. All of these are for the most recently calculated move, which could be one or more moves ahead of the executing move. For those users running RS-274 "G-code" programs, most who want this type of status information will embed it in their G-code subroutines. This provides the maximum flexibility to tailor the status information to the particular application needs. You can, for example, use a "synchronous assignment" so the status value will reflect the presently executing move. For example: N0: rapid; // G00 MyCalcMoveMode = 0; // Set at move calculation time MyExecMoveMode == 0; // Set at move execution time return; N1000: linear; // G01 MyCalcMoveMode = 1; // Set at move calculation time MyExecMoveMode == 1; // Set at move execution time return; N2000: circle1; // G02 MyCalcMoveMode = 2; // Set at move calculation time MyExecMoveMode == 2; // Set at move execution time return; N3000: circle2; // G03 MyCalcMoveMode = 3; // Set at move calculation time MyExecMoveMode == 3; // Set at move execution time return; ... This is useful for other reasons, as for the increasing number of users who implement G00 as a "fast linear" mode to get features such as a straight-line path with kinematics in a non-Cartesian system. To find out your present normal vector, you can look at Coord[x].Normal. Normal[0] is the I-component, Normal[1] is the J, and Normal[2] is the K. As with move mode, many G-code users will set their own status variable in the G17, G18, and G19 subroutines. To find your present cutter comp mode, you can look at Coord[x].CCMode. It is 0 for CC0, 1 for CC1, and 2 for CC2. Once again, a user status variable can be set in the G40, G41, and G42 subroutines. 1 Link to comment Share on other sites More sharing options...
Recommended Posts