41
SINUMERIK 802S/C base line Page: 1 / 41 All right reserved PLC Subroutine library Date: 2003-10-14 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.

820SC PLC Subroutine Library

Embed Size (px)

Citation preview

Page 1: 820SC PLC Subroutine Library

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

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.

Page 2: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 2 / 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.

Page 3: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 3 / 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

Page 4: 820SC PLC Subroutine Library

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

Note: All free subroutines between SBR32 and SBR63 are reserved for PLC library

Page 5: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 5 / 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

monitoring activate Spindle config.

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: -

Page 6: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 6 / 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

Page 7: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 7 / 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

SCAN_1ST

EN

PLC_INI

Network 2 Initialization

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

Terminal 64

Terminal 63

Terminal 48

Power off timing Power on timing

t t t t

Page 8: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 8 / 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) T_52 BOOL Terminal 52 of infeed module: I2t 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

ONE

EN

EMG_STOP

Network 3 Emergency Control

DELAYEMG_K

EN_K

T_72

T_52

T_48

T_63

T_64

Q0.0

Q0.1

Q0.2

10

I0.7

V10000000.0

I1.7

I0.6 ERR1

ERR2

V16000002.0

V16000002.1

EN_L V11000000.0

Page 9: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 9 / 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

ONE

EN

X_CROSS

Network 12 Traverse keys control according PLC machine data

Page 10: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 10 / 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

KM1 KM2

M AC Motor

DIO

X2005

Connecting to a contactor spindle

Q0.0Q0.1

KM1 KM2

Page 11: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 11 / 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

X2005

802C ECU

X7

±10V0V

4/56

4/14

Converter

CMD

GND

CW

CCW

COM

Analog setpoint

KA4

KA3

Connecting to a 0~10V analog spindle

Q0.0Q0.1

KA3 KA4

Page 12: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 12 / 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

X3

802S ECU

±10V0V

1

6

Converter

CMD

GND

EN

COM

Analog setpoint

5

9

Internalrelay

Internal relay will beclosed when V38030002.1=1opened when V38030002.1=0

Connecting to a ±10V analog spindle

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

ONE

EN

SPINDLE

Network 12 spindle controlling (contactor, bi-/uni-polar spindle)

DELAY

SP_EN

KEYcw

KEYccw

KEYstop

SP_cw

SP_ccw

SP_brak

Q0.0

Q0.1

Q0.2

50

SM0.0

V10000001.4

V10000001.6

V10000001.5

SP_LED

ERROR

Q0.3

Q0.4

UNI_POZERO

T_64SM0.0

Page 13: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 13 / 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

ONE

EN

MINI_HHU

Network 6 Mini-Hand Held Unit control

NODEF

ENABLE

AX_AAX_B

KEY_Tp

KEY_Tn

0

I1.3

I1.0

I1.1

I1.3

I1.4KEY_R

INC1INC10

I1.5

I0.5I0.6

INC100I0.7

AX_CI1.2

Page 14: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 14 / 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

ONE

EN

MCP_NCK

Network 4 Processing MCP signals from V1000 and activating corresponding functions

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

ONE

EN

HMI_HWL

Network 5 Selection handwheel according interface area V1900 1xxx

Page 15: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 15 / 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).

Input to_3LMTp

Input to_2LMTp

Input to_1LMTp

Encoding of HW limit switchE_Key _1LMTp _2LMTp _3LMTp Direction

Hardware limitReached

0 1 1 1 - Only Emg. Stop0 0 1 1 V39000004.7 1st + over limit0 0 1 1 V39000004.6 1st - over limit0 0 0 1 V39010004.7 2nd + over limit0 0 0 1 V39010004.6 2nd - over limit0 0 0 0 V39020004.7 3rd + over limit0 0 0 0 V39020004.6 3rd - over limit

3rd axis switch

2nd axis switch

1st axis switch

EmergencyStop

KA1

24Vdc

InputE_Key

Terminal 9

Terminal 64: control enable of Infeed module

KA1

Note: In case of EMERGENCY STOP or any of thehardware limits are reached, Terminal 64 switchesand Terminal 9 are disconnected by hardware.

Releasebutton

Input toOVLrel

0 V

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) * _1LMTn BOOL 1st axis hardware limit minus (NC) _1REF BOOL 1st axis reference point cam (NO) _2LMTp BOOL 2nd axis hardware limit plus (NC) * _2LMTn BOOL 2nd axis hardware limit minus (NC) _2REF BOOL 2nd axis reference point cam (NO) _3LMTp BOOL 3rd axis hardware limit plus (NC) * _3LMTn BOOL 3rd axis hardware limit minus (NC) _3REF BOOL 3rd 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.

Page 16: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 16 / 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

ONE

EN

AXIS_CTL

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

NODEFT_64

T_63

OPTM

_1LMTp

_1LMTn

_BRK Q0.30

Q0.2

Q0.1

ZERO

I0.1

I0.2_1REF

_2LMTp

_2LMTn

I0.7

I0.4

I0.5

MSG1 NULL_b

MSG2 NULL_b

_2REF

_3LMTp

_3LMTn

_3REF

I1.0

I0.5

I0.6

I1.1

OVLrelZERO

SPADV45001016.1

Page 17: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 17 / 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 is in range of 1st 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.

Page 18: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 18 / 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 rev/s2 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

ONE

EN

GEAR_CHG

Network 18 Analog spindle gear change (2 gear stages)

D_CHGD_MON

D_S0

S_hold

LGo Q1.02

30

5

ONE

HGo Q1.1

LG_in V11000000.0

S_alarmZEROHG_in V11000000.2

LGiI1.0

HGiI1.1

Page 19: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 19 / 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

ONE

EN

COOLING

Network 16 Cooling control

NODEFC_key

OVload

C_low

C_out Q0.20

V10000000.5

I1.6

ZERO

C_LED V11000000.5

ERR1 NULL_b

C_disZERO

ERR2 NULL_b

Page 20: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 20 / 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

ONE

EN

LUBRICAT

Network 8 Lubrication by interval specified by MD14510[24] and duration by MD14510[25]

Lintv

Ltime

L_key

L1st

OVloadL_low

L_out

L_LEDQ4.5M_LED_CK5

MD_INT_24

MD_INT_25

P_M_USER_K5

ONE

I8.7

I8.6

ERR1 V16000002.4

ERR2 V16000002.5

Page 21: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 21 / 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

T1

Target T3 Clamp time

Start T6

Target T4 Clamp time

CW

CW CCW

CW CCW

Off

Motor

CCW

T1

T2

T3

T4

T5

Tool Pos.

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

Page 22: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 22 / 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

ONE

EN

TURRET1

Network 9 HED turret control

TmaxC_time

T_01

T_02

T_03

T_04

T_cw Q5.06MD_INT_22

I7.0

I7.1

I7.2

I7.3

T_05

T_06

T_key

I7.4

I7.5

P_M_USER_K4

T_ccw Q5.1

T_LED M_LED_CK4

OVloadI7.6

M_timeMD_INT_21

T_07

T_08

ZERO

ZERO

ERR1 NULL_b

ERR2 NULL_b

ERR3 NULL_b

ERR4 NULL_b

Page 23: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 23 / 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.

# Curr.Pos.

Prog.Pos.

pre-indPos

Dir.

1 7 2 1 CCW2 7 5 6 CW3 3 8 1 CW4 1 4 3 CCW5 6 8 7 CCW

1

5

37

6

2

4

8

Current pos.

Examples CCW

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

ONE

EN

TOOL_DIR

Network 9 Make out the direction of turret as well as pre-indexing position

TmaxPnum

Pcurr

P_INDEXo P_INDEXo12P_C_TFUNC

T_CURRENT

DIR M20.1

Page 24: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 24 / 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

ONE

EN

LOCK_UNL

Network 16 Chuck clamping/unclamping control

DELAYCONF

KEY

EX_K

RELo Q0.650

ZERO

V10000000.1

I1.6

CLPo Q0.7

C_ind V11000000.1

S_VELOONE

ERR1 NULL_b

ERR2 NULL_b

CLPiONE

Page 25: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 25 / 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. __________________________________________________________________________

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

Spindle Override switch

Feed Override switch

Feed Decrease key

Feed 100% key

Feed Increase key

Feed LED2

Feed LED1

Spindle LED2

Spindle Increase key

Spindle 100% key

Spindle

Spindle LED1

Page 26: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 26 / 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%

Page 27: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 27 / 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 Decrease key

Every press, Current feed override value shifts to the next lower step. 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 100% key

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

Feed Increase key

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

Page 28: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 28 / 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)

Spindle Decrease key

Every press, Current spindle override value shifts to the next lower step. The range of the steps is 50% to 120%, and the shift speed depends on 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 100% key

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

Spindle Increase key

Every press, Current spindle override value shifts to the next higher step. 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

Page 29: 820SC PLC Subroutine Library

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

Page 30: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 30 / 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 control

Emergency stop button processing 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 HMI signals

Operating mode selection 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

Page 31: 820SC PLC Subroutine Library

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

Contactor controlled spindle (induction motor without converter)

Spindle enable and disable Spindle manual operation (CW, CCW and Stop in JOG mode) Directly change over from M03 to M04 or from M04 to M03 during

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 control

If converter is to be used, setpoint should be +/-10V or 0~10V 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 turning machine

Suitable for 4 or 6 position Hall Effect Device sensor turret; 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 control

Manual coolant start once by user key K5 (delayed) 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 during drive optimizing

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

& Release brake;

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

Page 32: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 32 / 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) I0.5 Hardware limit Z - 1) Hardware limit Z - 1) 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

Page 33: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 33 / 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) Q0.1 Spindle CCW 3) Spindle CCW 3) 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.

Page 34: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 34 / 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

Page 35: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 35 / 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

Traverse keys K22 K23 K24

K25 K26 K27

K28 K29 K30

The layout of the traverse keys can be defined by PLC machine data from MD14510[26] ~

MD14510[31]. The key K26 is already defined as rapid overlay key.

Page 36: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 36 / 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.

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

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.

Page 37: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 37 / 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

SBR34 – Traverse key control 4 38 MCP signal process → 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 I0.2 M100.2 I0.3 M100.3 I0.4 M100.4 I0.5 M100.5 I0.6 M100.6 I0.7

“XO

R”

M

D14

512[

2]

“AN

D”

M

D14

512[

0]

M100.7 Input signal processing X2004:

I1.0 M101.0 I1.1 M101.1 I1.2 M101.2 I1.3 M101.3 I1.4 M101.4 I1.5 M101.5 I1.6 M101.6 I1.7

“XO

R”

M

D14

512[

3]

“AN

D”

MD

1451

2[1]

M101.7

Page 38: 820SC PLC Subroutine Library

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

Output signal processing X2005: M102.0 Q0.0 M102.1 Q0.1 M102.2 Q0.2 M102.3 Q0.3 M102.4 Q0.4 M102.5 Q0.5 M102.6 Q0.6 M102.7

“XO

R”

M

D14

512[

6]

“AN

D”

MD

1451

2[4]

Q0.7 Output signal processing X2006:

M103.0 Q1.0 M103.1 Q1.1 M103.2 Q1.2 M103.3 Q1.3 M103.4 Q1.4 M103.5 Q1.5 M103.6 Q1.6 M103.7

“XO

R”

M

D14

512[

7]

“AN

D”

MD

1451

2[5]

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.

Page 39: 820SC PLC Subroutine Library

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

2.20.2. Alarm Text Defined In SAMPLE Standard alarm messages

Alarm #

Interface Address

Alarm Description From SBR #

700016 V16000002.0 DRIVES NOT READY, TOUCH K1 ON MCP 700017 V16000002.1 I2/T ALARM FOR INFEED MODULE

33

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# 700024 V16000003.0 TOOL NOT FOUND, MONITORING TIME UP 700025 V16000003.1 NO POSITION SIGNALS FROM TURRET

46

700026 V16000003.2 MOTOR BRAKE RELEASED FOR DRIVE OPTIMIZATION 700027 V16000003.3 APPROACH REF. POINT AGAIN AFTER ROT. MONITORING

40

700028 V16000003.4 700029 V16000003.5 700030 V16000003.6 700031 V16000003.7

Alarm messages defined in SAMPLE

Alarm #

Interface Address

Alarm Description From SBR #

700000 V16000000.0 Startup! PLC MD needed, see description of PLC Lib 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]

31

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.

Page 40: 820SC PLC Subroutine Library

SINUMERIK 802S/C base line Page: 40 / 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

Number Del cri C95HP.MPF

AlarmServicedisplay

Start - up

Machinedata

700000

Startup! PLC machine data needed, see description of PLC Lib

700000

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 MD14510[26] – X + key Lathe=23 (1) , (2) MD14510[27] – X – key Lathe=29 (1) , (2) MD14510[30] – Z + key Lathe=27 (1) , (2) MD14510[31] – Z –Key Lathe=25 (1) , (2) MD14510[28] – Y + key (if MD14510[16]=1) Milling = 24 (2) MD14510[29] – Y - key (if MD14510[16]=1) Milling = 28 (2)

3. Define the inputs and outputs which are used as well as its wiring type (NO.NC) by MD14512[0]&[1] for inputs of DIO1 if all active = FF (1) MD14512[4]&[5] for outputs of DIO1 if all active = FF (1)

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

Page 41: 820SC PLC Subroutine Library

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