6.7 Axis Position Tracing When Position Loop Is Open


In the following conditions, Some axial will be in open state due to servo close loop open.

1. Servo alarm

2. Over travel


If you want to continue to use, you need to servo close loop close after do homing, to obtain the correct position. INCON-M84/M86/M86R controller added axis position tracing when position loop is open function. In this mode, after servo position loop was open, the system will still track the mechanical position by the encoder to ensure the correct position.


So it does not need to do homing when position loop is closed again. The procedure of handle mode application:


The system was defined by two states:

  • CNC state: The servo position loop was close.
  • Handle state: The servo position loop was open.


1.

In plc.h add a new vto point: plc.vto4.bit.toHDL


To control if the servo position loop was opened above the situation, the system should enter the Handle mode or system was open loop state.


When this bit became 1, system was manual handle mode, when this bit was 0, system was open loop state.


2.

In NcCommand of plc.h, add NC_COMMAND_TOGGLE_HANDLE to switch the CNC and hand state of each axis.


Take the Z-axis as an example. If you are in the CNC state and you want to switch to the manual state or switch back to the controlled state and want to switch to the CNC state, you can add the following command line in M4PLC32.CPP.

#define iToggleXServo (riseGdi3.bit.bit02)             ; define buttons on machine panel


if( iToggleXServo ) {

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

 plc.ncCommand.flag = NC_COMMAND_TOGGLE_HANDLE;       ; start the first time

 plc.ncCommand.data.x = NC_TASK_OF_z;                 ; toggle switch to handle state

}

} else if( (plc.ncCommand.flag&0xff) == NC_COMMAND_TOGGLE_HANDLE &&

plc.ncCommand.finish ) {                               ; switch back to CNC state

plc.ncCommand.flag = 0;

}