Sunteți pe pagina 1din 41

Description of PLC Subroutine Library for

SINUMERIK 802S/C base line

1. General Description
SINUMERIK 802S base line and SINUMERIK 802C base line are compact numerical
control systems designed for control of turning and milling machine tools. SINUMERIK 802S
base line equips with stepper drives and SINUMERIK 802C base line with analog servo
drives. In order that SINUMERIK802S/C can be started up easily and quickly, a PLC
subroutine library is provided, based on Programming Tool PLC 802 V3.1 or higher.
Audience:
This document is designed for engineers of Machine Tool Builders who have
general knowledge of CNC and PLC.
Related Information:
Refer to following documents for more detailed information:
• SINUMERIK 802S/C base line Start-up and installation Guide
• SINUMERIK 802S/C base line Function description
• SimoDrive 611 planning guide
1.1. Content Of The Library
PLC subroutine library is composed of 2 PLC projects files and its description document,
which is provided in the toolbox of 802S/C.
SUBR_LIBRARY_802SC.ptp Project file in which a variety of subroutines is
provided with an empty main program (OB1)
SAMPLE_802SC_bl.PTP Project file based on library, which can be used for
application of turning or milling machines
In project file SUBR_LIBRARY_802SC.ptp basic subroutines are provided for functions
such as emergency stop control, axes control, etc., as well as coolant control, lubrication
control and simple turret control, etc. All these subroutines can be used as building blocks
to build up your own PLC application program, simply by putting the required subroutines
together in MAIN (OB1) and downloading it into SINUMERIK 802S/C.
The project SAMPLE_802SC_bl.PTP, based on SUBR_LIBRARY_802SC.PTP, is a
complete application PLC program for simple turning or milling machines. The
SAMPLE_802SC_bl.PTP is preinstalled in SINUMERIK 802S/C before delivery, which can
be configured via PLC machine data for different machine tools. For those machine tools
that SAMPLE_802SC_bl.PTP can cover their functions, it doesn’t need to write any PLC
application, just specify some PLC machine data. And it is also possible to modify this
sample project file or adding the functions your machine tool needed.
Please read this description carefully before editing your own PLC program based on
SUBR_LIBRARY_802SC.ptp or modifying SAMPLE_802SC_bl.PTP.

SINUMERIK 802S/C base line Page: 1 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
1.2. Important Things To Know Before Start
The following items are important to understand the subroutines provided in the library.
1.2.1. NC Initialization
Default configuration of 802S/C base line is for turning machines without cycles.
If you have a milling machine, it is important to load TECHMILL.INI from Toolbox via RS232
interface by WINPCIN into 802S/C base line before starting commissioning.

1.2.2. Division Of The System Resources


Resource (QTY) For customers For PLC library
I/O (max.48/16) All inputs and outputs no
Timers (16) 8:T0~T7 8:T8~T15
Counters (32) 24:C0~C23 8:C24~C31
Memory(128 Bytes) 64: M0.0~M63.7 64: M64.0~M127.7
NV memory (64 Bytes) 32: V14000000.0~V14000031.7 32: V14000032.0~V14000063.7
Alarms (32) 16: V16000000.0~V16000001.7 16: V16000002.0~V16000003.7
MD14510 (32) 16: MD14510[0]~ MD14510[15] 16: MD14510[16]~MD14510[31]
MD14512 (32) 16: MD14512[0]~ MD14512[15] 16: MD14512[16]~MD14512[31]
Subroutines (64) 32: SBR0 ~ SBR31 32: SBR32 ~ SBR63
Symbol tables (32) 15: USR1 ~ USR15 17: USR16 ~ USR31

1.2.3. Convention Of The Symbols


Symbols used in the subroutine library obey the same convention:
1. Leading characters are for destinations:
P_ - to PLC interface
H_ - to HMI interface
N_ - to NCK interface
M_ - to MCP interface
2. subsequent characters are for areas:
C_ - Channel
1_ - Axes
M_ - MCP
Other short forms in the symbols:
HWL - Hardware Limit
HW - Handwheel
RT - Rapid Traverse
TK - Traverse Key
ACT - active
SEL - selected (activated)
3. Max. 11 upper case character to compose a symbol (include the leading character). No
special characters such as =, +, -, [, ] etc. are allowed except underscore.

SINUMERIK 802S/C base line Page: 2 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
1.2.4. Arrangement Of Symbol Table
USR Name Content of the symbol table
1 DI_1 X100, I0.0~I0.7
2 DI_2 X101, I1.0~I1.7
3 DI_3 X102, I2.0~I2.7
4 DI_4 X103, I3.0~I3.7
5 DI_5 X104, I4.0~I4.7
6 DI_6 X105, I5.0~I5.7
7 DO_1 X200, Q0.0~Q0.7
8 DO_2 X201, Q1.0~Q1.7
16 IS_MCP Interface signal from and/or to MCP
17 IS_HMI Interface signal from and/or to HMI
18 IS_AUX Interface signal of auxiliary function from NCK
19 IS_NCK Interface signal from and/or to NCK
20 IS_CHA Interface signal from and/or to CHANNEL
21 IS_X Interface signal from and/or to AXIS 1
22 IS_Y Interface signal from and/or to AXIS 2
23 IS_Z Interface signal from and/or to AXIS 3
24 IS_SP Interface signal from and/or to AXIS 4
25 Reserved
26 MD_PLC PLC Machine Data for Siemens Subroutine
27 ALARM User Alarms
28 NV_MEM Retentive data area (None Volatile Memory)
29 SPC_MEM Special Memory Bit
30 SBR_MEM Definition of Memory for library PLC application program
31 ~ 32 Reserved for PLC library

Note:
From USR16 are predefined symbol for all interface signals of NCK, HMI, and MCP
1.2.5. Arrangement Subroutine Library
SBR Name Subroutine description
0 ~ 30 - Free for customer application
31 USR_INI Reserved for user initializing (called by SBR32 PLC_INI)
32 PLC_INI Initialization of the control
33 EMG_STOP Emergency Stop (Drive power on/off timing control )
34 X_CROSS Traverse key layout control via PLC MDs
35 SPINDLE Spindle control (contactor, analog of bi-/uni-polar)
36 MINI_HHU Siemens mini-Hand Held Unit (via PLC inputs)
38 MCP_NCK MCP & HMI signal (from V1000 /V1700 /V1900) to NCK
39 HMI_HW Handwheel selection via HMI
40 AXES_CTL Axes enables, hardware limit, motor brake release, etc.
41 GEAR_CHG 2 gear stage level change
44 COOLING Coolant control
45 LUBRICAT Lubrication control (interval and time)
46 TURRET1 Turret control 1 (simple turret with 4/6/8 position)
48 TOOL_DIR Make out the direction of tool change
49 LOCK_UNL Clamp/Unclamp control
51 Trg_key_OR User keys/LEDs feed/spindle override
62 FILTER Input/output filtering ONLY for SAMPLE

SINUMERIK 802S/C base line Page: 3 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
Note: All free subroutines between SBR32 and SBR63 are reserved for PLC library

SINUMERIK 802S/C base line Page: 4 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
1.2.6. PLC Machine Data
Hexadecimal Format
MD14512 USER_DATA_HEX
Machine data PLC Machine Data - Hexadecimal
Index Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
802S base line rotation Spindle config.
monitoring activate
14512[16] Z RM Y RM X RM Automat. In
active active active disable Startup
Servo motor with brake Reference without override active
14512[17] Z with Y with X with REF REF REF
brake brake brake Z Y X
Define Hardware Limit Logic Technical setting
14512[18] EMG Z single Y single X single Lub. at Drive
Chain HWL HWL HWL 1st PLC Optm
For detailed explanation please refer to next page.
Integer Format
MD14510 USER_DATA_INT
Machine data PLC Machine Data – Integer
Index WORD (16 bits Integer)
Definition: Machine tool type
14510[16] Unit: -
Range: 0 - Turning machine; 1 - Milling machine; >2 not defined
Definition: Drive type
14510[17] Unit: -
Range: 0 – stepper drive; 1 – analog drive (SimoDrive 611); >2- not defined;
Definition: number of positions on the turret
14510[20] Unit: -
Range: 4, 6, 8 (note: for SAMPLE only 4 / 6 permitted)
Definition: monitor time (turret change abort if destination tool not found within specified time)
14510[21] Unit: 0.1 second
Range: 30 ~ 200 (3 ~ 20 second)
Definition: Turret clamping time
14510[22] Unit: 0.1 second
Range: 5 ~ 30 (0.5 ~ 3 second)
Definition: Braking time of external brake mechanism of a contactor controlled spindle
14510[23] Unit: 0.1 second
Range: 5 ~ 200 (0.5 ~ 20 second)
Definition: Interval of track lubrication
14510[24] Unit: 1 Minute
Range: 5 ~ 300 Minutes
Definition: Duration of lubrication
14510[25] Unit: 0.1 second
Range: 10 ~ 200 (1 ~ 20 second)
Definition: X axis + traverse key position
14510[26] Unit: -
Range: between 22 ~ 30, but not 26
Definition: X axis - traverse key position
14510[27] Unit: -
Range: between 22 ~ 30, but not 26
Definition: Y axis + traverse key position
14510[28] Unit: -
Range: between 22 ~ 30, but not 26
Definition: Y axis - traverse key position
14510[29] Unit: -
Range: between 22 ~ 30, but not 26
Definition: Z axis + traverse key position
14510[30] Unit: -
Range: between 22~ 30, but not 26
Definition: Z axis - traverse key position
14510[31] Unit: -

SINUMERIK 802S/C base line Page: 5 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
Range: between 22 ~ 30, but not 26
Hexadecimal PLC machine data:
(1) MD14512[16]
Bit 0=0 – PLC normal operation (default)
Bit 0=1 – Start-up mode. Ready signal T72 from infeed module is not verified by PLC
Bit 1=0 – spindle disabled, if no command & stopped & Spindle Stop key (default)
Bit 1=1 – spindle is disabled automatically if no command & is stopped
Bit 6/5/4=0 – Rotation monitoring not active (default)
Bit 6/5/4=1 – Rotation monitoring activate (only for 802S base line)
(2) MD14512[17]
Bit 2/1/0=0 – Reference point approaching with override active (default)
Bit 2/1/0=1 – Reference point approaching without override active
Bit 6/5/4=0 – Z/Y/X motor without brakes (default)
Bit 6/5/4=1 – Z/Y/X motor with brake (note: only one motor is permitted with brake)
(3) MD14512[18]
Bit 1=0 – input #OPTM for SBR40 is disabled (default)
Bit 1=1 – Input #OPTM for SBR40 is enabled. I.e. #OPTM=1 – motor brake be released
Bit 2=0 – no lubrication at first power on (default)
Bit 2=1 – Once lubrication at first power on
Bit 6/5/4=0 – Z/Y/X has two limit switch (default) (in case Bit 7=0)
Bit 6/5/4=1 – Z/Y/X has only one limit switch (in case Bit 7=0)
Bit 7=0 – Hardware limit using PLC solution (default) (Bit 6/5/4 is effective)
Bit 7=1 – Hardware limit using hardware solution (Emergency Stop Chain)

Important
! These machine data bits are specified in hexadecimal format.
Please convert bit setting into hexadecimal and then input.

1.2.7. Special Flags Used In The Project Files


For bit inputs of subroutines
SM0.0 - always “1” symbolized as ONE
M122.0 - always “0” (cleared every cycle in SBR 33), symbolized as ZERO.
For unused outputs of subroutines
M127.7 - for unused output BIT, symbolized as NULL_b
MB127 - for unused output BYTE, symbolized as NULL_B
MW126 - for unused output WORD, symbolized as NULL_W
MD124 - for unused output DWORD, symbolized as NULL_D

SINUMERIK 802S/C base line Page: 6 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
2. Description of the subroutines library
2.1. Subroutine 32 – PLC_INI (PLC Initializing)

2.1.1. Purpose Of Subroutine 32


This subroutine is executed at the 1st PLC cycle setting some basic interface signals. In
this subroutine the following interface signals are set:
V32000006.7 - feed override active for NCK channel
V380x0001.5 - Measuring system 1 for the axes defined
V380x0001.7 - feed override active for the axes defined (spindle override switch
according to MD14512[16] Bit3)
At end of Subroutine 32, Subroutine 31: USR_INI is called. The initialization of customer
PLC project should be programmed in this subroutine.
2.1.2. Local Variable Definition – no local variable defined

2.1.3. Global Memory Occupied - no global memory used.

2.1.4. Corresponding PLC Machine Data: MD14512[16] Bit3=1 - Spindle with override switch

2.1.5. Sample Of Subroutine Call


Network 2 Initialization

SCAN_1ST PLC_INI
EN

2.2. Subroutine 33 – EMG_STOP (Emergency Stop)

CAUTION
! Please check whether this subroutine complies with all the relevant
safety requirements.

2.2.1. Purpose Of Subroutine 33


This subroutine handles the emergency stop sequence according to the timing diagram
described in “Function Description” of 802S/C base line . For 802C base line, the
subroutine also handles power on/off sequence (refer to SimoDrive Planning Guide for
detail).
INFEED Power off timing Power on timing
Terminal 64

Terminal 63

Terminal 48
t t t t

SINUMERIK 802S/C base line Page: 7 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
Emergency Stop is triggered not only by Emergency Stop button, but also by inactive
READY signal from terminal 72 or acitve I2t signal terminal 52, which are on 611 Infeed
module, after drive is enabled (terminal 64 is connected with terminal 9).
2 alarms may be activated from this subroutine:
Alarm 700016 – DRIVE NOT READY
Alarm 700017 – I2/T ALARM FOR INFEED MODULE
There is no difference for this subroutine to control 802S/C base line, i.e. this subroutine
can be used by 802C base line as well as 802S base line. For 802S base line, the
outputs of this subroutine are not used, just connect them to the defined empty bit output
– NULL_b (M127.7).
2.2.2. Local Variable Definition
Inputs:
DELAY WORD Power on/off sequence delay (Unit: 2*PLC cycle time)
EMG_K BOOL Emergency Stop Key (NC)
EN_K BOOL Drive enable Key (NC)
T_72 BOOL Terminal 72 of infeed module: Drive is ready (NO)
2
T_52 BOOL Terminal 52 of infeed module: I t monitoring (NO)
Note 1: NO – Normal Open ; NC – Normal Close ;
Note 2: PLC cycle time specified by MD100074 (1=12ms; 2=24ms)
Outputs:
T_48 BOOL To Terminal 48 of Infeed module: Contactor control
T_63 BOOL To Terminal 63 of Infeed module: Pulse enable
T_64 BOOL To Terminal 64 of Infeed module: Controller enable
EN_L BOOL Drive enables status indicator
ERR1 BOOL Error messages: DRIVE not ready
ERR2 BOOL Error messages: I2t monitoring
2.2.3. Global Memory Occupied
MB118 reserved as status memory
P_TON C31 CTU used for timing
2.2.4. Corresponding PLC Machine Data – no

2.2.5. Sample Of Subroutine Call


Network 3 Emergency Control
ONE EMG_STOP
EN

10 DELAY T_48 Q0.0


I0.7 EMG_K T_63 Q0.1
V10000000.0 EN_K T_64 Q0.2
I1.7 T_72 EN_L V11000000.0
I0.6 T_52 ERR1 V16000002.0
ERR2 V16000002.1

SINUMERIK 802S/C base line Page: 8 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
2.3. Subroutine 34 - X_CROSS (Traverse keys control)
2.3.1. Purpose Of Subroutine 34
The purpose of this subroutine is to send signals of traverse keys from MCP to NCK
interface according PLC machine data. And also an internal interface is reserved for
traverse keys for a hand held unit.
This subroutine is called in SBR38.
2.3.2. Local Variable Definition – no local variables are defined
2.3.3. Global Memory Occupied
MB107 – internal interface for hand held unit with traverse keys
Note: refer to chapter 2.5. for details
2.3.4. Corresponding PLC Machine Data
MD14510[26] – traverse key number of +X
MD14510[27] – traverse key number of - X
MD14510[28] – traverse key number of +Y
MD14510[29] – traverse key number of - Y
MD14510[30] – traverse key number of +Z
MD14510[31] – traverse key number of - Z
Machine data specified is actually the number of the traverse keys. Because K26 is
reserved as rapid overlay key, the range of these MD is between 22 ~ 30 except 26.
Traverse key layout with key numbers

Note: If traverse keys are not defined, traverse operation is not possible.
Note: Refer to Chapter 3.3 for MCP key layout.
2.3.5. Sample Of Subroutine Call
Network 12 Traverse keys control according PLC machine data

ONE X_CROSS
EN

SINUMERIK 802S/C base line Page: 9 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
2.4. Subroutine 35 – SPINDLE (for contactor controlled spindle/analog spindle)
2.4.1. Purpose of Subroutine 35
This subroutine is for spindle control. It is possible to control following type of spindles:
contactor controlled spindle (AC motor, with two contactors for CW and CCW); analog
spindle with 0~+10V setpoint; analog spindle with ±10V setpoint. The spindle enable is
handled in SBR40 – AXIS_CTL.
2.4.2. Local Variable Definition
Inputs:
DELAY WORD Spindle brake time (Unit: 100 ms)
T_64 BOOL Status of terminal 64 of infeed module
SP_EN BOOL Condition for spindle operation (NO)
UNI_PO BOOL Uni-polar analog spindle selected (NO)
KEYcw BOOL Spindle manual CW key (NO)
KEYccw BOOL Spindle manual CCW key (NO)
KEYstop BOOL Spindle manual stop key (NO)
Outputs:
SP_CW BOOL Output for spindle CW
SP_CCW BOOL Output for spindle CCW
SP_BRAKE BOOL Output for spindle braking
SP_LED BOOL Spindle operating status display
ERROR BOOL Error messages: Spindle operating condition not fulfilled
Description of connecting to the subroutine for different spindles
(1) Contactor controlled spindle (AC motor with contactors for CW and CCW)
Inputs
DELAY - specified according to real brake time need for the spindle
T_64 - from output of SBR33 (EMG_STOP) via a memory bit
SP_EN - condition for spindle operating, like tool or chuck is clamped
UNI_PO - ZERO
KEYcw - from MCP spindle CW key (V10000001.4)
KEYccw - from MCP spindle CCW key (V10000001.6)
KEYstop - from MCP spindle Stop key (V10000001.5)
Outputs
SP_CW - connect to coil of CW contactor
SP_CCW - connect to coil of CCW contactor
SP_BRAKE - connect to external brake device (high: clamping)
SP_LED - connect via a memory bit to input of SBR49 LOCK_UNL as
interlock signal, i.e. if spindle is running, unclamping not possible
ERROR - connect a LED or to interface signal V1600000x.x as PLC alarm
DIO Connecting to a contactor spindle
X2005
Q0.0
Q0.1
KM1 KM2
KM1 KM2

M AC Motor

SINUMERIK 802S/C base line Page: 10 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
Timing Diagram of contactor controlled spindle:
SP_EN
JOG mode
KEYcw
KEYccw
KEYstop
AUTO / MDA
M03
M04
M05
SP_CW
SP_CCW
SP_BRAKE ÅdelayÆ ÅdelayÆ ÅdelayÆ
ERROR

(2) 0~10V setpoint analog spindle (e.g. frequency converter)


Inputs
DELAY - according to brake down of the frequency converter
T_64 - from output of SBR33 (EMG_STOP) via a memory bit
SP_EN - condition for spindle operating, like tool or chuck is clamped
UNI_PO - SM0.0
KEYcw - from MCP V10000001.4
KEYccw - from MCP V10000001.6
KEYstop - from MDP V10000001.5
Outputs
SP_CW - connect to coil of a relay which connect CW enable of converter
SP_CCW - connect to coil of a relay which connect CCW enable of converter
SP_BRAKE - to a null bit - M127.7
SP_LED - connect via a memory bit to input of SBR49 LOCK_UNL as
interlock signal, i.e. if spindle is running, unclamping not possible
ERROR - connect a LED or to interface signal V1600000x.x as PLC alarm
DIO Connecting to a 0~10V analog spindle Converter
X2005
KA3
Q0.0 CW
Q0.1 KA4
KA3 KA4 CCW
COM

802C ECU
X7
4/56 Analog setpoint
±10V CMD
4/14
0V GND

SINUMERIK 802S/C base line Page: 11 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
(3) ±10V setpoint analog spindle (servo spindle or frequency converter)
Inputs
DELAY - specified according to real brake time need for the spindle
T_64 - from output of SBR33 (EMG_STOP) via a memory bit
SP_EN - condition for spindle operating, like tool or chuck is clamped
UNI_PO - ZERO
KEYcw - from MCP spindle CW key (V10000001.4)
KEYccw - from MCP spindle CCW key (V10000001.6)
KEYstop - from MCP spindle Stop key (V10000001.5)
Outputs
SP_CW - to a null bit - M127.7
SP_CCW - to a null bit - M127.7
SP_BRAKE - to a null bit - M127.7
SP_LED - connect via a memory bit to input of SBR49 LOCK_UNL as
interlock signal, i.e. if spindle is running, unclamping not possible
ERROR - connect a LED or to interface signal V1600000x.x as PLC alarm
802S ECU Connecting to a ±10V analog spindle Converter
X3
Internal relay will be
closed when V38030002.1=1
opened when V38030002.1=0
Internal
relay
5 EN
9
COM

1 Analog setpoint
±10V CMD
6
0V GND

Note: In case to connect 802C base line to a converter with ±10V setpoint, its
analog signal comes from cable connected to X7 labeled 4/56 and 4/14,
its enable (internal relay) labeled 4/65 and 4/9.
2.4.3. Global Memory occupied
MB115 status memory (see symbol table USR30 for details)
MB116 status memory
T12 Timer for spindle brake delay
2.4.4. Corresponding PLC Machine Data – no
2.4.5. Sample of Subroutine Call
Network 12 spindle controlling (contactor, bi-/uni-polar spindle)
ONE SPINDLE
EN

50 DELAY SP_cw Q0.0


SM0.0 T_64 SP_ccw Q0.1
SM0.0 SP_EN SP_brak Q0.2
ZERO UNI_PO SP_LED Q0.3
V10000001.4 KEYcw ERROR Q0.4
V10000001.6 KEYccw
V10000001.5 KEYstop

SINUMERIK 802S/C base line Page: 12 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
2.5. Subroutine 36 – MINI_HHU (for Siemens HHU: 6FX2006-1BG00)
2.5.1. Purpose of Subroutine 36
The purpose of this subroutine is to send selected increment, traverse keys of selected
axis from a Siemens mini-HHU (order number: 6FX2006-1BG00) via inputs to NCK
interface via the internal interface defined by SBR34 (X_CROSS). In case a similar HHU
is used instead of that from SIEMENS, just modify this subroutine to meet its
requirements.
2.5.2. Local Variable Definition (only inputs)
NODEF WORD RESERVED
ENABLE BOOL HHU enable (NO) Axis code: Pin8 Pin9 Pin10
AX_A BOOL Axis sel. Pin8 (NO) X 0 1 0
AX_B BOOL Axis sel. Pin9 (NO) Y 1 1 1
AX_C BOOL Axis sel. Pin10(NO) Z 0 1 1
KEY_Tp BOOL Traverse key + (NO)
KEY_Tn BOOL Traverse key - (NO)
KEY_R BOOL Rapid overlay (NO)
INC1 BOOL Increment 1 (NO)
INC10 BOOL Increment 10 (NO)
INC100 BOOL Increment 100 (NO)
2.5.3. Global Memory Occupied – same as these defined in SBR34 (X_CROSS)
HHU_AX1P M107.0 HHU traverse key: 1st axis plus
HHU_AX1N M107.1 HHU traverse key: 1st axis minus
HHU_AX2P M107.2 HHU traverse key: 2nd axis plus
HHU_AX2N M107.3 HHU traverse key: 2nd axis minus
HHU_AX3P M107.4 HHU traverse key: 3rd axis plus
HHU_AX3N M107.5 HHU traverse key: 3rd axis minus
HHU_RAPID M107.6 HHU rapid overlay key
HHU_ACT M107.7 HHU active
If HHU_ACT is “1”, handwheels will not be selected from HMI signals (VB19001003 &
VB19001004), but from input signals. Traverse key signals are put to the internal interface as
listed.
2.5.4. Corresponding PLC Machine Data – no
2.5.5. Sample Of Subroutine Call
Network 6 Mini-Hand Held Unit control
ONE MINI_HHU
EN
0 NODEF
I1.3 ENABLE
I1.0 AX_A
I1.1 AX_B
I1.2 AX_C
I1.3 KEY_Tp
I1.4 KEY_Tn
I1.5 KEY_R
I0.5 INC1
I0.6 INC10
I0.7 INC100

SINUMERIK 802S/C base line Page: 13 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
2.6. Subroutine 38 - MCP_NCK (MCP signal processing)

2.6.1. Purpose Of Subroutine 38


The purpose of this subroutine is to transfer active MCP signals from interface
V1000xxxx and HMI signals from V1700xxxx, V1800xxxx and V1900xxxx to NCK
interface to activate operation mode and control sequences. The main functions in the
subroutine are:
1. Selection of operation mode
2. Selection of increment
3. HMI signals to NCK channel interface (e.g. program control, handwheel)
4. AXIS traversing signal to control according to PLC Machine data
In this subroutine, SBR34 (X_CROSS) and SBR39(HMI_HW) are executed.
2.6.2. Local Variable Definition – no local variable is used in the subroutine
2.6.3. Global Memory Occupied – no global memory used.
2.6.4. Corresponding PLC Machine Data – no
2.6.5. Sample Of Subroutine Call
Network 4 Processing MCP signals from V1000 and activating corresponding functions

ONE MCP_NCK
EN

2.7. Subroutine 39 - HMI_HW (Handwheel selection according HMI interface)


2.7.1. Purpose Of Subroutine 39
The purpose of this subroutine is to select handwheel in MCS or WCS according HMI
interface V1900 1xxx.
This subroutine is called in SBR38.
2.7.2. Local Variable Definition – no local variables are defined
2.7.3. Global Memory Occupied – no memory used
2.7.4. Corresponding PLC Machine Data – no
2.7.5. Sample Of Subroutine Call
Network 5 Selection handwheel according interface area V1900 1xxx

ONE HMI_HWL
EN

SINUMERIK 802S/C base line Page: 14 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
2.8. Subroutine 40 - AXES_CTL (Feed axes and Spindle control )
2.8.1. Purpose Of Subroutine 40
The purpose is to enable drives “controller enable” (V380x0002.1), to monitor hardware limits and
reference cam signals, to control motor brake release. Two different ways are provided for
hardware limit control: PLC solution (MD14512[18] bit 7=0) or hardware solution (MD14512[18]
bit 7=1). Also it is possible to have 2 hardware limit signals at each end of any axis or only one
limit signal for 2 directions. It is also possible to have emergency chain as shown below (Note:
wiring should be exactly same, if this subroutine is implemented).
The spindle is enabled when spindle command is available, e.g. M03, and will be disabled when
no spindle command is available, spindle is stopped and spindle stop key on MCP is pressed or
automatically disabled when no spindle command and spindle stopped (MD14512[16]Bit1=1).
24Vdc
Encoding of HW limit switch Hardware limit
rd E_Key _1LMTp _2LMTp _3LMTp Direction Reached
3 axis switch
0 1 1 1 - Only Emg. Stop
Input to 0 0 1 1 V39000004.7 1st + over limit
_3LMTp 0 0 1 1 V39000004.6 1st - over limit
Release 0 0 0 1 V39010004.7 2nd + over limit
nd
button 2 axis switch 0 0 0 1 V39010004.6 2nd - over limit
0 0 0 0 V39020004.7 3rd + over limit
Input to 0 0 0 0 V39020004.6 3rd - over limit
_2LMTp
st Note: In case of EMERGENCY STOP or any of the
1 axis switch hardware limits are reached, Terminal 64 switches
Input to and Terminal 9 are disconnected by hardware.
Emergency _1LMTp
Stop
Input to Terminal 9
OVLrel Input KA1
E_Key
KA1
Terminal 64: control enable of Infeed module
0V
With this solution, a signal for over limit release “OVLrel” (NO) should be also provided for
subroutine 40, which is needed for direction control by leaving the over limit switch.
2.8.2. Local Variable Definition
Inputs:
NODEF WORD reserved word
T_64 BOOL Status of terminal 64 of infeed module
T_63 BOOL Status of terminal 63 of infeed module
SPAD BOOL Spindle automatic disable (NO)
OPTM BOOL input for brake release during drive optimization (NO)
OVLrel BOOL Over limit release (NO)
_1LMTp BOOL 1st axis hardware limit plus (NC) *
st
_1LMTn BOOL 1 axis hardware limit minus (NC)
_1REF BOOL 1st axis reference point cam (NO)
nd
_2LMTp BOOL 2 axis hardware limit plus (NC) *
_2LMTn BOOL 2nd axis hardware limit minus (NC)
nd
_2REF BOOL 2 axis reference point cam (NO)
_3LMTp BOOL 3rd axis hardware limit plus (NC) *
rd
_3LMTn BOOL 3 axis hardware limit minus (NC)
rd
_3REF BOOL 3 axis reference point cam (NO)
* Note: If an axis has only one limit switch with 2 cams at each end, or hardware
solution is used, this limit signal should be connected to “limit plus” of the
subroutine e.g. _1LMTp.

SINUMERIK 802S/C base line Page: 15 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
Outputs:
_BRK BOOL Brake release output (high effective)
MSG1 BOOL Message: Brake is released during optimization
MSG2 BOOL Message: Rotation monitoring active for stepper drive
2.8.3. Global Memory Occupied
X_M_DIR V14000063.0 X motion direction: 1: + direction; 0: - direction
Y_M_DIR V14000063.1 Y motion direction: 1: + direction; 0: - direction
Z_M_DIR V14000063.2 Z motion direction: 1: + direction; 0: - direction
2.8.4. Corresponding PLC Machine Data
MD14512[18] Bit 7 – 1: Hardware solution for over limit monitoring;
0: PLC solution with the condition defined by:
MD14512[18] Bit 6/5/4 – 1: one hardware limit switch each axis or
0: two hardware limit switches each axis;
MD14512[18] Bit 1 – 1: Switch #OPTM release motor brake for 611U drive optimization;
0: Switch #OPTM motor brake clamp.
Note: (1) Optimization is for drive 611U. During optimization motor brake must
be released. Input #OPTM is used to release motor brake only when
MD14512[18] Bit1 is set “1”.
(2) Emergency stop (V27000000.1=1) always has highest priority to
clamp motor brake.
(3) following alarms may be generated
Alarm 700026 – BRAKE RELEASED FOR DRIVE OPTIMIZATION

Important
! After drive optimization, MD14512[18] Bit1 must be reset “0“ .

2.8.5. Sample Of Subroutine Call


st nd rd
Network 6 Axes control for X(1 axis), Y(2 axis), Z(3 axis) and spindle

ONE AXIS_CTL
EN

0 NODEF _BRK Q0.3


Q0.2 T_64 MSG1 NULL_b
Q0.1 T_63 MSG2 NULL_b
V45001016.1 SPAD
ZERO OPTM
ZERO OVLrel
I0.1 _1LMTp
I0.2 _1LMTn
I0.7 _1REF
I0.4 _2LMTp
I0.5 _2LMTn
I1.0 _2REF
I0.5 _3LMTp
I0.6 _3LMTn
I1.1 _3REF

SINUMERIK 802S/C base line Page: 16 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
2.9. Subroutine 41 - GEAR_CHG (spindle gear change)

2.9.1. Purpose Of Subroutine 41


The subroutine is designed for analog spindle (like SimoDrive 611 spindle or frequency
converter with ±10V setpoint) with 2 gear stages and with in position sensors. Spindle
will be oscillated during gear change activated by spindle speed or by M41/M42. This
subroutine can only be used for milling machines or turning machines without turret.
2.9.2. Local Variable Definition
Inputs:
D_CHG WORD Gear change delay (Unit: 0.1 S)
D_MON WORD Gear change monitoring (Unit: 0.1S)
D_S0 WORD Spindle stop delay (Unit: 0.1 S)
S_hold BOOL Spindle zero speed signal (NO)
S_alarm BOOL Spindle alarm (NO)
LGi BOOL Low gear stage in position (NO)
HGi BOOL High gear stage in position (NO)
Note 1: D_S0 – Oscillation starts after S-hold signal plus its delay time
Note 2: D_CHG – level change output will be delayed after spindle starting oscillation
Note 3: D_MON – monitoring in position time after level change output. In case there is
no in position signal after delay, change output will be reversed and then repeat.
Outputs:
LGo BOOL Low gear stage output
HGo BOOL High gear stage output
LG_in BOOL Low gear stage in position display
HG_in BOOL High gear stage in position display

Timing Diagram for Gear Stage Change


NCK G level 1
NCK G level 2
S_hole
LGi
HGi
D_S0 (delay 1)
D_CHG (delay 2)
D_MON (delay 3)
Oscillating
LGo
HGo
V32000006.0

Note: NCK G level 1 on above timing diagram means either programmed spindle speed
st
is in range of 1 gear stage or M41 is programmed;
NCK G level 2 on above timing diagram means either programmed spindle speed
is in range of 2nd gear stage or M42 is programmed.

SINUMERIK 802S/C base line Page: 17 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
2.9.3. Global Memory Occupied
MB117 8 bits status memory for gear change
T11/T14/T15 are used

Important
Because T14 and T15 are commonly used by subroutines TURRET1
! and GEAR_CHG, so that these two subroutines can not be used
simultaneously

2.9.4. Corresponding PLC Machine Data – no PLC machine data related


But some spindle machine data must be specified for oscillation:
35010 GEAR_STEP_CHANGE_ENABLE
– Gear change possible
35110 GEAR_STEP_MAX_VELO
rev/min max. speed for gear change(stage no.) 0,1...5
35120 GEAR_STEP_MIN_VELO
rev/min min. speed for gear change(stage no.) 0,1...5
35130 GEAR_STEP_MAX_VELO_LIMIT
rev/min max. speed for gear change(stage no.) 0,1...5
35140 GEAR_STEP_MIN_VELO_LIMIT
rev/min min. speed for gear change(stage no.) 0,1...5
36200 AX_VELO_LIMIT
mm/min, RPM Threshold value for velocity monitoring
35400 SPIND_OSCILL_DES_VELO
rev/min Reciprocation speed
35410 SPIND_OSCILL_ACCEL
2
rev/s Acceleration during reciprocating
35430 SPIND_OSCILL_START_DIR
– Starting direction during reciprocation
35440 SPIND_OSCILL_TIME_CW
– Reciprocation time for M03
35450 SPIND_OSCILL_TIME_CCW
– Reciprocation time for M04
Note: Please refer to “Start-up and installation” for details
2.9.5. Sample Of Subroutine Call
Network 18 Analog spindle gear change (2 gear stages)

ONE GEAR_CHG
EN

2 D_CHG LGo Q1.0


30 D_MON HGo Q1.1
5 D_S0 LG_in V11000000.0
ONE S_hold HG_in V11000000.2
ZERO S_alarm
I1.0 LGi
I1.1 HGi

SINUMERIK 802S/C base line Page: 18 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
2.10. Subroutine 44 - COOLING (coolant control)

2.10.1. Purpose Of Subroutine 44


The cooling can be started/stopped by a MCP key or in AUTO/MDA mode started by
M07/M08 and stopped by M09. In case of emergency stop, cooling motor overload,
coolant level low or by PRT (Program Test), cooling will be inhibited.
2 alarms may be activated from this subroutine:
Alarm 700018 – COOLING MOTOR OVERLOAD
Alarm 700019 – COOLANT LEVEL LOW
2.10.2. Local Variable Definition
Inputs:
NODEF WORD Reserved
C_key BOOL Manual operating key (trigger signal required)
OVload BOOL Coolant motor overload (NC)
C_low BOOL Coolant level low (NC)
C_dis BOOL Cooling disabled (NC)
Outputs:
C_out BOOL Coolant output
C_LED BOOL Cooling status display
ERR1 BOOL Cooling pump motor overload
ERR2 BOOL Coolant level low
2.10.3. Global Memory occupied
COOLon M105.1 Status of coolant on
2.10.4. Corresponding PLC Machine Data – no PLC machine data related

2.10.5. Sample Of Subroutine Call

Network 16 Cooling control

ONE COOLING
EN

0 NODEF C_out Q0.2


V10000000.5 C_key C_LED V11000000.5
I1.6 OVload ERR1 NULL_b
ZERO C_low ERR2 NULL_b
ZERO C_dis

SINUMERIK 802S/C base line Page: 19 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
2.11. Subroutine 45 - LUBRICAT (Lubricating control)
2.11.1. Purpose Of Subroutine 45
Lubrication is controlled according a specified time interval for a specified duration (not
distance related). A manual key is also available to start lubricating. It is also possible to
start once lubricating by first power on. Normally the lubrication will be started
periodically each interval for a certain duration. In case of emergency stop, lubrication
motor overload, lubrication will be not started.
2 alarms may be activated in this subroutine:
Alarm 700020 – LUBRICATING MOTOR OVERLOAD
Alarm 700021 – LUBRICANT LEVEL LOW
2.11.2. Local Variable Definition
Inputs:
Lintv WORD Lubrication time interval (unit: 1 min)
Ltime WORD Lubrication duration (unit: 0.1s, max. 327.67s)
L_key BOOL manual lubrication key (trigger signal required)
L1st BOOL Lubrication by first PLC cycle (power on)
Ovload BOOL lubrication motor overload (NC)
L_low BOOL lubricant level low (NC)
Outputs:
L_out BOOL Lubrication output
L_LED BOOL output for status display
ERR1 BOOL Error: Overload
ERR2 BOOL Error: lubricant level low
2.11.3. Global Memory occupied
L_cmd M105.4 lubrication command
L_interval C30 as timer for lubrication interval (unit: 1 minute)
L_time T13 as lubrication duration (unit: 0.1s)

2.11.4. Corresponding PLC Machine Data


MD 14510 [24]: Lubrication time interval (unit: 1 min)
MD 14510 [25]: Lubrication duration (unit: 0,01 s, max. 327.67s)
2.11.5. Sample Of Subroutine Call
Network 8 Lubrication by interval specified by MD14510[24] and duration by MD14510[25]

ONE LUBRICAT
EN

MD_INT_24 Lintv L_out Q4.5


MD_INT_25 Ltime L_LED M_LED_CK5
P_M_USER_K5 L_key ERR1 V16000002.4
ONE L1st ERR2 V16000002.5
I8.7 OVload
I8.6 L_low

SINUMERIK 802S/C base line Page: 20 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
2.12. Subroutine 46 - TURRET1 (Turret with Hall Effect Device position sensor)

2.12.1. Purpose Of Subroutine 46


This subroutine controls the kind of turret with Hall Effect Device sensor. 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.
T function from NCK will start turret change in AUTO and MDA mode and a short strike
on the MCP key will change one turret position and long press for more position in JOG
mode.
During turret change interface signals (V32000006.1 “Read-in disable”, V32000006.0
“Feedhold”) are set, so that a part program will be stopped waiting for the turret change.
In case of emergency stop, turret motor overload, or by PRT (Program Test), turret will
be inhibited.
The timing diagram for this kind of turret is shown below:
Signal Start Target Start Target
T1 T3 T6 T4
Clamp time Clamp time
Motor CW CW CCW CW CCW
Off
CCW
Tool T1
Pos. T2
T3
T4
T5
T6

2 alarms may be activated in this subroutine:


Alarm 700022 – TURRET MOTOR OVERLOAD
Alarm 700023 – PROGRAMMED TOOL NUM. > MAX. TURRET NUMBER
2.12.2. Local Variable Definition
Inputs:
Tmax WORD max. number of tool on the turret
C_time WORD Turret clamping time (unit: 0.1 S)
M_time WORD Turret change monitoring time (unit: 0.1 S)
T_01 … T_08 BOOL tool position sensors (NO)
T_key BOOL Manual turret Change key
OVload BOOL turret motor overload (NC)
Outputs:
T_cw BOOL turret positioning
T_ccw BOOL turret clamping
T_LED BOOL output for status display
ERR1 BOOL Error1: No turret position signals available
ERR2 BOOL Error2: Programmed tool is out side turret range
ERR3 BOOL Error3: Tool search monitor time out
ERR4 BOOL Error4: Turret motor overload

SINUMERIK 802S/C base line Page: 21 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
2.12.3. Global Memory Occupied
ClampTime MD108 current turret position
Status bits MB112 see symbol table SBR_MEM
Status bits MB113 see symbol table SBR_MEM
C_TIMER T14 Turret clamping delay
M_TIMER T15 Turret monitoring delay
2.12.4. Corresponding PLC Machine Data
MD14510[20]: Turret position 4 / 6 / 8
MD14510[21]: Turret monitoring time (unit: 0.01s max. 200 unit)
MD14510[22]: Turret clamping time (unit: 0.01s max. 30 unit)
2.12.5. Sample Of Subroutine Call

Network 9 HED turret control

ONE TURRET1
EN

6 Tmax T_cw Q5.0


MD_INT_22 C_time T_ccw Q5.1
MD_INT_21 M_time T_LED M_LED_CK4
I7.0 T_01 ERR1 NULL_b
I7.1 T_02 ERR2 NULL_b
I7.2 T_03 ERR3 NULL_b
I7.3 T_04 ERR4 NULL_b
I7.4 T_05
I7.5 T_07
ZERO T_06
ZERO T_08
P_M_USER_K4 T_key
I7.6 OVload

SINUMERIK 802S/C base line Page: 22 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
2.13. Subroutine 48 - TOOL_DIR (Tool change direction)
2.13.1. Purpose Of Subroutine 48
The purpose is to make out the direction in shortest way to the destination and pro-
indexing position (i.e. one position before the destination in desired direction) of the
turret or tool magazine according to the maximum tool number and programmed tool
number. This subroutine can be used for indexing turret of turning machines magazine
for milling machines.
Examples CCW
# Curr. Prog. pre-ind Dir. 1
Pos. Pos. Pos 8 2
1 7 2 1 CCW Current pos.
2 7 5 6 CW
7 3
3 3 8 1 CW
4 1 4 3 CCW
5 6 8 7 CCW 6 4
5
CW

2.13.2. Local Variable Definition


Inputs:
Tmax DWORD max. tool number on turret
Pnum DWORD programmed tool number
Pcurr DWORD current turret position
Outputs:
P_INDXo DWORD pre-indexing position; one position before the destination
in direction of shortest way.
DIR BOOL tool change direction: 1 - CW; 0 - CCW
2.13.3. Global Memory Occupied – no global memory defined
2.13.4. Corresponding PLC Machine Data – no PLC machine data related
2.13.5. Sample Of Subroutine Call
Network 9 Make out the direction of turret as well as pre-indexing position

ONE TOOL_DIR
EN

12 Tmax P_INDEXo P_INDEXo


P_C_TFUNC Pnum DIR M20.1
T_CURRENT Pcurr

SINUMERIK 802S/C base line Page: 23 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
2.14. Subroutine 49 - LOCK_UNL (Clamping/Unclamping)

2.14.1. Purpose Of Subroutine 49


This subroutine can be used to control the clamping/unclamping control of tool holder of
a milling machine tool or chuck of a turning machine tool. The clamping or unclamping is
only possible when part program is not executing and spindle is standstill. During
unclamping FEEDHOLD signal (V32000006.0) is active for safety. It is possible for
clamping device to be with or without in-position sensor. For the device with in-position
sensor, the FEEDHOLD signal will be reset if the in-position signal is detected; for the
device without in-position sensor, the FEEDHOLD will be reset after delay.
2 alarms may be activated from this subroutine:
Alarm 700018 – UNCLAMPING NOT POSSIBLE WHILE SPINDLE RUNNING
Alarm 700019 – CLAMPING NOT IN POSITION
2.14.2. Local Variable Definition
Inputs:
DELAY WORD clamping delay (unit: 2x PLC cycle time)
CONF BOOL Configuration: 0/1 – with / without in-position sensor
KEY BOOL Clamping/Unclamping key (NO)
S0 BOOL Spindle stopped (NO)
CLPi BOOL clamping in-position sensor (NO)
Outputs:
RELo BOOL Unclamping output
CLPo BOOL clamping output
C_ind BOOL clamping in-position indicator
ERR1 BOOL Error1: Clamp/Unclamp not possible if spindle working
ERR2 BOOL Error2: Clamping not in-position
2.14.3. Global Memory occupied
EOD M113.5 End of delay
TR_st M113.6 Release status
TR_om M113.7 Release buffered output
2.14.4. Corresponding PLC Machine Data – no PLC machine data related

2.14.5. Sample Of Subroutine Call


Network 16 Chuck clamping/unclamping control

ONE LOCK_UNL
EN

50 DELAY RELo Q0.6


ZERO CONF CLPo Q0.7
V10000000.1 KEY C_ind V11000000.1
I1.6 EX_K ERR1 NULL_b
ONE S_VELO ERR2 NULL_b
ONE CLPi

SINUMERIK 802S/C base line Page: 24 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
2.15. Subroutine 51 - Trg_key_OR

2.15.1. Purpose Of Subroutine 51


As the Feed and Spindle override switchs will be replaced with 6 trigger user keys
and 4 user LEDs in SINUMERIK802S/C base line syatem, therefor Subroutine51 has
been created to meet this requirement. Please see the Figure 1.

__________________________________________________________________________

Feed LED2 Spindle LED2

Spindle
Override switch Feed Spindle
Increase key Increase key

Feed Spindle
100% key 100% key

Feed Feed LED1 Spindle LED1


Override switch

Feed
Decrease key Spindle

Current control mode Control mode after redesignation

______________________________ Figure 1_____________________________________

2.15.2. Local Variable Definition

Name Var Type Data Type Description.


LED1_F OUT BOOL Indicates Current feed override LED1
DecF_key IN BOOL Decrease key of feed override
F_100_Key IN BOOL Feed Override 100% key.
IncF_key IN BOOL Increase key of feed override
LED2_F OUT BOOL Indicates Current feed override LED2

LED1_S OUT BOOL Indicates Current Spindle override LED1


DecS_key IN BOOL Decrease key of spindle override
S_100_Key IN BOOL Spindle Override 100% key.
IncS_key IN BOOL Increase key of spindle override
LED2_S OUT BOOL Indicates Current Spindle override LED2

SINUMERIK 802S/C base line Page: 25 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
2.15.3. Global Memory occupied

Name Address Description


FO_buffer MB80 Feed Override buffer
SO_buffer MB81 Spindle Override buffer
FG_buffer MB82 Feed Override gray code buffer
SG_buffer MB83 Spindle Override gray code buffer
T9 T9 DecF_key and DecS_key holding on timer
T10 T10 Feed/Spindle Override 100% key holding on timer.
F_recorder VB14000002 Current feed override buffer recorder.
S_recorder VB14000003 Current spindle override buffer recorder.

2.15.4. Corresponding PLC Machine Data

MD14510[12] Feed/Spindle Override 0% key holding on time define.


Unit : 100ms
Range : 5 to 30 (0.5 to 3S) , if out of this range , the holding on time will
bbe regarded as 1.5S.

MD14510[13] Feed/Spindle Override 100% key holding on time define.


Unit : 100ms
Range : 1 to 30 (0.1 to 3S) , if out of this range , the holding on time will
be regarded as 1.5S.
.

MD14512[12] bit 0 Define Feed/Spindle override control mode.


=1 Feed and Spindle override controled by switchs
=0 Feed and Spindle override controled by trigger user keys.

MD14512[12] bit 2 Define Feed override startup value


=1 Recode the feed override value of the last machine
turn off for the next startup.
=0 Startup feed override is always 100%

MD14512[12] bit 3 Define spindle override startup value


=1 Recode the spindle override value of the last machine
turn off for the next startup.
=0 Startup spindle override is always 100%

SINUMERIK 802S/C base line Page: 26 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
MD14512[12] bit 4/5 Define feed override shift speed

Bit5 Bit4 Feed override shift speed


0 0 Standard speed. The steps are:
0%,1%,2%,4%,6%,8%,10%,20%,30%,40%,50%,60%,70%,75%,80%,
85%,90%,95%,100%,105%,110%,115%,120%.
0 1 Two times fast than standard. The steps are:
0%,2%,6%,10%,30%,50%,70%,80%,90%,100%,110%,120%.
1 0 About three times fast than standard. The steps are:
0%,4%,10%,40%,70%,85%,100%,110%,120%.
1 1 About four times fast than standard. The steps are:
0%,2%,10%,50%,80%,100%,120%.

MD14512[12] bit 6/7 Define spindle override shift speed

Bit7 Bit6 Spindle override shift speed


0 0 Standard speed. The steps are:
50%,55%,60%,65%,70%,75%,80%,85%,90%,95%,100%,105%,
110%,115%,120%.
0 1 Two times fast than standard. The steps are:
50%,60%,70%,80%,90%,100%,110%,120%.
1 0 About three times fast than standard. The steps are:
50%,60%,70%,85%,100%,110%,120%.
1 1 About four times fast than standard. The steps are:
50%,60%,80%,100%,120%.

2.15.5. Function description of the keys and LEDs after calling Subroutine51

Name Function Description


Feed LED1 Indicates Current feed override value:
0%<Current feed override value< 100%: lights;
Current feed override value = 0% : flashing ( 2Hz)
Feed Every press, Current feed override value shifts to the next lower step.
Decrease key The range of the steps is 0% to 120%, and the shift speed depends on
the setting of PLC MD14512[12] bit 4/5.

If press this key and holding on more than X seconds, Current feed
override value shifts to 0% directly. The holding on time X depends on
the setting of PLC MD14510[12].

Feed Press this key and holding on more than Y seconds, Current feed
100% key override value shifts to 100% directly. The holding on time Y depends on
the setting of PLC MD14510[13].

Feed Every press, Current feed override value shifts to the next higher step.
Increase key The range of the steps is 0% to 120%, and the shift speed depends on
the setting of PLC MD14512[12] bit 4/5. .

SINUMERIK 802S/C base line Page: 27 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
Feed LED2 Indicates Current feed override value
100% <Current feed override value <120%: lights;
Current feed override value =120%: flashing.(2Hz)

Spindle LED1 Indicates Current spindle override value


50%< Current spindle override value < 100%: lights;
Current feed override value = 50% : flashing ( 2Hz)

Every press, Current spindle override value shifts to the next lower step.
Spindle
The range of the steps is 50% to 120%, and the shift speed depends on
Decrease key
the setting of PLC MD14512[12] bit 6/7

If press this key and holding on more than P seconds, Current spindle
override value shifts to 0% directly. The holding on time P depends on
the setting of PLC MD14510[12].

Spindle Press this key and holding on more than Q seconds, Current spindle
100% key override value shifts to 100% directly. The holding on time Q depends on
the setting of PLC MD14510[13].
Spindle Every press, Current spindle override value shifts to the next higher step.
Increase key The range of the steps is 50% to 120%, and the shift speed depends on
the setting of PLC MD14512[12] bit 6/7.
Spindle LED2 Indicates Current spindle override value
100% <Current spindle override value <120%: lights;
Current spindle override value =120%: flashing.(2Hz)

______________ Table 3 _________________

2.15.6. Example of calling this subroutine

(1) Set MD14512[12] bit 0 = 0 (Feed and Spindle override controled by trigger user keys.)
Set MD14512[12] bit 2 = 0 (Startup feed override is always 100%)
Set MD14512[12] bit 3 = 0 (Startup spindle override is always 100%)
Set MD14512[12] bit 4/5 =00 ( Feed override standard shift speed.)
Set MD 14512[12] bit6/7 =00 (Spindle override standard shift speed.)
Set MD14510[12] = 10 ( Press and hold on feed/spindle decrease key more than 1
Second, the override shifts to 0% directly.)
Set MD14510[13] = 15 ( Press and hold on feed/spindle 100% key more than 1.5
Second, the override shifts to 100% directly.)

(2) Call this subroutine in OB1

SINUMERIK 802S/C base line Page: 28 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
SINUMERIK 802S/C base line Page: 29 / 41 All right reserved 
PLC Subroutine library Date: 2003-10-14
Sample PLC Application Programs

General Description SAMPLE.PTP is a complete PLC application program, which is built up with the
subroutines from the library. It has 2 main purposes for the SAMPLE:
(1) It is an application program that can be used directly for those turning or
milling machine tools that meet its functions, simply specifying the function
of SAMPLE by PLC machine data.
(2) It is really used as a SAMPLE application. Through this sample, you will
learn how to organize the PLC subroutine library for your own application. It
is also possible to modify this SAMPLE to meet your special requirements,
which are not included in the library.
Like the integrated PLC application in previous software version, all the inputs
and outputs of DIO module 1 (standard package) are buffered via a filter. This
filter brings flexibility for different applications. In the following chapter you will
find the explanation, telling you how the filter works and where inputs and
outputs are buffered. Of course it is possible for you to delete this filter and
address directly inputs and outputs when you would like to modify the SAMPLE.

2.16. Main Functions


PLC Initialization ; Measuring system 1 active
; Feed override to channel and axis active
; Validity of PLC parameter check
; Range of PLC parameter verification (calling SBR31 USR_INI)

Emergency stop ; Emergency stop button processing


control ; Control the timing of T48, T63 and T64 of supply infeed module
; Monitor status signals of infeed module: T72-drive ready and T52-I2t
alarm (these signals will also generated emergency stop)

Processing MCP and ; Operating mode selection


HMI signals ; NC start, stop and reset
; Spindle manual operate control (spindle CW, CCW and Stop)
; Traverse key layout (according PLC parameters)
; Selecting handwheel according to HMI interface (SBR39 HMI_HW)

Axes control ; Axes enable and disable control (including spindle)


; Hardware limitation; single or double hardware limit switch per axis
possible. And also possible for emergency stop chain.
; Reference point cam monitoring. Feedrate override can be inhibited by
PLC MD during reference point approaching
; Rotation monitoring (for stepper drive only) activated by PLC MD
; Motor brake release control

SINUMERIK 802S/C base line Page: 30 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
Contactor controlled ; Spindle enable and disable
spindle (induction ; Spindle manual operation (CW, CCW and Stop in JOG mode)
motor without ; Directly change over from M03 to M04 or from M04 to M03 during
converter) spindle program operation (AUTO or MDA mode). A external brake
signal is automatically output between M03 to M04 changeover.
; External spindle brake control

Analog spindle ; If converter is to be used, setpoint should be +/-10V or 0~10V


control ; For 0~10V converter, Q0.0 is for CW enable and Q0.1 for CCW enable
; For +/-10V converter, its enable should be connected to
X7 Pin65 and Pin 9
; Spindle manual operation (CW, CCW and Stop in JOG mode)
; Spindle program operation (AUTO or MDA mode)

Turret control for ; Suitable for 4 or 6 position Hall Effect Device sensor turret;
turning machine ; Turret clamping time monitoring (time can be specified by PLC MD)
; Turret sensors monitoring
; During turret activate ”read-in disable” and “Feedhold”

Coolant control ; Manual coolant on/off using user key K6 (toggle) in JOG mode
; Program control via M07, M08 and M09
; Coolant level and overload monitoring

Track lubrication ; Manual coolant start once by user key K5 (delayed)


control ; Time interval activated (interval and time specified by PLC MD)

Clamp/Unclamp ; For turning machine, chuck clamping control


; For milling machine, tool release control

Motor brake release ; Combined keys activated by PLC MD to release motor brake during
during drive drive optimization (only for 611U drive with SimoCom U)
optimizing Combined keys:

& Æ Release brake;

& Æ motor braking


; An alarm to warn that motor brake is released during drive optimization

SINUMERIK 802S/C base line Page: 31 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
2.17. Inputs And Outputs Definition Description
Input Signals Description
Signal For turning machine: X100 For milling machine: X100
I0.0 Hardware limit X+ Hardware limit X+
I0.1 Hardware limit Z+ Hardware limit Z+
I0.2 X reference cam X reference cam
I0.3 Z reference cam Z reference cam
I0.4 Hardware limit X - 1) Hardware limit X - 1)
1) 1)
I0.5 Hardware limit Z - Hardware limit Z -
I0.6 Overload (T52 for 802C base line) Overload (T52 for 802C base line)
I0.7 Emergency Stop key Emergency Stop key
Signal For turning machine: X101 For milling machine: X101
I1.0 Tool sensor T1 Spindle low gear in-position
I1.1 Tool sensor T2 Spindle high gear in-position
I1.2 Tool sensor T3 Hardware limit Y +
I1.3 Tool sensor T4 Y reference cam
I1.4 Tool sensor T5 Hardware limit Y - 1)
I1.5 Tool sensor T6 Not defined
I1.6 Over limit release for EMG chain Over limit release for EMG chain
I1.7 Drive ready (T72 for 802C base line) Drive ready (T72 for 802C base line)

Signal For turning machine: X102 For milling machine: X102


I2.0 not defined not defined
I2.1 not defined not defined
I2.2 not defined not defined
I2.3 not defined not defined
I2.4 not defined not defined
I2.5 not defined not defined
I2.6 not defined not defined
I2.7 not defined not defined
Signal For turning machine: X103 For milling machine: X103
I3.0 not defined not defined
I3.1 not defined not defined
I3.2 not defined not defined
I3.3 not defined not defined
I3.4 not defined not defined
I3.5 not defined not defined
I3.6 not defined not defined
I3.7 not defined not defined
Signal For turning machine: X104 For milling machine: X104
I4.0 not defined not defined
I4.1 not defined not defined
I4.2 not defined not defined
I4.3 not defined not defined
I4.4 not defined not defined
I4.5 not defined not defined
I4.6 not defined not defined
I4.7 not defined not defined
Signal For turning machine: X105 For milling machine: X105
I5.0 not defined not defined
I5.1 not defined not defined
I5.2 not defined not defined

SINUMERIK 802S/C base line Page: 32 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
I5.3 not defined not defined
I5.4 not defined not defined
I5.5 not defined not defined
I5.6 not defined not defined
I5.7 not defined not defined
I5.7 not defined not defined

Output Signals Description


Signal For turning machine: X2005 For milling machine: X2005
Q0.0 Spindle CW 3) Spindle CW 3)
3) 3)
Q0.1 Spindle CCW Spindle CCW
Q0.2 Coolant control Coolant control
Q0.3 Lubrication control Lubrication control
Q0.4 Turret CW undefined
Q0.5 Turret CCW undefined
Q0.6 Chuck clamping Tool clamping
Q0.7 Chuck unclamping Tool release
Signal For turning machine: X2006 For milling machine: X2006
Q1.0 undefined Spindle gear level low
Q1.1 undefined Spindle gear level high
Q1.2 undefined undefined
Q1.3 motor brake release Motor brake release
Q1.4 Spindle brake Spindle brake
Q1.5 Supply infeed: T48 Supply infeed: T48
Q1.6 Supply infeed: T63 Supply infeed: T63
Q1.7 Supply infeed: T64 Supply infeed: T64
Note 1: All input signals are treated in SAMPLE as Normal Open (or called positive logic).
If an input is a Normal Close, it should be specified via PLC MD as negative logic.
Note 2:
(1) Undefined when only a single hardware limit switch of each axis.
(2) When a 4 position turret is used, I1.4 and I1.5 not defined;
(3) When an analog spindle wit ±10V setpoint is implemented, Q0.0 and Q0.1not
defined;

IMPORTANT If MD30134=1 / 2, uniploar spindle function active, Q0.0 and


Q0.1 can’t be programed in PLC,they are used by NCK for spindle enable and
direction signals.

SINUMERIK 802S/C base line Page: 33 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
2.18. MCP Key Layout And Label

User keys description


User keys Description
Key For turning machine For milling machine
K1 Feed enable/disable Feed enable/disable
K2 Chuck clamping/unclamping Tool clamping/unclamping
K3 undefined undefined
K4 Manual turret change undefined
K5 Manual lubrication start Manual lubrication start
K6 Manual coolant start/stop Manual coolant start/stop

SINUMERIK 802S/C base line Page: 34 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
K7 Not defined Not defined
K8 Not defined Not defined
K9 Not defined Not defined
K10 Not defined Not defined
K11 Not defined Not defined
K12 Not defined Not defined
LED For turning machine For milling machine
LED1 Drive enabled Drive enabled
LED2 Chuck clamped Tool is clamped
LED3 undefined undefined
LED4 Turret changing undefined
LED5 Lubricating Lubricating
LED6 Cooling Cooling
LED7 Not defined Not defined
LED8 Not defined Not defined
LED9 Not defined Not defined
LED10 Not defined Not defined
LED11 Not defined Not defined
LED12 Not defined Not defined

K22 K23 K24 The layout of the traverse keys can be defined by
Traverse keys PLC machine data from MD14510[26] ~
K25 K26 K27
MD14510[31]. The key K26 is already defined as
K28 K29 K30 rapid overlay key.

SINUMERIK 802S/C base line Page: 35 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
2.19. PLC Machine Data Definition
PLC MD Following PLC MDs are only for SAMPLE. The SAMPLE PLC application is
designed that all inputs & outputs are filtered. And because it is a sample PLC
application, therefore following PLC MDs are defined in the range which are
reserved for customers.

USER_DATA_HEX
MD14512
Machine data PLC Machine Data - Hexadecimal
Index Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Input signals valid (Interface X2003: Terminal 0 ~ 7)
14512[0] I0.7 I0.6 I0.5 I0.4 I0.3 I0.2 I0.1 I0.0

Input signals valid (Interface X2004: Terminal 8 ~ 15)


14512[1] I1.7 I1.6 I1.5 I1.4 I1.3 I1.2 I1.1 I1.0

Input signals negative logic (Interface X2003: Terminal 0 ~ 7)


14512[2] I0.7 I0.6 I0.5 I0.4 I0.3 I0.2 I0.1 I0.0

Input signals negative logic (Interface X2004: Terminal 8 ~ 15)


14512[3] I1.7 I1.6 I1.5 I1.4 I1.3 I1.2 I1.1 I1.0

Output signals valid (Interface X2005: Terminal 0 ~ 7)


14512[4] Q0.7 Q0.6 Q0.5 Q0.4 Q0.3 Q0.2 Q0.1 Q0.0

Output signals valid (Interface X2006: Terminal 8 ~ 15)


14512[5] Q1.7 Q1.6 Q1.5 Q1.4 Q1.3 Q1.2 Q1.1 Q1.0

Output signals negative logic (Interface X2005: Terminal 0 ~ 7)


14512[6] Q0.7 Q0.6 Q0.5 Q0.4 Q0.3 Q0.2 Q0.1 Q0.0

Output signals negative logic (Interface X2006: Terminal 8 ~ 15)


14512[7] Q1.7 Q1.6 Q1.5 Q1.4 Q1.3 Q1.2 Q1.1 Q1.0

Machine Configuration
14512[11] Turret Ana. sp spindle Clamp Lubricat Cooling
active Gear ch. active active active active

Note: the parameter bit =1 means active


Also the standard PLC MDs are valid and will be verified in SRB31 USR_INI to find out
any wrong setting.
MD14512[11] Bit 0 = 1 – PLC subroutine COOLING will be executed
MD14512[11] Bit 1 = 1 – PLC subroutine LUBRICAT will be executed
MD14512[11] Bit 2 = 1 – PLC subroutine LOCK_UNL will be executed
MD14512[11] Bit 3 = 1 – PLC subroutine SPINDLE will be executed

MD14512[11] Bit 6 = 1 – PLC subroutine GEAR_CHG will be executed


MD14512[11] Bit 7 = 1 – PLC subroutine TURRET1 will be executed

Important
PLC machine data described in chapter 1.2.5. should also be
! specified.

SINUMERIK 802S/C base line Page: 36 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
2.20. Description Of SAMPLE Structure
2.20.1. Structure Of SAMPLE Application
MAIN (OB1)
Seq. # SBR # subroutinesl
1 62 Input & output signals filtering (IW0/QW0 → MW100/MW102)
2 32 PLC initialization → SBR31 – customer initialization
3 33 Emergency Stop
4 38 MCP signal process → SBR34 – Traverse key control
SBR39 – Handwheel select via HMI
5 40 XYZ and spindle enable/disable
6 44 Coolant control
7 45 Lubrication control
8 35 Contactor spindle or analog spindle (0~10V or ±10V setpoint )
9 41 Turret control
10 49 Clamping and unclamping control
11 51 User keys/LEDs for override control .

I/O signal processing SAMPLE is designed to meet the different wiring on the machine tools,
i.e. any input can be connected as Normal Open, or Normal Close. All
input and output signals have been filtered by SBR62 FILTER. The I/O
filtering is carried out according to PLC MD14512[0], [1], [2], [3] and
MD14512[4], [5], [6], [7].
Principle of I/O filter with follow chart, it is easily know the correspondence of internal inputs
and outputs. Therefore in SAMPLE M100.0 is a buffered input for I0.0,
and M101.2 is for I1.2; M102.3 is for Q0.3 and M103.4 is for Q1.4, and
so on. All subroutines in LIBRARY are inputs/output independent, i.e.
there is neither hardware I/O nor buffered I/O inside any subroutines.
Any hardware I/O or buffered I/O are addressed in MAIN (OB1).
Input signal processing X2003:
I0.0Æ ÆM100.0
I0.1Æ ÆM100.1
MD14512[2]

MD14512[0]

I0.2Æ ÆM100.2
“XOR”

“AND”

I0.3Æ ÆM100.3
I0.4Æ ÆM100.4
I0.5Æ ÆM100.5
I0.6Æ ÆM100.6
I0.7Æ ÆM100.7
Input signal processing X2004:
I1.0Æ ÆM101.0
I1.1Æ ÆM101.1
MD14512[3]

MD14512[1]

I1.2Æ ÆM101.2
“XOR”

“AND”

I1.3Æ ÆM101.3
I1.4Æ ÆM101.4
I1.5Æ ÆM101.5
I1.6Æ ÆM101.6
I1.7Æ ÆM101.7

SINUMERIK 802S/C base line Page: 37 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
Output signal processing X2005:
M102.0Æ ÆQ0.0
M102.1Æ ÆQ0.1

MD14512[6]

MD14512[4]
M102.2Æ ÆQ0.2

“XOR”

“AND”
M102.3Æ ÆQ0.3
M102.4Æ ÆQ0.4
M102.5Æ ÆQ0.5
M102.6Æ ÆQ0.6
M102.7Æ ÆQ0.7
Output signal processing X2006:
M103.0Æ ÆQ1.0
M103.1Æ ÆQ1.1

MD14512[7]

MD14512[5]
M103.2Æ ÆQ1.2

“XOR”

“AND”
M103.3Æ ÆQ1.3
M103.4Æ ÆQ1.4
M103.5Æ ÆQ1.5
M103.6Æ ÆQ1.6
M103.7Æ ÆQ1.7
Modifications There are 2 possibilities to modify SAMPLE application if your required
functions are not included in it.
(1). If also only one DIO module is configured, simply add any new
subroutines in range from SBR0~SBR30, and call it in MAIN (OB1), and
delete the subroutine call which you do not need from MAIN. In this
case it is very simple to use buffered I/O in MAIN as well as in your own
subroutines.
(2). If you have more DIOs in your system or you would like to address
hardware I/Os directly, simply delete the subroutine call FILTER from
MAIN. Without FILTER all buffered I/Os are no longer valid. You have to
change addressing of all buffered I/O to hardware I/O in MAIN.
Of course if you compose your own PLC application directly from
project file SUBR_LIBRARY_802SC.PTP (a project with an empty
MAIN), you can use hardware I/Os from the beginning.

Important
! All inputs of SAMPLE are defined as NO (high effective). e.g.
I0.7 is defined by SAMPLE as Emergency Stop, I0.7=“1“, is
intepreted as an effective Emergency Stop.
In case if I0.7 is wired as NC, i.e. "0“ is emergency stop, Bit 7
of MD14512[2] must be set to “1“ to inform FILTER.

Important
! In case you compose your own application using the building
blocks provided in SUBR_LIBRARY, please take care of
definition of each input of the subroutine – NO or NC.

SINUMERIK 802S/C base line Page: 38 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
2.20.2. Alarm Text Defined In SAMPLE

Standard alarm messages


Alarm Interface Alarm Description From
# Address SBR #
700016 V16000002.0 DRIVES NOT READY, TOUCH K1 ON MCP 33
2
700017 V16000002.1 I /T ALARM FOR INFEED MODULE
700018 V16000002.2
700019 V16000002.3
700020 V16000002.4
700021 V16000002.5 SPINDLE START IMPOSSIBLE WHILE UNCLAMPED 35
700022 V16000002.6 UNCLAMPING IMPOSSIBLE WHILE SPINDLE RUN 49
700023 V16000002.7 PROGRAMMED TOOL #. > MAX. TURRET ON TURRET# 46
700024 V16000003.0 TOOL NOT FOUND, MONITORING TIME UP
700025 V16000003.1 NO POSITION SIGNALS FROM TURRET
700026 V16000003.2 MOTOR BRAKE RELEASED FOR DRIVE OPTIMIZATION 40
700027 V16000003.3 APPROACH REF. POINT AGAIN AFTER ROT. MONITORING
700028 V16000003.4
700029 V16000003.5
700030 V16000003.6
700031 V16000003.7

Alarm messages defined in SAMPLE


Alarm Interface Alarm Description From
# Address SBR #
700000 V16000000.0 Startup! PLC MD needed, see description of PLC Lib 31
700001 V16000000.1
700002 V16000000.2 X+ traverse keys not defined, check MD14510[26]
700003 V16000000.3 X - traverse keys not defined, check MD14510[27]
700004 V16000000.4 Y+ traverse keys not defined, check MD14510[28]
700005 V16000000.5 Y - traverse keys not defined, check MD14510[29]
700006 V16000000.6 Z+ traverse keys not defined, check MD14510[30]
700007 V16000000.7 Z - traverse keys not defined, check MD14510[31]
700008 V16000001.0 Turret # wrongly defined, MD14510[20] = 4/ 6
700009 V16000001.1 Turret clamping time undefined, check MD14510[21]
700010 V16000001.2 Turret monitoring time undefined, check MD14510[22]
700011 V16000001.3 Spindle brake time out range, check MD14510[23]
700012 V16000001.4 Lubricating interval out range, check MD14510[24]
700013 V16000001.5 Lubricating duration out range, check MD14510[25]
700014 V16000001.6 Inputs undefined, check MD14512[0]&MD14512[1]
700015 V16000001.7 Outputs undefined, check MD14512[4]&MD14512[5]

Note: (1) it is only permitted to configure a turret with 4 or 6 tools by SAMPLE.


(2) The alarms from 700000~700015 are activated in subroutine 31 USR_INI in
the project file SAMPLE.PTP. The same subroutine is empty in library file
SUBR_LIBRARY_802SC.PTP, reserved for you to have your own
initialization.

SINUMERIK 802S/C base line Page: 39 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
2.21. Start-Up Procedure Of Application Program SAMPLE
By first power on there will be one alarm – Alarm 700000 with text:
MA RESET AUTO ROV 700000

Number Del cri C95HP.MPF


700000

Startup! PLC machine data needed, see description


of PLC Lib

Service Start - Machine


Alarm data
display up

Set following PLC machine data or load the toolbox files PLC-MD_T.ini (1) or
PLC-MD_M.ini (2) to set the with (1) or (2) marked PLC-MD):
1. Machine type defined by MD14510[16]. Lathe =0 (1) Milling =1 (2)

2. Define traverse keys according to your machine tool


(1) , (2)
MD14510[26] – X + key Lathe=23
MD14510[27] – X – key Lathe=29 (1) , (2)
MD14510[30] – Z + key Lathe=27 (1) , (2)
MD14510[31] – Z –Key Lathe=25 (1) , (2)
(2)
MD14510[28] – Y + key (if MD14510[16]=1) Milling = 24
(2)
MD14510[29] – Y - key (if MD14510[16]=1) Milling = 28
3. Define the inputs and outputs which are used as well as its wiring type (NO.NC) by
(1)
MD14512[0]&[1] for inputs of DIO1 if all active = FF
(1)
MD14512[4]&[5] for outputs of DIO1 if all active = FF
4. Define the functions you need by MD14512[11]:
Bit 7=1 Turret active for lathe
Bit 6=1 Spindle gear stage change active for milling machine
Bit 3=1 Spindle active
Bit 2=1 Clamping/unclamping active
Bit 1=1 Lubrication active
Bit 0=1 Cooling active
Power on 802S/C base line again, there will be new alarms messages instructing you
the necessary machine data should be specified.
5. If your system (802C base line) equips with 611 drive(s) that are not configured, the
drive ready signal will not be available. The result is you can not release emergency
stop. It is possible for you either to connect a high signal to I1.7 or simply specify
MD14512[16].bit0=1, so that you can quit from emergency stop.
6. Technical setting according to your machine tools by MD 14512[16]/[17]/[18]

Important
You have to specify corresponding NC machine data before
! your machine tool working properly. Please refer to “Start-up
and installation“ guide for detail information

SINUMERIK 802S/C base line Page: 40 / 41 All right reserved 


PLC Subroutine library Date: 2003-10-14
SINUMERIK 802S/C base line Page: 41 / 41 All right reserved 
PLC Subroutine library Date: 2003-10-14

S-ar putea să vă placă și