PLC Subroutines Manual
4
6FC5397-0FP40-0BA0, 08/2013
3.27
Subroutine 54 - Turret2_3_ToolDir (tool change direction) ......................................................................... 57
3.28
Subroutine 55 - Tail_stock_T (Tailstcok control program for turning machines) ......................................... 59
3.29
Subroutine 56 - Lock_unlock_T (clamping control for turning machines) .................................................... 59
3.30
Subroutine 58 (MM_MAIN) ......................................................................................................................... 61
3.31
Subroutine 59 (MM_MCP_808D) ................................................................................................................ 63
3.32
Subroutine 60 - Disk_MGZ_M (disk-style tool magazine for milling) ........................................................... 64
3.33
Subroutines 34 to 36, 57, 61 and 62 ........................................................................................................... 66
3.34
Subroutine 63 - TOGGLES ......................................................................................................................... 66
4
Use of user alarms in the PLC subroutines .............................................................................................................67
5
PLC sample applications .......................................................................................................................................68
5.1
PLC sample application (turning) ................................................................................................................ 68
5.2
PLC sample application (milling) ................................................................................................................ 71
Index ....................................................................................................................................................................74
1
Overview
The PLC subroutines consist of three project files:
●
default_turning.ptp (sample application for turning machines)
●
default_milling.ptp (sample application for milling machines)
●
default_ManMachPlus_T.ptp (sample application for Manual Machine Plus)
With the sample applications, you can get a good understanding about how to create or call a PLC subroutine. You can
realize most machine functions by re-organizing the PLC subroutines or modifying some must networks.
WARNING
Make sure that you perform a complete machine test to all subroutines used in your main program, in order to verify that all
the subroutines called by the main program function as you desire. Failure to observe may cause personal injury or
property damage.
System resource distribution
The system resources can be distributed into three parts:
●
PLC system
–
Inputs
I0.0 to I2.7 (24 inputs of the SINUMERIK 808D ADVANCED)
I3.0 to I8.7 (distributed 48 inputs)
–
Outputs
Q0.0 to Q1.7 (16 outputs of the SINUMERIK 808D ADVANCED)
Q2.0 to Q5.7 (distributed 32 outputs)
–
Memory
M0.0 to M255.7 (256 bytes)
–
Non-volatile memory
DB1400.DBX0.0 to DB1400.DBX127.7 (128 bytes)
–
PLC user alarms:
DB1600.DBX0.0 to DB1600.DBX15.7 (128 user alarms)
–
Timer
T0 to T15 (100ms timer)