PLC Subroutines Manual
40
6FC5397-0FP40-0BA0, 08/2013
Example for calling subroutine 39
3.13
Subroutine 40 - AXIS_CTL (controlling the spindle and axes)
Purpose
Subroutine 40 is used to control the drive pulse enable (DB380xDBX4001.7) and controller enable (DB380xDBX2.1),
monitoring the hardware limits and the reference cam signals, and controlling the enable signal for the spindle according to a
spindle command (for example, SPINDLE CW, SPINDLE CCW, M03, M04, SPOS, etc.). The motor brake is automatically
controlled by the SINAMICS V70 drives.
This subroutine provides two ways to realize the hardware limit control:
●
PLC solution (MD14512 [18] bit 6 = 0)
Each feed axis has one (MD14512 [18] bit 7 = 1) or two (MD14512 [18] bit 7 = 0) hardware limit switches. This
subroutine activates the NCK hardware limit function via the NCK interface DB380xDBX1000.0 or DB380xDBX1000.1
according to the configurations of the hardware limit switches, and thus makes the NCK produce a feed stop signal to an
over-distance axis.
Furthermore, you can also connect the output OVlmt of this subroutine with the input HWL_ON of subroutine 33 to
activate the Emergency Stop automatically once the hardware limit of any axis has been reached.
●
Hardware solution (MD14512 [18] bit 6 = 1)
This solution is independent of the PLC and thus is much safer:
Encoding the hardware limit switches
Result
E_Key
_1LMTp
_2LMTp
_3LMTp
Direction
0
1
1
1
-
EMERGENCY STOP
active
0
0
1
1
DB3900.DBX4.7
1st + over limit
0
0
1
1
DB3900.DBX4.6
1st - over limit
0
0
0
1
DB3901.DBX4.7
2nd + over limit
0
0
0
1
DB3901.DBX4.6
2nd - over limit
0
0
0
0
DB3902.DBX4.7
3rd + over limit
0
0
0
0
DB3902.DBX4.6
3rd - over limit