Commissioning Manual
192 01/2017
Subroutine 54 - Turret2_3_ToolDir (tool change direction)
Purpose
Subroutine 54 is used to find out the direction of searching for an adjacent tool and the pre-indexing position (this is, the
previous position of the desired tool in the direction of an adjacent tool). To find out the direction, you need to know the max.
tool number of the turret and the programmed tool number.
You can use this subroutine to control the turret to search for an adjacent tool on a turning machine or a machine centre.
The turret tool position ranges from 2 to 64.
For example:
Local variable definition
Inputs
Possible positions of the turret
P_INDXo DWORD Pre-indexing position: the previous tool position of the desired tool in the direction of
DIR BOOL Direction for tool change
1: for turret CW; 0: for turret CCW
Assigned global variables
None
Relevant PLC machine data
None
Example for calling subroutine 54
This subroutine is called by subroutine 52 and subroutine 53.