Commissioning Manual
226 6FC5397-4EP10-0BA8, 07/2018
Commissioning the turret/magazine
8.1
PLC subroutines for tool change
The following PLC subroutines are provided for the turret/magazine control on a turning or milling machine.
SBR 51 Turret1_HED_T HED turret control for turning ma-
chine
Subroutine 51 - Turret1_HED_T (turret with Hall
effect device position sensor) (Page 164)
SBR 52 Turret2_BIN_T Bi-direction turret (binary coded)
control for turning machine
Subroutine 52 - Turret2_BIN_T (turret with binary
coding function) (Page 166)
SBR 53 Turret3_CODE_T Bi-direction turret (coded by turret
supplier) control for turning ma-
Subroutine 53 - Turret3_CODE_T (tool change
control for turret with coding function) (Page 168)
SBR 60 Disk_MGZ_M Disk tool magazine control for
Subroutine 60 - Disk_MGZ_M (disk-style tool
magazine used for milling) (Page 175)
Calling cycles for tool change
You can call a user cycle with "M" or "T" code to perform the tool change operations.
Note
An "M" code and a "T" code for calling user cycles must not
be in the same program block.
The following examples are given for the tool change on a milling machine.
Calling a tool change cycle with "M6"
Configure the parameters shown in the table below to activate an M code for calling a standard cycle:
Activating tool parameters with an M code
The M code for activating tool parameters
Calling the standard cycle with M6
Name of the standard cycle
For the format of a standard cycle, refer to the example below:
;>>> Name of user cycle <<<
;>>> Path of user cycle <<<
;>>> Definition of user cycle <<<
;No tool change in "program test"
IF $P_SEARCH<>0 GOTOF _END
;No tool change in "program search"
IF $P_TOOLNO==$P_TOOLP GOTOF _NO
;No tool change if programmed tool ($P_TOOLP) =
currently active tool ($P_TOOLNO)
;Work offset and tool offset OFF
;Approach fixed point (tool change position) in Z
SPOS=$MN_USER_DATA_FLOAT[0]
;Spindle exact stop position is stored in
MD14514[0]
MSG("Ready to change tool *** Original tool num-
ber: T"<<$P_TOOLNO)
;A maximum of 127 characters can be displayed
;>>> User-defined M codes can be used to start the PLC logic for tool change after spindle position-
ing
;>>> PLC sets signal "Read-in disable" (DB3200.DBX6.1) to stop this standard cycle
;>>> PLC controls the action of tool magazine and turret
;>>> After the tool change, PLC resets signal "Read-in disable" to resume the cycle
;Activate tool parameters
;G153 suppresses work offset including base frame,
non-modal
MSG("Start to change tool *** New tool number: