Chapter 3 Before positioning 
 
3- 47 
 
(4) Repeat Step 
• Sets the step to repeat when the operation mode is set as Repeat. 
• The setting range is 1~30 (1~80 for the compact standard/high-end type). 
 
(5) Target Position   
• Sets the movement of the operation of the step. 
• The setting range is -2,147,483,648 ∼ 2,147,483,647 (unit: Pulse). 
• The target position set in operation data setting can be freely changed in the program by changing 
the value of area K for positioning. 
• For the address of area K for positioning of each step number, see 2.2. 
 
(6) M Code 
• M code is for checking the current operation step or carrying out the auxiliary work such as tool 
change, clamp, and drill rotation. 
• In general, the output of M code divides into the ‘With’ mode, when M code is output with the step 
operating, and the ‘After’ mode when M code is output after the step operation is completed. 
For XGB built-in positioning, the standard type has only the After mode, and the advanced type has 
all modes. 
• For example, if M code output mode is set as the After mode, the positioning of the step is 
completed and at the same time, the M code On signal (axis X: K4203(%KX6723), axis Y: K4303 
(%KX6883)) is set and the M code number set in the M code item of the step operation data is 
output in the M code output device (axis X: K428(%KW428), axis Y: K438(%KW438)). 
• M code can be set differently for the operation steps of the positioning operation data. The setting 
range is 1 ~ 65,535. If you don’t want to use M code function for the step, just set it at 0. If you don’t 
want to use M code function for any step, set the M code output mode parameter as NONE. 
• If there is the M code signal, you can reset it by using the M code Off instruction (MOF). 
• If there is the M code signal, the operation differs depending on the current operation pattern. 
(a) End: Stops with M code coming out. For operation of the next operation step, the M code should 
be reset and the operation instruction should be executed. 
(b) Continued: Enters the Stand-by status for operation of the next step with M code coming out. 
For operation of the next operation step, if the M code is reset, the next operation step is 
operated without additional operation instructions. 
(c) Incessant: Does not stop and operates the next operation step although M code comes out. In 
this case, M code Off instruction can be carried out even during operation. 
• For example, the output timing of M code signals in case of After Mode can be illustrated as follows.