Académique Documents
Professionnel Documents
Culture Documents
Page: 1 / 59
Contents
CHANGE LOG 4
1. GENERAL DESCRIPTION 4 1.1. Purpose of the library PLC application programs 4 1.2. Pre-condition 5 1.3. Arrangement of symbol table 8 1.4. Arrangement of subroutine library 8 1.5. MCP Interface Description (refer to Chapter 18.2.1 and 18.2.2 in Functional Description) 9 2. 2.1. 2.2. 2.3. 2.4. 2.5. 2.6. 2.7. 2.8. 2.9. 2.10. 2.11. 2.12. 2.13. 2.14. 2.15. 2.16. 2.17. 3. 3.1. 3.2. 3.3. 3.4. 3.5. 3.6. 3.7. 3.8. 3.9. 3.10. 3.11. 3.12. 3.13. ASSIGNMENT OF THE SYMBOL TABLES Symbol table 1 Symbol table 2 Symbol table 3 Symbol table 4 - Symbol table15 Symbol table 16: IS_MCP Symbol table 17: IS_HMI Symbol table 18: IS_AUX Symbol table 19: IS_NCK Symbol table 20: IS_CHA Symbol table 21, 22, 23, 24, 25: IS_AX1, IS_AX2, IS_AX3, IS_AX4, IS_AX5 Symbol table 26: IS_AX_P1 Symbol table 27: MD_PLC Symbol table 28: ALARM Symbol table 29: NV_MEM Symbol table 30: SPC_MEM Symbol table 31: SBR_MEM Symbol table 32: reserved for library program 10 10 11 11 11 11 11 12 12 12 12 12 12 12 13 13 13 13
14 DESCRIPTION OF THE SUBROUTINES LIBRARY Subroutine 32 - PLC_INI (PLC Initializing) 14 Subroutine 33 - EMG_STOP (Emergency Stop) 16 Subroutine 34 - MCP_802D (802D MCP signal transferring) 19 Subroutine 35 - SPD_OVR (Spindle override with toggle keys) 26 Subroutine 37 - MCP_SIMU (MCP simulation) 27 Subroutine 38 - MCP_NCK (MCP signal processing) 27 Subroutine 39 - HANDWHL (Handwheel selection) 28 Subroutine 40 - AXES_CTL (Feed axes and Spindle control ) 29 Subroutine 41 - PLC_AXIS 31 Subroutine 43 - MEAS_JOG (Measuring in JOG mode) 35 Subroutine 44 - COOLING (Coolant control) 36 Subroutine 45 - LUBRICAT (Lubricating control) 37 Subroutine 46 - TURRET1 (Turret with Hall Effect Device position sensor) 38
Page: 2 / 59 All right reserved Date: 11.03.2011
Subroutine 47 - TURRET2 (Control of a turret with binary encoder) Subroutine 48 - TOOL_DIR (Tool change direction) Subroutine 49 - MGZ_INI (Initialization on tool magazine table) Subroutine 50 - MGZ_SRCH (Search tool from magazine) Subroutine 51 - MGZ_RNEW (Refresh magazine table) Subroutine 36, 42 and Subroutine 52 ... 58, 61 62 are reserved for subroutine library 3.19. Subroutine 59 - GRINDING_CTL 3.20. Subroutine 60 - SR_EMG_STOP (Emergency Stop with safety relay) 3.21. Subroutine 63 - TOGGLE 4. PLC USER ALARMS USED IN SUBROUTINE LIBRARY
40 42 42 44 44 45 45 46 48 49 50 50 52 54
5. SAMPLE PLC APPLICATION PROGRAMS 5.1. PLC Application Program for simulation 5.2. Sample PLC Application Program for a Turning Machine 5.3. Sample PLC Application Program for a Milling Machine 6. 6.1. 6.2. 6.3. 6.4. 6.5 APPLICATION EXAMPLES FOR SAFETY RELAY AND CONTROL LINE CONTACTOR General Line Modules or Smart Line Modules with DRIVE CLiQ interface Smart Line Modules without DRIVE CLiQ interface Application example for safety relay and control line contactor using Active Line Module / Smart Line Module with DRIVE-CLIQ Application example for safety relay and control line contactor using Smart Line Module without DRIVE-CLiQ
56 56 57 57 58 59
Page: 3 / 59
Change Log
The information is in the readme.txt file in the toolbox path.
1.
General Description
SINUMERIK 802D sl is a compact numerical control system, ideally suited for turning, milling, grinding and nibbling machines. To adapt the SINUMERIK 802D to machine tools, machine control logic must be designed with the PLC Programming Tool. The tool used is Programming Tool PLC802 Version 3.1 or higher. This document describes the PLC Subroutine Library V02.00.00 which is designed for Machine Tool Builders who have basic knowledge of CNC and PLC functioning and programming. Please, refer to following documents for more detailed information on 802D sl: SINUMERIK 802D sl Operating instructions SINUMERIK 802D sl Function description SINAMICS S120 documents
1.1.
In project file SUBR_LIBRARY.PTP a variety of subroutines are provided for basic functions such as emergency stop control, axes control, coolant control, lubrication control and turret control for turning machines. The project SIMULATION.PTP is an application PLC program for testing your 802D sl without Machine control panel. The other 2 project files can be used as samples to show how to make use of the subroutines in the project file SUBR_LIBRARY.PTP for turning or milling machines. Customers can just download the project files from the Internet and read these samples to understand how a subroutine is programmed and how the subroutine is called. These files can be saved (SUBR_LIBRARY.PTP) in a new project. By organizing the subroutines, modifying or adding the necessary networks most of the machine tool requirements can be met or addressed.
Just download your PLC application program into SINUMERIK 802D sl and test it until all the functions work.
Page: 4 / 59
1.2. Pre-condition
The subroutine library and the sample PLC application programs are designed for standard axis configurations. By downloading one of the initialization files from installed toolbox (path: Toolbox 802D_sl\Version\Techno\Config Siemens), the standard axis configurations can be completed. The file SETUP_T.ARC is for turning machine, the file SETUP_M.ARC is for milling machine, the file SETUP_N.ARC, SETUP_N_MC.ARC is for nibbling machine and the file SETUP_G_C.ARC, SETUP_G_C_INC.ARC is for cylindrical grinding machine. (Further information is in the readme.txt file in the toolbox path.) By downloading the configuration file SETUP_T.ARC from toolbox, the axes configuration can be changed to a turning machine with 2 feed axes and 1 spindle.
Axis number 1st axis 2nd axis 3rd axis Axis Name X1 Z1 SP Axis interface address V3800 xxxx V3801 xxxx V3802 xxxx
By downloading the configuration file SETUP_M.ARC from toolbox, the axes configuration can be changed to a milling machine with 4 feed axes and one spindle:
Axis number 1st axis 2nd axis 3rd axis 4th axis 5th axis Axis Name X1 Y1 Z1 SP A1 Axis interface address V3800 xxxx V3801 xxxx V3802 xxxx V3803 xxxx V3804 xxxx
By downloading the configuration file SETUP_N_MC.ARC from toolbox, the axes configuration can be changed to a nibbling machine with 4 feed axes:
Axis number 1st axis 2nd axis 3rd axis 4th axis 5th axis Axis Name X1 Y1 C1 C2 A1 Axis interface address V3800 xxxx V3801 xxxx V3802 xxxx V3803 xxxx V3804 xxxx
By downloading the configuration file SETUP_G_C.ARC from toolbox, the axes configuration can be changed to a cylindrical grinding machine with 4 feed axes:
Axis number 1st axis 2nd axis 3rd axis 4th axis Axis Name X1 Z1 C1 SP1 Axis interface address V3800 xxxx V3801 xxxx V3802 xxxx V3803 xxxx
To understand the subroutines in the library, the following preconditions must be taken into consideration.
Page: 5 / 59
1.2.2. Resources
1.2.2.1.Resource of PLC Inputs: Outputs: Global Memory: Retentive Memory: User Alarm: Timers: Counters: 1.2.2.2.Resource of NC PLC Machine Data: MD14510 / MD14512 / MD14514 V45000000 V45000062 (32 words) V45001000 V45001032 (32 bytes) V45002000 V45002028 (8 Dword) I0.0 I8.7 (72 inputs on 1st PP module with address 9) I9.0 I17.7 (72 inputs on 2nd PP module with address 8) I18.0 I26.7 (72 inputs on 3rd PP module with address 7) Q0.0 Q5.7 (48 outputs on 1st PP module) Q6.0 Q11.7 (48 outputs on 2nd PP module) Q12.0 Q17.7 (48 outputs on 3rd PP module) M0.0 M383.7 V14000000.0 V14000127.7 (128 bytes) V16000000.0 V16000007.7 (64 user alarms) T0 T15 (100ms timers) T16 T39 (10ms timers) for 802D sl Plus T16 T63 (10ms timers) for 802D sl Pro C0 C31 (32 counters) for 802D sl Plus C0 C63 (32 counters) for 802D sl Pro
MD14510 User Data INT: MD14512 User Data HEX: MD14514 User Data Real: Symbol tables: Subroutines:
1.2.3. Arrangement of resource 1.2.3.1.Resource free for customers Resource of PLC Inputs: Outputs: Global Memory: Retentive Memory: User Alarm: Timers: I0.0 I26.7 (216 inputs) Q0.0 Q17.7 (144 outputs) M0.0 M127.7 and M258.0 M383.7 V14000000.0 V14000063.7 (64 bytes) V16000000.0 V16000001.7 and V16000004.0 V16000007.7 (48 user alarms) T0 T15 (100ms timers) T16 T23 and T32 T39 (10ms timers) for 802D sl Plus T16 T23 and T32 T63 (10ms timers) for 802D sl Pro
Page: 6 / 59
C0 C23 (counters) for 802D sl Plus C0 C23 and C32 C63 (counters) for 802D sl Pro MD14510 / MD14512 / MD14514 V45000000 V45000030 (16 words) V45001000 V45001015 (16 bytes) V45002000 V45002028 (8 Dword)
MD14510 User Data INT: MD14512 User Data HEX: MD14514 User Data Real: Symbol tables: Subroutines:
Resource of Programming Tool SYM1 SYM15 (15 symbol tables) SBR0 SBR31 (32 subroutines)
1.2.3.2.Resource reserved for sample programs Resource of PLC Inputs: Outputs: Global Memory: Retentive Memory: User Alarm: Timers: Counters: Resource of NC PLC Machine Data: MD14510 / MD14512 / MD14514 MD14510 User Data INT: V45000032 V45000062 (16 words) MD14512 User Data HEX: V45001016 V45001031 (16 bytes) MD14514 User Data Real: no Resource of Programming Tool Symbol tables: Subroutines: SYM16 SYM32 (17 symbol tables) SBR32 SBR63 (32 subroutines) M128.0 M255.7 V14000064.0 V14000127.7 (64 bytes) (for machining center, V14000000.0 to V14000040.7 are reserved) V16000002.0 V16000003.7 (16 user alarms) no 100ms timers reserved T16 T31 (10ms timers) C24 C31 (counters)
Page: 7 / 59
1.3.
Name
1.4.
SBR
USR_INI PLC_INI EMG_STOP MCP_802D SPD_OVR MCP_SIMU MCP_NCK HANDWHL AXIS_CTL PLC_AXIS MEAS_JOG COOLING LUBRICAT TURRET1 TURRET2 TOOL_DIR MGZ_INI MGZ_SRCH MGZ_RNEW GRINDING_CTL EMG_STOP_SR TOGGLE
Subroutine description
Free for customer application Reserved for user initializing (called by SBR32 PLC_INI) Initialization of the control Emergency Stop (including drive power on and power off sequence) Transfer I/O of 802D MCP to interfaceV1000xxxx and V1100xxxx Spindle override code generator (gray code) to interface V1000 0008 Reserved Simulating override switches and acknowledging the active signals MCP_HMI signal (from V1000 000x) to NCK Handwheel(s) for axis (MCS and WCS) selected from PLC Enable control for 4 Feed Axis and spindle Control (hardware limit switch, and brake release if necessary) PLC axis control Reserved Measuring in Jog Coolant control Lubrication control (interval and time) Turret control 1 (Hall effect device sensor turret with 4 or 6 positions) Turret control 2 (Turret with binary encoder) Make out the direction of tool change Initialization of holder table of tool magazine (max. 40 tools) Search holder position of programmed tool from magazine Refresh holder table Reserved for library PLC application programs Grinding control Emergency Stop with safety relay Reserved for library PLC application programs Toggle switch K1 ~ K6; Delay Switch K7, K8
Page: 8 / 59
1.5.
MCP Interface Description (refer to Chapter 18.2.1 and 18.2.2 in Functional Description)
1000
Byte 10000000 Bit 7 NCSTOP NCSpindle START CW Feed START STOP RESET Bit 6 Bit 5
Spindle function Spindle Spindle STOP CCW ProtecVar. INC tion level 4 Protection level 6 5 E
Axis Traverse keys th th 4 Axis 4 Axis Rapid + overlay free free CK6 3 Axis Free customer free free
rd
CK4 CK3 CK2 CK1 Axis Traverse keys nd nd st st 2 Axis 2 Axis 1 Axis 1 Axis + + Free customer keys free free free
Free customer keys free 0 free 0 free 0 free free free C free B free A
10000008
Spindle Override E D
1100
Byte 11000000 Bit 7 NCSTOP NCSpindle START CW Feed START STOP free free Bit 6 Bit 5
INC1000 free
free
free
Axis Traverse keys th th 4 Axis 4 Axis Rapid + overlay free free free 3 Axis Free customer keys free free Free free CLED6
rd
CLED4 CLED3 CLED2 CLED1 Axis Traverse keys nd nd st st 2 Axis 2 Axis 1 Axis 1 Axis + + Free customer keys free free free free free free
Page: 9 / 59
2.
2.1.
Symbol table 1
For 1st PP module With this symbol table, all the physical inputs and outputs of PP module can be defined by the customers according to their specific application.
Module name, the number of socket and pin are indicated here. Customer can also add the wire label of I0.0 after colon.
Page: 10 / 59
2.2.
Symbol table 2
For 2nd PP module With this symbol table, all the physical inputs and outputs of PP module can be defined by the customers according to their specific application.
2.3.
Symbol table 3
For 3rd PP module With this symbol table, all the physical inputs and outputs of PP module can be defined by the customers according to their specific application.
2.4.
CAUTION If the color of your symbol is changes automatically to RED, the symbol is not accepted the programming tool. Check if special character is used or if leading character is a digit. CAUTION If a waved underscore appears under your symbol, the symbol is duplicated. Check duplicate name or address.
!
2.5.
2.6.
Page: 11 / 59
2.7.
2.8.
2.9.
2.10. Symbol table 21, 22, 23, 24, 25: IS_AX1, IS_AX2, IS_AX3, IS_AX4, IS_AX5
Interface Signals to and from NCK are listed in this symbol table, i.e. V380x xxxx: Axis control signals to NCK (read/write) V390x xxxx: Axis control signals from NCK (read only)
Page: 12 / 59
Page: 13 / 59
3.
MD14510[22] - Turret clamping time (unit: 0.01s) MD14510[24] - Lubrication interval (unit: 1min) MD14510[25] - Lubrication duration (unit: 0.01s)
USER_DATA_HEX:
MD14512[16] Axis configuration (in case MD14510[16]=0) Bit 0 - 1st axis is configured. Bit 1 - 2nd axis is configured Bit 2 - 3rd axis is configured Bit 3 - 4th axis is configured Bit 4 - 5th axis is configured special configuration of the machine tool Bit 0 - Spindle without override switch Bit 1 - Drive Optimization (Reserved for 802D sl) Bit 2 - Lubrication at first power on Bit 3 - When 802D MCP used, User Key1 is Feed Enable toggle key Bit 4 - External spindle stop signal Bit 5 fixed spindle direction Bit 6 - Hardware limits independent from PLC Bit 7 - Only one hardware limit switch for each axis (with Bit6=0) Bit 0 = 0 Spindle key CW and CCW work as momentary trigger mode Bit 0 = 1 Spindle key CW and CCW work as continuous trigger mode
MD14512[18]
MD14512[19]
3.1.
Page: 14 / 59
And also the Machine Data MD14512[18] Bit0 will be evaluated in the program to determine whether the spindle override switch is installed. At end of Subroutine 32, Subroutine 31: USR_INI is called. The initialization of customer PLC project should be programmed in this subroutine. 3.1.2. Local Variable Definition no local variable defined 3.1.3. Global Memory occupied 24 bytes are defined in the retentive data area and are assigned in this subroutine with gray code values for applications of rotary gray code switches to select axis, operation mode etc. See symbol table SYM29 (NV_MEM), from VB14000101 ~ VB14000124. 3.1.4. Corresponding PLC Machine Data One WORD PLC machine data is defined for the machine type.
MD14510[16] - Machine type 0: not defined (Initializing according to MD14512[16]) 1: Turning machine 2: Milling machine 21: Cylindrical grinding machine 22: Surface grinding machine 31: Nibbling machine with mechanical coupled punching die 32: Nibbling with servo axis coupled punching die MD14510[17] 1: Plc axis one MD14510[18] 1: Plc axis two MD14510[19] 1: Plc axis three
MD14512[16]
Axis configuration (in case MD14510[16]=0) Bit 0 - 1st axis is configured. Bit 1 - 2nd axis is configured Bit 2 - 3rd axis is configured Bit 3 - 4th axis is configured Bit 4 - 5th axis is configured Special configuration of the machine tool Bit 0 - Spindle without override switch Bit 1 - Drive optimization Bit 2 - Lubrication at first power on Bit 3 - When 802D or MCP 802D sl used, user key 1 is Feed Enable toggle key Bit 4 - External spindle stop signal Bit 6 - Hardware limits independent from PLC Bit 7 - Only one hardware limit switch for each axis (with Bit 6 = 0) Bit 0 = 0 Spindle key CW and CCW work as momentary trigger mode Bit 1 = 1 Spindle key CW and CCW work as continuous trigger mode Page: 15 / 59 All right reserved Date: 11.03.2011
MD14512[18]
MD14512[19]
3.2.
CAUTION Please check whether this subroutine complies with all the relevant safety requirements.
3.2.1. Purpose of Subroutine 33 This subroutine handles the emergency stop sequence, as well as the power on and off sequence of the drive SINAMICS S120. For detailed information about drive SINAMICS S120, please refer to SINAMICS S120 documents. General time flow
Page: 16 / 59
The precondition of this subroutine is that the standard configuration of turning and milling machine are used. When the enable on the drive is off, i.e. when Terminal X20.2 of PCU (OFF3 of axis) is reset to zero, axes and spindle are braking to standstill. This subroutine evaluates a feedback signal from V390X0001.4 n<nmin, or an external spindle stop signal (e.g. an analog spindle without encoder) according to MD14510[16]. MD14510[16]=0 means non standard configuration. In this case an external spindle stop signal (for example, zero speed signal from a frequency converter) must be connected to the subroutine to detect a spindle zero speed. Drive Enable and Disable signal come from User Data area V1000 xxxx. 1 alarms may be activated from this subroutine: Alarm 700016 DRIVE NOT READY Feed Stop to channel will be activated by any alarms from the subroutine library. The cancellation Feed Stop is RESET after alarm condition is cleared. Important ! For machine tools with neither digital nor analog spindle used, the PLC machine data should be specified like following table. Otherwise the emergency can not be released.
For turning machine
MD14510[16]=0 MD14512[16] Bit 0 = 1 Bit 1 = 1
By Emergency Stop, spindle standstill signal from NCK will be evaluated before disable the drive system to make sure that spindle can be stopped if PLC machine data MD14510[16] = 1 or 2 (i.e. by turning or milling machine tools). If MD14510[16]=0, this external signal will then be evaluated . NO Normal Open; BOOL BOOL BOOL NC Normal Close To Terminal X21.3 of Line module (NO): Enable pulses To Terminal X20.1 of PCU (NO): For 5KW and 10KW SLM: Infeed operation; for other LMs: ON/OFF1 To Terminal X20.2 of PCU (NO): OFF3 of the axis Status of Terminal EP (X21.3) of the line module Status of Terminal OFF1 (X20.1 of PCU) Status of Terminal OFF3 (X20.2 of PCU) Page: 17 / 59 All right reserved Date: 11.03.2011
3)
Outputs:
T_EP_LM T_OFF1 T_OFF3 T_EP_LMm T_OFF1m T_OFF3m SINUMERIK 802D sl PLC Subroutine library M130.0 M130.1 M130.2
Delay for Terminal OFF3 (X20.2 of the PCU) before verify ready signal Spindle comes to standstill Power Up procedure ended Delay from Terminal OFF3 is off until Terminal OFF1 off Delay from Terminal OFF1 is off until Terminal EP off Delay after Power On Delay from Terminal EP is on until Terminal OFF1 on
3.2.4. Corresponding PLC Machine Data MD14510[16] Machine type is evaluated in this subroutine 3.2.5. Sample of Subroutine Call
Network 2 ONE Emergency Control EMG_STOP EN 50 I0.0 I0.1 Q0.7 I0.4 T_EP_LM DELAY E_KEY T_OFF1 T_RDY_LM T_OFF3 HWL_ON SpStop Q0.0 Q0.1 Q0.2
Page: 18 / 59
3.3.
3.3.1. Purpose of Subroutine 34 Subroutine 34 transferring the input signals from 802D MCP to interface area for further processing. By using SINUMERIK 802D sl the MCP 802D is connected via I/Os from the PP-module. The key layout is shown in the figure below and the key assignment can be found in the following table: MCP 802D X1201
Pin
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49
Signal
M Im+0.0 Im+0.2 Im+0.4 Im+0.6 Im+1.0 Im+1.2 Im+1.4 Im+1.6 Im+2.0 Im+2.2 Im+2.4 Im+2.6
Type
Output Input Input Input Input Input Input Input Input Input Input Input Input not connected not connected Output Output Output Output Output Output Output Output Input Input
Description
GND #1 #3 #5 #7 #9 #11 #13 #15 #17 #19 #21 #23
Pin
2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50
Signal
L+ Im+0.1 Im+0.3 Im+0.5 Im+0.7 Im+1.1 Im+1.3 Im+1.5 Im+1.7 Im+2.1 Im+2.3 Im+2.5 Im+2.7
Type
Output Input Input Input Input Input Input Input Input Input Input Input Input not connected not connected Output Output Output Output Output Output Output Output Input Input
Description
+24V #2 #4 #6 #8 #10 #12 #14 #16 #18 #20 #22 #24
On+0.0 On+0.2 On+0.4 On+0.6 On+1.0 On+1.2 On+1.4 On+1.6 DOCOM1 DOCOM1
24VDC 24VDC
On+0.1 On+0.3 On+0.5 On+0.7 On+1.1 On+1.3 On+1.5 On+1.7 DOCOM1 DOCOM1
24VDC 24VDC
X1202
Pin
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49
Signal
M Im+3.0 Im+3.2 Im+3.4 Im+3.6 Im+4.0 Im+4.2 Im+4.4 Im+4.6 Im+5.0 Im+5.2 Im+5.4 Im+5.6
Type
Output Input Input Input Input Input Input Input Input Input Input Input Input not connected not connected Output Output Output Output Output Output Output Output Input Input
Description
GND #25 #27
Pin
2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50
Signal
L+ Im+3.1 Im+3.3 Im+3.5 Im+3.7 Im+4.1 Im+4.3 Im+4.5 Im+4.7 Im+5.1 Im+5.3 Im+5.5 Im+5.7
Type
Output Input Input Input Input Input Input Input Input Input Input Input Input not connected not connected Output Output Output Output Output Output Output Output Input Input
Description
+24V #26
Feed_OV_B Feed_OV_D
Sp_OV_B Sp_OV_D
On+2.0 On+2.2 On+2.4 On+2.6 On+3.0 On+3.2 On+3.4 On+3.6 DOCOM2 DOCOM2
24VDC 24VDC
On+2.1 On+2.3 On+2.5 On+2.7 On+3.1 On+3.3 On+3.5 On+3.7 DOCOM2 DOCOM2
24VDC 24VDC
Page: 19 / 59
For SINUMERIK 802D sl, you put preferably the MCP 802D sl via MCPA module. MCP 802D sl Signals from MCP 802D sl
1000 1 xxx
Byte 10001000 10001001 10001002 10001003 10001004 E 10001005 E Bit 7 Key 8 JOG Key 16 4th axis Key 24 4th axis + Bit 6 Key 7 Var. INC Key 15 Spindle CCW Key 23 1st axis Bit 5 Key 6 User key 6 Key 14 Spindle STOP Key 22 2nd axis -
Further information about the hardware components can be found in the SINUMERIK 802D sl Start-up guide/ Operating instructions.
Page: 20 / 59
In this subroutine the physical inputs of axis traverse keys are transferred to the logic address in the interface (V1000 xxxx). Key cross may be different according to variety of machine tool structure. In this subroutine only 5 different key crosses are available.
Layout of MCP 802D or MCP 802D sl
L1 #1 L4 #4
L2 #2 L5 #5
L3 #3 L6 #6
#7
#8
#9
[.]
#10 #11 #12 #13 #14 #15
#16
#17
#18 % #21
+X
#19 #20 #23
-Z
#22
+Z
#24
-X
#25 #26 #27 %
+X
#19 #20 #23 #21 #19
-X
#20 #23 #21
-Z
#22
+Z
#24
-Z
#22
+Z
#24
-X
For vertical milling machine
#16 #17 #18
+X
For knee-type milling machine
#16 #17 #18
+4th +Z +Y
#19 #20 #23 #21
+4th -Z
#19 #20 #23
-Y
#21
-X
#22
+X
#24
th - Z -4
+X
#22
-X
#24
th +Z -4
-Y
+Y
Note: In this subroutine the feed override signals of 802D MCP are checked to be sure that MCP is available. Otherwise an alarm will be triggered. Alarm 700024 802D MACHINE CONTROL PANEL DEFECT
Page: 21 / 59
PB_1
BYTE
PB_2
BYTE
PB_3
BYTE
I_En Xcross
BOOL WORD
Page: 22 / 59
Key number
#16 #17 #18 #19 #20 #21 #22 #23 #24
Local Var.
L1.7 L2.0 L2.1 L2.2 L2.3 L2.4 L2.5 L2.6 L2.7
Xcross =1
+X -Z Rapid +Z -X
Xcross =2
-X -Z Rapid +Z +X
Xcross =3
+4 +Z +Y -X Rapid +X -Y -Z th -4
th
Xcross =4
+4 -Z -Y +X Rapid -X +Y +Z th -4
th
Outputs: send out the signals from User Data to V1100 xxxx signal for User Keys to
LEDs BYTE Output for L1 to L6 MCP L10.0: CLED1: L10.1: CLED2: L10.2: CLED3: L10.3: CLED4 L10.4: CLED5 L10.5: CLED6
If other traverse key cross is required than those in previous samples, than use the configuration Xcross=5 (variable key arrangement).
Variable key arrangement
#16 #17 #18
#19 #22
#20 #23
#21 #24
Key number
#16 #17 #18 #19 #20 #21 #22 #23 #24
Parameter MCP_802D
PB_1 Bit 7 PB_2 Bit 0 PB_2 Bit 1 PB_2 Bit 2 PB_2 Bit 3 PB_2 Bit 4 PB_2 Bit 5 PB_2 Bit 6 PB_2 Bit 7
Xcross =5
+4. axis -4. axis +1. axis -1. axis Rapid +2. axis -2. axis +3. axis -3. axis
MCP_802D
IBx
MBx
MB10 MB11
PB_1
IB(x+1)
MB(x+1)
PB_2
Manufactures can connect their physical I/O addresses in such way that they get their required Xcross by adding some networks for converting. The Xcross configuration will be realized by bit wise connection between Ibx (IBx+1) and MBx (MBx+1) and be transferred to PB_1 Bit7 and PB_2. This program part is written by the customer.
Page: 23 / 59
The absolute address is in accordance with the interface port on PP or MCPA module. Example:
#16 #17 #18
+Z
#19
+Y
#20 #23
+X
#21
-A
#22
+A
#24
-X
-Y
-Z
Key number
#16 #17 #18 #19 #20 #21 #22 #23 #24
MB10 MB11
M11.6 M11.4 M11.1 M11.0 M11.3 M10.7 M11.2 M11.5 M11.7
Parameter MCP_802D
PB_1 Bit 7 PB_2 Bit 0 PB_2 Bit 1 PB_2 Bit 2 PB_2 Bit 3 PB_2 Bit 4 PB_2 Bit 5 PB_2 Bit 6 PB_2 Bit 7
Xcross =5
+4. axis - 4. axis +1. axis - 1. axis Rapid +2. axis - 2. axis +3. axis - 3. axis
MCP_802D
IBx
MBx
MB10 MB11
PB_1
PB_2
IB(x+1) MB(x+1)
In above example MB10 and MB11 are used, which represent the keys for MCP_802D. 3.3.3. Global Memory occupied Two Bytes are used in this subroutine for toggle keys as Single Block and Feed Enable:
MB 133 MB 134
3.3.4. Corresponding PLC Machine Data While there are no feed enable and feed disable keys on 802D MCP, two possibilities are provided by this subroutine, either using User Key 1 as toggle switch for feed enable and disable or using external key via an input to PP module. Therefore one PLC machine data bit is defined in MD14512[18] for this special requirement:
If MD14512[18] bit 3=1 If MD14512[18] bit 3=0 Customer Key 1 on 802D MCP is used as toggle key for Feed Enable or disable An external key can be connect to the subroutine. The key should be with holding signal, i.e. 1 feed enable; 0 feed disable.
Page: 24 / 59
LEDs
QB2
IB7
IB8 ONE ONE MD_INT_16
Page: 25 / 59
3.4.
3.4.1. Purpose of Subroutine 35 The purpose of this subroutine is to provide an alternative way to change spindle override value using toggle keys instead of using rotary gray code switch. Some customers would like to simplify their design of their own MCPs, using 3 toggle keys for spindle override to increase or decrease the override value of the spindle and with a toggle key to get override of 100%. The generated spindle override code is output to MCP interface VB10000008. If Gcode=1, the gray code override is selected in steps of 1 not depending on the value of STEPi. For gray coding, 15 codes are available corresponding to the 15 positions of a rotary switch. If Gcode=0, binary override code will be generated. If binary code is selected for spindle, one machine data must be set: MD12060 OVR_SPIND_IS_GRAY_CODE = 0 (0: Binary code; 1: Gray code) 3.4.2. Local Variable Definition Inputs:
STEPi Gcode OVinc OVdec OV100 WORD BOOL BOOL BYTE BYTE Step for increasing or decreasing the override value with the range from 1 to 10 for binary code 1 - gray code override is selected; 0 binary code; toggle key for override increasing toggle key for override decreasing toggle key for override 100%
3.4.4. Corresponding PLC Machine Data no PLC machine defined 3.4.5. Sample of Subroutine Call
Network 4 ONE EN 10 ZERO I2.1 I2.2 I2.0 STEPi Gcode OVinc OVdec OV100 Spindle override using toggle keys SPD_OVR
Page: 26 / 59
3.5.
3.5.1. Purpose of Subroutine 37 The purpose of this subroutine is to provide a way to operate the 802D without MCP. With the help of Status Chart of Micro/WIN, most of the MCP functions, such as selection of operating mode or reference point approach, NC start, stop etc., can be simulated. The application of this subroutine can be found in chapter 5.1. 3.5.2. Local Variable Definition no local variable is used in the subroutine 3.5.3. Global Memory used
SIM_CAM1 SIM_CAM2 SIM_CAM3 SIM_T63 SIM_T64 FOV_P FOV100 FOV_N SOV_P SOV100 SOV_N SIM_INC FOV_POS SOV_POS M249.0 M249.1 M249.2 M249.3 M249.4 M250.0 M250.1 M250.2 M250.3 M250.4 M250.5 M250.7 C25 C26 Reference CAM axis 1 for simulation Reference CAM axis 2 for simulation Reference CAM axis 3 for simulation for simulation of terminal 63 of drive for simulation of terminal 64 of drive Feed override increment Feed override 100% Feed override decrement Spindle override increment Spindle override 100% Spindle override decrement Increment selection simulating feed rate override switch simulating spindle override switch
3.5.4. Corresponding PLC Machine Data no machine data defined 3.5.5. Sample of Subroutine Call
Network 12 ONE EN Transfer 802D sl MCP signals to interface area V1000 MCP_SIMU
3.6.
3.6.1. Purpose of Subroutine 38 The purpose of this subroutine is to transfer MCP signals in the interface V1000xxxx to NCK interface to activate operation mode and control sequences. The main functions in the subroutine are: - Selection of operation mode - Selection of increment - HMI signals to NCK channel interface - AXIS traversing signal to NCK axis interface with condition of no exceeding any hardware limits.
SINUMERIK 802D sl PLC Subroutine library Page: 27 / 59 All right reserved Date: 11.03.2011
3.6.2. Local Variable Definition no local variable is used in the subroutine 3.6.3. Global Memory occupied no global memory used. 3.6.4. Corresponding PLC Machine Data MD14510[16] Machine data is used to decide the axis number for traversing. For example, if a turning machine is selected, the Z axis is the second axis and spindle is third, therefore the signal of traverse key of Z axis on the MCP should be sent to 2nd axis interface and spindle to 3rd axis interface. 3.6.5. Sample of Subroutine Call
Network 4 ONE EN Processing MCP signals from V1000 and activating corresponding functions MCP_NCK
3.7.
3.7.1. Purpose of Subroutine 39 The purpose of this subroutine is to select handwheel in MCS or WCS according HMI interface V1900 1xxx. 3.7.2. Local Variable Definition no local variables are defined 3.7.3. Global Memory occupied no memory used 3.7.4. Corresponding PLC Machine Data MD14510[16] Machine type is evaluated in this subroutine 3.7.5. Sample of Subroutine Call
Network 5 ONE EN Selection handwheel according interface area V1900 1xxx HANDWHL
Page: 28 / 59
3.8.
3.8.1. Purpose of Subroutine 40 The purpose of this subroutine is to control the interface signals of Impulse enable V380x4001.7 and controller enable (V380x0002.1), to monitor hardware limits and reference cam signals of all axes. For spindle, the enable signal will be activated by any of the spindle command, like Spindle CW and CCW, M03, M04, SPOS. Motor brake will be released with the condition that no emergency stop and position controller is active. Two different ways are provided by the subroutine for hardware limit control. One is PLC solution (MD14512[18] bit 6=0) and the other is hardware solution (MD14512[18] bit 6=1). By PLC solution, the hardware limit signals, either 2 hardware limit switches (MD14512[18] bit 7=0) or only one hardware limit switch (MD14512[18] bit 7=1) can be configured for each axis. These signals will be sent to NCK interface V380x1000.0 or V380x1000.1 and a feed stop will be generated by NCK according to these interface signals. It is also possible to trigger a EMERGENCY STOP by connecting the output signal OVlmt (subroutine parameter) to the input parameter HWL_ON of subroutine 33 EMG_STOP. The hardware solution is actually PLC independent for more safety, see the figure below:
24Vdc 3
Release button
rd
axis limit
Input
_3LMTp
E_Key 0 0 0 0 0 0 0
Encoding of HW limit switch _1LMTp _2LMTp _3LMTp Direction 1 1 1 0 1 1 V39000004.7 0 1 1 V39000004.6 0 0 1 V39010004.7 0 0 1 V39010004.6 0 0 0 V39020004.7 0 0 0 V39020004.6
Hardware limit Reached Only Emg. Stop 1st + over limit 1st - over limit 2nd + over limit 2nd - over limit 3rd + over limit 3rd - over limit
Note: In case of EMERGENCY STOP or any of the hardware limits are reached, Terminal X20.2 of PCU and DC 24V+ are disconnected by hardware. DC 24V +
KA1
Terminal X20.2 of PCU: OFF 3 of axis
KA1
With above solution, the feed stop of all axes (i.e. disable OFF3 of axis by disconnecting Terminal X20.2 of PCU and DC 24V+ via a relay) will be activated by any active hardware limit switches or Emergency Stop button by means of hardware. The Inputs signals to PLC shown in above figure are for diagnosis purpose and to provide more
Page: 29 / 59
information for PLC, e.g. the feed stop of axis is caused by either Emergency Stop button or by one of hardware limit switches. Note: Some precondition should be considered when this solution is used:
a) The axes should be configured one next to the other, e.g. X, Z, spindle or X, Y, Z, spindle; This subroutine does not support the configuration like X, Y, Spindle, Z; b) The inputs to the subroutine for hardware limit of unused axis should be assigned with SM0.0. Otherwise the hardware limit can not be detected.
Outputs:
_1BRK _2BRK _3BRK OVlmt
Brake release output for 1st axis (Reserved for 802D sl) Brake release output for 2nd axis (Reserved for 802D sl) Brake release output for 3rd axis (Reserved for 802D sl) Over limit output (any of HW limit is active, also high effective)
If only one HW limit switch (with 2 cams) is installed on the machine tool for each axis, the local variable for positive limit switch is used for this switch signal. In the PLC program the traversing direction is evaluated to decide the over limit direction. 3.8.3. Global Memory occupied
SP_CMD M138.1 Spindle start command (CW or CCW)
Page: 30 / 59
MD14512[16] axes configuration (valid only if MD14510[16]=0) Bit 0 1: 1st axis is selected Bit 1 1: 2nd axis is selected Bit 2 1: 3rd axis is selected Bit 3 1: 4th axis is selected Bit 4 1: 5th axis is selected MD14512[18] MD14512[18] MD14512[18] Bit 6 1: Hardware solution for over limit monitoring; 0: PLC solution with the condition defined by: Bit 7 1: only one hardware limit switch for each axis or 0: 2 hardware limit switches for both directions of an axis; Bit 1 1: Switch #OPTM for brake release by drive optimization; 0: Switch #OPTM is not valid. (Reserved for 802D sl)
Note: The motor brake control for SINUMERIK 802D sl: The motor brake is controlled by SINAMICS drive. 3.8.5. Sample of Subroutine Call
Network 6 ONE EN 0 Q0.2 Q0.1 ZERO I0.1 I0.2 I0.7 I0.4 I0.5 I1.0 I0.5 I0.6 I1.1 ZERO ZERO NODEF T_OFF3 T_OFF1 OPTM _1LMTp _1LMTn _1REF _2LMTp _2LMTn _2REF _3LMTp _3LMTn _3REF _4REF _5REF _1BRK _2BRK _3BRK OVlmt NULL_b NULL_b NULL_b NULL_b Axes control for X(1 axis), Y(2 AXIS_CTL
st nd
axis), Z(3
rd
3.9.
Subroutine 41 - PLC_AXIS
3.9.1. Purpose of Subroutine 41 The control is able to work with three PLC axes from total six axes. The PLC axes can be the 6th, 5th, 4th axis of 802D sl depending the used technology. Available are for technology - Turning maximal three PLC axes - Milling maximal two PLC axes - Grinding maximal two PLC axes - Nibbling two PLC axes for nibbling machine with servo axis coupled punching die. - Three PLC axes for nibbling machine with mechanical coupled punching die. It can be used to control the servo turret of turning or the servo tool magazine of the milling machine center and so on. PLC axis function is available on 802D sl Plus or Pro.
Page: 31 / 59
By using the H-commands for the position and the feed rate values the H-commands and the M-command for the start must be in each case in one separate NC sentence. The first H-command is the position and the second H-command the federate. Sample: H123 H1000 M97 ; First PLC axis move to position 123 with feed rate1000. H443.785 H500 M98 ; Second PLC axis move to position 443.785 with feed rate 500. H5 H750 M99 ; Third PLC axis by using as index axis move to index position (MD 10910[4]) with feed rate 750. 3.9.2. Local Variable Definition Inputs:
LW0 LD4 LD8 _LMTp BOOL _LMTn BOOL _REF JOG_PLUS JOG_MINUS INC_POS POS_DC POS_INCH POS_ACN POS_ACP INDEX_AX START REAL REAL REAL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL PLC-axis number 1=6th, 2=5th, 3=4th axis Axis position Axis feedrate Axis hardware limit plus (NC) Axis hardware limit minus (NC) Axis reference point cam (NO) Move in plus direction manually Move in minus direction manually =1 incremental position; =0 absolute position Position in shortest direct direction Position in INCH format Position in negative direction Position in positive direction Axis is index axis Start axis movement
Note: NO Normal Open; NC Normal Close
Outputs:
POS_FINISH BOOL ERROR BOOL ERROR_CODE BOOL Position finished Error occurred Error code
3.9.3. Global Memory occupied no memory used 3.9.4. Corresponding PLC Machine Data
MD14510[17] MD14510[18] MD14510[19] 1: 6th axis, PLC axis one is selected 1: 5th axis, PLC axis two is selected 1: 4th axis, PLC axis three is selected
3.9.5. PLC axis hardware configuration: The drive and motor is as same as other NC axis, the drive is SINAMICS S120.
Page: 32 / 59
PLC axis operation: - In operation mode JOG and INC and REF, the PLC axis control is as same as NC axis; - In operation mode AUTO or MDA, the PLC axiss speed and position can only be controlled by PLC through interface signals VB380x300x / VB390x300x, it cant be programmed in NC part program with the axis address. PLC axis display: The PLC axis display is as same as NC axis: PLC axis type: It can be linear axis or rotary axis or index axis, it cant be spindle or geometry axis (X or Y or Z). PLC axis drive and motors commissioning: The commissioning on the drive and motor is as same as other NC axis. Detailed information about the PLC axis Machine data, the PLC axis control in operation mode AUTO or MDA, PLC axis error identifiers you find in the manual: Operating instructions
Network 6 ONE
PLC Axis control for PL (6st axis) PLC_AXIS EN POS_FINISH PLC_AXIS_NO ERROR ERROR_CODE VD25006000 POSITION VD25006008 FEED I2.0 _LMTp 1 I2.1 _LMTm I2.2 _REF I4.0 JOG_PLUS I4.1 JOG_MINUS V45001000.0 INC_POS V45001000.1 POS_DC V45001000.2 POS_INCH V45001000.3 POS_ACN V45001000.4 POS_ACP V45001000.5 INDEX_AX V25001012.1 START V11001000.2 V16000007.7 VD16001252
Page: 33 / 59
Network 7 ONE
PLC Axis control for PL (5st axis) PLC_AXIS EN POS_FINISH PLC_AXIS_NO ERROR ERROR_CODE VD25006000 POSITION VD25006008 FEED I2.3 _LMTp 2 I2.4 _LMTm I2.5 _REF I4.2 JOG_PLUS I4.3 JOG_MINUS V45001001.0 INC_POS V45001001.1 POS_DC V45001001.2 POS_INCH V45001001.3 POS_ACN V45001001.4 POS_ACP V45001001.5 INDEX_AX V25001012.2 START V11001000.2 V16000008.7 VD16001284
Network 8 ONE
PLC Axis control for PL (4 axis) PLC_AXIS EN 3 POS_FINISH PLC_AXIS_NO ERROR V11001000.2 V16000009.7 VD16001316
st
ERROR_CODE VD25006000 POSITION VD25006008 FEED I3.0 _LMTp I3.1 _LMTm I3.2 _REF I4.4 JOG_PLUS I4.5 JOG_MINUS V45001002.0 INC_POS V45001002.1 POS_DC V45001002.2 POS_INCH V45001002.3 POS_ACN V45001002.4 POS_ACP V45001002.5 INDEX_AX V25001012.3 START
Page: 34 / 59
Page: 35 / 59
VD14000064
T_ACT
Outputs:
C_out C_LED COOLon
3.11.3. Global Memory occupied 3.11.4. Corresponding PLC Machine Data no PLC machine data related
Page: 36 / 59
Outputs:
L_out L_LED
Page: 37 / 59
3.13. Subroutine 46 - TURRET1 (Turret with Hall Effect Device position sensor)
3.13.1. Purpose of Subroutine 46 This subroutine controls the kind of turret with Hall Effect Device sensor (HED). Turret motor is controlled by PLC output. During tool search the motor turns clockwise. When the desired tool is in-position, turret motor runs counter clockwise for a specified duration for clamping. The subroutine verifies the parameter for turret CCW to limit the value within 3 seconds in order to avoid the damage of the turret motor. T function from NCK will start turret change in AUTO and MDA mode and a short strike on the manual key will change one turret position and long press for more position turret change in JOG mode. During time of turret change one interface signal (V32000006.1 Read-in disable) is set, so that a part program will be stopped waiting for the turret change. In case of emergency stop, turret motor overload, or by active functions like Program Test or simulation, turret will be inhibited. The timing diagram for this kind of turret is shown below:
Page: 38 / 59
Signal Motor
CW Off CCW
Start T1 CW
Start T6 CW
Tool Pos.
T1 T2 T3 T4 T5 T6
3 alarms will be activated in this subroutine: Alarm 700022 TURRET MOTOR OVERLOAD Alarm 700023 PROGRAMMED TOOL NUM. > MAX. TURRET NUMBER Alarm 700026 NO POSITION SIGNALS FROM TURRET 3.13.2. Local Variable Definition Inputs:
Tmax C_time T_01 T_06 T_key OVload DWORD WORD BOOL BOOL BOOL BOOL BOOL BOOL VD14000064 MW154 M156.0 M156.1 M156.2 M156.3 M156.4 M156.5 MD160 M168.4 T28 Max. number of tool on the turret Turret Clamping delay time (Unit 0.01 s) Tool position sensors (low effective) Manual tool change key Turret motor overload (NC) Turret positioning Turret clamping Output for status display Current tool (retentive data) Turret clamping time Turret CW flag Turret CCW flag Turret CCW delay Manual key is active Tool Change complete Programmed Tool number not equal current tool Buffer to monitor the change of the turret by JOG mode Operation mode change lock Turret1 clamping timer.
Outputs:
T_cw T_ccw T_LED T_CURRENT ClampTime T_cw_m T_ccw_m CcwDelay K_active TC_end Tp_ne_Tc T__P_INDX T_CHL T1clamp
Page: 39 / 59
Page: 40 / 59
Outputs:
T_cw T_ccw Magnet LED T_CURRENT T_cw_m T_ccw_m T_P_INDX T_DES T_DIR T_POS T_LOCK T_MAG
3.14.4. Corresponding PLC Machine Data no machine data related 3.14.5. Sample of Subroutine Call
Network 9 ONE EN 8 1000 I3.0 I3.1 I3.2 I3.3 I3.4 Tmax Delay T_1 T_2 T_3 T_4 Parity T_cw T_ccw Magnet LED Q1.6 Q1.7 Q1.5 M_LED_CK4 Control of turret with encoder TURRET2
Page: 41 / 59
Outputs:
P_INDXo DIR
3.15.3. Global Memory occupied no global memory defined 3.15.4. Corresponding PLC Machine Data no PLC machine data related 3.15.5. Sample of Subroutine Call
Network 9 ONE EN 12 P_C_TFUNC T_CURRENT Tmax P_INDEXo Pnum DIR Pcurr P_INDEXo M20.1 Make out the direction of turret as well as pre-indexing position TOOL_DIR
After ATC exchanges the tools on the holder and spindle, the holder table should be refreshed. The programmed tool is on the spindle and existing tool on spindle, should be put back into empty holder. Please refer the following table for principal. The control logic for magazine as well as ATC is hardware dependent, therefore should be designed by machine tool builders.
TOOL on SPINDLE T_HOLDER_1 T_HOLDER_2 T_HOLDER_3 T_HOLDER_4 T_HOLDER_5 T_HOLDER_6 T_HOLDER_7 T_HOLDER_8 T_HOLDER_9 T_HOLDER_10 T_HOLDER_11 T_HOLDER_12 T_HOLDER_13 T_HOLDER_14 T_HOLDER_15 T_HOLDER_16 Table After ini. T5 M06 T8 M06 T16 M6 T0 M06 T15 M06 T10 M06 VB14000000 0 5 8 16 0 15 10 VB14000001 1 1 1 1 1 1 1 VB14000002 2 2 2 2 2 2 2 VB14000003 3 3 3 3 3 3 3 VB14000004 4 4 4 4 4 4 4 VB14000005 5 0 0 0 16 16 16 VB14000006 6 6 6 6 6 6 6 VB14000007 7 7 7 7 7 7 7 VB14000008 8 8 5 5 5 5 5 VB14000009 9 9 9 9 9 9 9 VB14000010 10 10 10 10 10 10 15 VB14000011 11 11 11 11 11 11 11 VB14000012 12 12 12 12 12 12 12 VB14000013 13 13 13 13 13 13 13 VB14000014 14 14 14 14 14 14 14 VB14000015 15 15 15 15 15 0 0 VB14000016 16 16 16 8 8 8 8
The purpose of this subroutine is to establish a table for tool magazine representing the positions of the tools on the magazine. After initialization the table is arranged in the following way: Number of Tool Holder 1 2 39 40 Tool number on the holder 1 2 39 40
It is possible to have 64 tools for SINUMERIK802D. But in subroutine library, only 40 tools are permitted. For magazine more than 40 tool, the following subroutine should be modified before application: SBR49MGZ_INI, SBR50MGZ_SRCH, and SBR51 MGZ_RNEW. 3.16.2. Local Variable Definition no local variable defined 3.16.3. Global Memory occupied no global memory defined 3.16.4. Corresponding PLC Machine Data no PLC machine data related
Page: 43 / 59
Outputs:
HD_No Find
3.17.3. Global Memory occupied - no global memory defined 3.17.4. Corresponding PLC Machine Data - no 3.17.5. Sample of Subroutine Call
Network 32 P_C_TFCT1_C Finding holder from magazine which contains programmed tool MGZ_SRCH EN P_C_TFUNC P_TOOL HD_No Find MD40 M32.5
Page: 44 / 59
3.18.3. Global Memory occupied - no global memory defined 3.18.4. Corresponding PLC Machine Data - no 3.18.5. Sample of Subroutine Call
Network 34 ONE Refresh magazine table MGZ_RNEW EN SPD_TOOL: VB14000000 HDcurrent: C0 T_No HD_NO
3.18. Subroutine 36, 42 and Subroutine 52 ... 58, 61 62 are reserved for subroutine library 3.19. Subroutine 59 - GRINDING_CTL
3.19.1. Purpose of Subroutine 59 This subroutine handles the program control for grinding. The key_1 to key_4 allows making a program break, dressing interruption while grinding, hand wheel overlay or manual oscillation reversal. By each activated key the oscillation reversal will be active apart from axis oscillation reversal manual and activating program break. These two functions are enabled with an M-command. All commands will be active after NC-start. 3.19.2. Local Variable Definition Inputs:
KEY_1 KEY_2 KEY_3 KEY_4 P_N_EN_OS_REV P_N_DEL_EN_OS_REV P_N_EN_INIT P_N_DEL_EN_INIT P_N_EN_GAP P_N_DEL_EN_GAP BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL Key for activating program break Key for dressing interruption while grinding Key for hand wheel overlay Key axis oscillation reversal manual M-command enable oscillation reversal M-command deleting enable oscillation reversal M-command enable interruption M-command deleting enable interruption M-command enable GAP M-command deleting enable GAP
Page: 45 / 59
3.20.1. Purpose of Subroutine 60 This subroutine handles the emergency stop sequence by using a safety relay combination with undelayed and delayed relay contacts (hardware solution). Only one emergency stop subroutine may be active in the OB1, either SBR33 or SBR60. The spindle stop signal is not monitoring. The delayed time from the safety relay contact must have a value > drive stop time from the most powerful drive (e.g. time spindle stop time). The SINAMICS controlled the line contactor via the Active Line Module. By using a Smart Line Module without DRIVE CLIQ the line contactor is controlled by the safety relay.
SINUMERIK 802D sl PLC Subroutine library Page: 46 / 59 All right reserved Date: 11.03.2011
E_KEY CONT_LC_REPLAY
Outputs:
ON_SR T_OFF1 T_OFF3
Page: 47 / 59
Outputs:
Ko_1 Ko_2 Ko_3 Ko_4 Ko_5 Ko_6 Ko_7 Ko_8 K1st1 K8st1 K1st2 K8st2 K1on K8on
Page: 48 / 59
3.20.4. Corresponding PLC Machine Data no PLC machine data related 3.20.5. Sample of Subroutine Call
Network 2 ONE EN 40 200 P_M_USER_K1 P_M_USER_K2 P_M_USER_K3 P_M_USER_K4 ZERO ZERO Delay7 Delay8 Ki_1 Ki_2 Ki_3 Ki_4 Ki_5 Ki_6 Ko_1 Ko_2 Ko_3 Ko_4 Ko_5 Ko_6 Ko_7 Ko_8 M_LED_CK1 M_LED_CK2 M_LED_CK3 M_LED_CK4 NULL_b NULL_b M12.6 M12.7 Toggle switch for customer application TOGGLE
Page: 49 / 59
Feed stop to channel (V32000006.0) will be activated by any alarms from the subroutine library. To remove the feed stop, clear the alarm condition first and then RESET.
5.1.
5.1.1. Purpose of the Simulation Program The purpose of the simulation program is to provide a way to test the system without MCP before all 802D components are installed on the machine tool. This simulation program works with the help of Status Chart of the programming tool. Customers can simulate the MCP to traverse the axes and spindle, change override, and select increment, etc. Hardware connected:
PROFIBUS Drive CLiQ
802D sl
Line module
Keyboard
Note: Here all enable signals on the drive unit must in the case of simulation enabled. But these enable signals must be controlled by PLC when application on the machine tools Subroutine 37 SIMU_MCP monitors the status such as mode change, NC start, stop, etc. acknowledges mode changes, generates the override value and also simulates reference cams via global memory bits for feed axis and spindle. The change of feed and spindle overrides is carried out via Status Chart. (Refer to chapter 3.4)
PP Module
Page: 50 / 59
5.1.2. PLC Machine Data related The related PLC MD is MD14510[16] for machine type. 5.1.3. Application 1. Connect hardware component according to the Start-up and Installation Manual as the figure above. 2. Power on the NC and drives. Set RS232 interface to STEP7-Connect on 802D. 3. Start Programming Tool PLC802 V3.1 and set Communication parameter to match the setting in NC. 4. Open the project file: SIMULATION.PTP and download it to 802D then Start PLC. 5. Open the Chart Status of the programming tool and give a 1 to the mask in the new value column of the desired function, and then click the icon write the value to the 802D. with mouse key to
Page: 51 / 59
5.2.
5.2.1. Purpose of the sample turning machine SAMPLE_TURN.PTP is an application program for turning machine. Through this sample 802D customers can learn how an application is composed using subroutine library, and how to make use of the subroutines in the library. Another purpose for this sample is that for turning machines with similar configuration can be used directly, or make simply modification to build a PLC application program quickly. This sample program is suitable for turning machines with following configuration:
2 Feed axes: X and Z; 2 HW limit switches for each axis 1 digital spindle: SP Turret (with HED sensor) of 6 tools Lubrication system (Interval and duration are controlled by PLC) Cooling system
Page: 52 / 59
802D sl:
One PP module (2 connector X111 and X222 are reserved 802D MCP, X333 for machine In- / Outputs) or One PP module (X333 for machine In- / Outputs) MCP 802D sl is connected via additional MCPA module with the control 802D sl (X1201 to X1 and X1202 to x2).
Description
Ground of 24VDC Output 24VDC as Common for all inputs in X333 Emergency stop button Limit switch X+ Limit switch XLimit switch Z+ Limit switch ZReference Cam X Reference Cam Z T1 T2 T3 T4 T5 T6 Turret motor overload T_RDY_LM, Line module ready
Note
Button: NO NC NC NC NC NO NO Sensor NC Sensor NC Sensor NC Sensor NC Sensor NC Sensor NC Thermal relay NC NO
Coolant level low Coolant motor overload Lubricant level low Lubricating motor overload Not connected Terminal X21.3 of Line module: Pulse enable Terminal X20.1 of PCU: ON/OFF1 Terminal X20.2 of PCU: OFF3 of axis Coolant output Lubrication output
NC NC NC NC
Input 24VDC for all outputs Input 24VDC for all outputs
802D MCP installed Terminal Block X111 for MCP X1201 Terminal Block X222 for MCP X1202 Note: the connecting of MCP and PP is different from SAMPLE_MILL.PTP All right reserved Date: 11.03.2011
Page: 53 / 59
5.3.
5.3.1. Purpose of the sample milling machine SAMPLE_MILL.PTP is an application program for milling machine. Through this sample 802D customers can learn how an application is composed using subroutine library, and how to make use of the subroutines in the library. Another purpose for this sample is that for milling machines with similar configuration can be used directly, or make simply modification to build a PLC application program quickly. This sample program is suitable for milling machines with following configuration:
3 Feed axes: X, Y and Z; 2 HW limit switches for each axis One digital spindle: SP (4th axis) Lubrication system (interval and duration are controlled by PLC) Cooling system 802D sl: One PP module (2 connector X222 and X333 are reserved 802D MCP, X111 for machine In- / Outputs) or One PP module (X111 for machine In- / Outputs) MCP 802D sl is connected via additional MCPA module with the control 802D sl (X1201 to X1 and X1202 to x2).
Page: 54 / 59
Description
Ground of 24VDC Output 24VDC as Common for all inputs in X111 Emergency stop button Limit switch X+ Limit switch XLimit switch Y+ Limit switch YLimit switch Z+ Limit switch ZReference Cam X Reference Cam Y Reference Cam Z
Note
Button: NC NO NC NC NC NC NC NO NO NO
NO NO
Coolant level low Coolant motor overload Lubricant level low Lubricating motor overload Not connected Terminal X21.3 of Line module: Pulse enable Terminal X20.1 of PCU: ON/OFF1 Terminal X20.2 of PCU: OFF3 of axis Coolant output Lubrication output
NC NC NC NC
Input 24VDC for all outputs Input 24VDC for all outputs
802D MCP installed Terminal Block X222 for MCP X1201 Terminal Block X333 for MCP X1202 Definition of User keys on MCP
Customer Key 1 Customer Key 2 Customer Key 3 Customer Key 4 Customer Key 5 Customer Key 6 Drive enable (toggle key)
Page: 55 / 59
Note: Load initialization file setup_M.ini to NC. Standard milling configuration is for 4 feed axes and one spindle, so it is necessary to modify the setting. Machine data MD20070[5]=0 will cancel axis A1.
!
6.1. General
CAUTION Please check whether these samples comply with all the relevant safety requirements.
When using a line contactor for electrical isolation of the DC link from the energy supply system, line contactor control depends on the Line Module type. More detailed information about line contactor control is provided in the relevant SINAMICS S120 documents, for example, the SINUMERIK 840D sl Machine Configuration Guide, the Equipment Manual for Booksize Power Sections, Commissioning Manual, Function Manual. More detailed information about the safety relay used is provided in the operating instructions for safety relays. A complete safety-oriented system generally includes safety sensors, evaluators, actuators and signaling components. It is the responsibility of each system / machine manufacturer to ensure correct functioning of the overall system. Siemens AG, its subsidiaries and affiliates (hereinafter referred to as Siemens) are not in a position to ensure all features of a given system or machine that has not been designed by Siemens. Siemens neither accepts any liability for recommendations that may be implied or stated herein.
Page: 56 / 59
If a legal certification of the Machinery Directive should become necessary, the machine builder is responsible for the due execution.
6.2.
6.3.
- Enable pulse (EP): The line contactor may only be deactivated if the enable pulse signal (EP) has been removed previously (t10ms). The current is removed during the delay time. - Ready: When the ready message (RDY) is output by the SLM, the line contactor may only be deactivated after the delay time (t10ms), if required. The current is removed during the delay time.
Line contactor control signal chart (a,b,c see examples stated in chapter 6.5) SINUMERIK 802D sl PLC Subroutine library Page: 57 / 59 All right reserved Date: 11.03.2011
6.4.
Application example for safety relay and control line contactor using Active Line Module / Smart Line Module with DRIVE-CLIQ
Notice: The control and the SINAMICS unit must be connected to the same 24 V DC power supply.
Page: 58 / 59
6.5
Application example for safety relay and control line contactor using Smart Line Module without DRIVE-CLiQ
Notice: The control and the SINAMICS unit must be connected to the same 24 V DC power supply.
Page: 59 / 59