6.8 Axis Lock


Axis lock can be set by the following signals:

sts.state3.bXRotLocked

sts.state3.bYRotLocked

sts.state3.bZRotLocked

sts.state3.bARotLocked

sts.state3.bBRotLocked

sts.state3.bCRotLocked


When the axis is in the locked state, the system will warn you if you try to move the axis. For example, if the C axis is locked, ie, sts.state3.bCRotLocked = 1, then if the C axis is attempted to move at this time, the system will issue an alarm.


M64 lock C axis and M65 unlocking C axis, Machine manufacture put procedure as below to set axis state; C-axis is taken for example.

case 64: // to lock rotary axis C

if( plc.ncCommand.flag == NC_COMMAND_LOCK_ROTARY_AXIS && plc.ncCommand.finish ) {

 plc.ncCommand.flag = 0;

 plc.mCode.finish = 1;

} else if( plc.ncCommand.flag == 0 ) {

 plc.ncCommand.flag = NC_COMMAND_LOCK_ROTARY_AXIS;

 plc.ncCommand.data.x = NC_TASK_OF_C;

} else

 plc.mCode.finish = 1;

break;

case 65: // to unlock rotary axis C

if( plc.ncCommand.flag == NC_COMMAND_UNLOCK_ROTARY_AXIS && plc.ncCommand.finish ) {

 plc.ncCommand.flag = 0;

 plc.mCode.finish = 1;

} else if( plc.ncCommand.flag == 0 ) {

 plc.ncCommand.flag = NC_COMMAND_UNLOCK_ROTARY_AXIS;

 plc.ncCommand.data.x = NC_TASK_OF_C;

} else

 plc.mCode.finish = 1;

break;