Current Point

frameGet

frameGet(x:=LREAL, y:=LREAL, z:=LREAL, a:=LREAL, b:=LREAL, c:=LREAL)

Store the current frame of the PCS (program coordinate system) in x, y, z and a, b, c.

Example:

The output of the following example is shown below. The G-Code in the example performs a linear movement to the PCS (program coordinate system) point [10,20,30]. Then these coordinates are stored in curX, curY, curZ by frameGet(…). The translation [1,2,3] that is pushed onto the transformation-stack leads to an adaption of the current PCS (program coordinate system) point such that the MCS (machine coordinate system) point [10,20,30] remains unchanged. Therefore, the subsequent call of frameGet(…) retrieves the PCS (program coordinate system) point [9,18,27].

{
VAR
    curX, curY, curZ : LREAL;
END_VAR

!G01 X10 Y20 Z30 F65000

frameGet(x=>curX, y=>curY, z=>curZ);
MSG(toString(curX,' ',curY,' ',curZ,''));

transTranslate(1,2,3);
frameGet(x=>curX, y=>curY, z=>curZ);
MSG(toString(curX,' ',curY,' ',curZ,''));
}
M02

Output:

10.000000 20.000000 30.000000
9.000000 18.000000 27.000000

qAxisGet

qAxisGet(q1:=LREAL, q2:=LREAL, q3:=LREAL, q4:=LREAL, q5:=LREAL)

Store the current values of Q-axes in q1 to q5. The Q-axes are the auxiliary axes.