6.31 Position Tracking and Compensation


This function starts, stops, and sets the position tracking compensation function of a certain axis or multiple axes by the PLC through NC_COMMAND_POS_TRACK, hereinafter referred to as position tracking.


When position tracking is started on a certain axis, its mechanical position remains unchanged, but the actual position is specified by the PLC "Multiple added compensation position". For example, when the mechanical position at the time is Z axis -30.000 mm, and the current position tracking value is -0.005, the actual Z axis position is Z-30.005, but the mechanical position of the controller is MZ=-30.000.


The PLC can dynamically track the target value with a specified position. In addition, the PLC can also specify that when the tracking value changes, the system changes the maximum position tracking offset of the compensation value, and the PLC can specify the upper limit and lower limit value of the position tracking value. The PLC can also know the current position tracking value. The plc.ncCommand.code setting or NC_COMMAND_POS_CHECK sets the position tracking offset. Among them, plc.ncCommand.attr specifies which axis to set.


plc.ncCommand.data.xplc.ncCommand.data.a specifies the starting number value of the PLC long data. The five PLC long data values ​​starting with this number i constitute the position tracking data group for this axis. If i is 0, it means that this axis stops position tracking.


PLC long data number

Explain

i

The position tracking target value of this axis is in units of su, which is 0.001 mm.

i+1

The amount of change is tracked at the maximum position per msec. This value must be positive.

i+2

Position tracking positive limit, this value must be positive.

i+3

The position tracks the negative limit and this value must be negative.

i+4

Current location tracking value.


The PLC long data i, i+1, i+2 and i+3 are designated by the PLC and dynamically assigned by the PLC according to the position tracking or compensation requirements. i+4 is specified by the NC so that the PLC can know the current actual position tracking value.


When starting, the system automatically clears group i and group i+4 to 0.


case 52://Start position tracking compensation function

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

      plc.ncCommand.flag = 0;

      plc.mCode.finish = 1;

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

      plc.ncCommand.flag = NC_COMMAND_POS_TRACK;

      plc.ncCommand.attr = NC_TASK_OF_Z;

      plc.ncCommand.ata.z = 70;}         // Specify PLC long data 70 as the starting position

break;


PLC long data number

Explain

70

The position tracking target value of this axis is in units of su, which is 0.001 mm.

71

The amount of change is tracked at the maximum position per msec. This value must be positive.

72

Position tracking positive limit, this value must be positive.

73

The position tracks the negative limit and this value must be negative.

74

Current location tracking value.


Precautions for using the location tracking feature:

1.

Each axis of the position tracking function is stopped when it is turned on.

2.

The position tracking function is not provided when the precision feed is enabled.

3.

Care must be taken when planning to use this function for PLC. The position tracking target value and the maximum position tracking variation should not be set too large, resulting in a sudden movement of the machine and causing vibration and damage to the machine.

4.

This function is often used in highly tracked situations, using highly capacitive sensors, sensing height to determine the height position. In addition, dynamic position compensation can be used to compensate for positional offsets that are affected by temperature or other conditions.

5.

Do not use a rotary axis.

6.

When the height tracking function is enabled for the second time after it is turned off, long parameters of other positions cannot be used.