Siemens SINUMERIK 808D Operating Instructions Manual

Siemens SINUMERIK 808D Operating Instructions Manual

Plc subroutines manual
Hide thumbs Also See for SINUMERIK 808D:
Table of Contents

Advertisement

Quick Links

PLC Subroutines Manual

SINUMERIK
SINUMERIK 808D
PLC Subroutines Manual
Operating Instructions
Valid for:
SINUMERIK 808D Turning (software version: V4.4.2)
SINUMERIK 808D Milling (software version: V4.4.2)
Target group:
OEM engineers
12/2012
6FC5397-2EP10-0BA0

___________________
Preface
___________________
Overview
___________________
PLC Programming Tool
Descriptions of the PLC
___________________
subroutines
Use of user alarms in the
___________________
PLC subroutines
___________________
PLC sample applications
1
2
3
4
5

Advertisement

Table of Contents
loading

Summary of Contents for Siemens SINUMERIK 808D

  • Page 1 SINUMERIK 808D Use of user alarms in the ___________________ PLC Subroutines Manual PLC subroutines ___________________ PLC sample applications Operating Instructions Valid for: SINUMERIK 808D Turning (software version: V4.4.2) SINUMERIK 808D Milling (software version: V4.4.2) Target group: OEM engineers 12/2012 6FC5397-2EP10-0BA0...
  • Page 2 Note the following: WARNING Siemens products may only be used for the applications described in the catalog and in the relevant technical documentation. If products and components from other manufacturers are used, these must be recommended or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and maintenance are required to ensure that the products operate safely and without any problems.
  • Page 3: Preface

    Preface SINUMERIK 808D documentation The SINUMERIK 808D documentation consists of the following components: ● Operating Instructions – Mechanical Installation Manual – Electrical Installation Manual – PLC Subroutines Manual – Function Manual – Parameter Manual ● Diagnostics Manual ● Commissioning Manual ●...
  • Page 4 The EC Declaration of Conformity for the EMC Directive can be found on the Internet at http://support.automation.siemens.com Here, enter the number 15257461 as the search term or contact your local Siemens office. Licensing provisions The SINUMERIK 808D software is protected by national and international copyright laws and agreements.
  • Page 5: Table Of Contents

    Table of contents Preface ..............................3 Overview..............................7 PLC Programming Tool ........................... 11 Installing the 808D Toolbox ......................11 PLC instructions...........................12 Data management ........................13 Program organization........................13 Testing and monitoring your program..................14 Establishing a connection with the RS232 interface..............17 PLC application Download/Upload/Copy/Compare ..............22 Descriptions of the PLC subroutines......................
  • Page 6 Table of contents 3.21 Subroutine 48 - ServPlan (service plan) ..................55 3.22 Subroutine 49 - GearChg1_Auto (automatic spindle gear change) ..........56 3.23 Subroutine 50 - GearChg2_Virtual (virtual spindle gear change) ..........57 3.24 Subroutine 51 - Turret1_HED_T (turret with Hall effect device position sensor) ......58 3.25 Subroutine 52 - TURRET2_BIN_T (turret with binary coding function) ........
  • Page 7: Overview

    The system resources can be distributed into three parts: ● PLC system – Inputs I0.0 to I2.7 (24 inputs of the SINUMERIK 808D) I3.0 to I8.7 (distributed 48 inputs) – Outputs Q0.0 to Q1.7 (16 inputs of the SINUMERIK 808D) Q2.0 to Q5.7 (distributed 32 outputs)
  • Page 8 Overview ● PLC Programming Tool – Symbol table: SYM1 to SYM32 (32 symbol tables) – Subroutine: SBR0 to SBR63 (64 subroutines) Structure of the symbol tables The PLC subroutine library has been designed with symbol addressing method, which helps you easily understand the PLC programs. All the addresses in the subroutine library use symbols for programming.
  • Page 9 Overview Subroutine No. Name Description PLC_ini_USR_INI Reserved for the initialization by the manufacturer (this subroutine is automatically called by subroutine 32) PLC_INI PLC initialization EMG_STOP Emergency Stop MCP_NCK Signals from the MCP and the HMI are sent to NCK interfaces MCP_Tool_Nr Display tool numbers via the LED of the MCP HANDWHL...
  • Page 10 The decimal point of the 7 SEG LED 2. Note Interfaces where nothing has been entered are reserved for the next version. You can understand the relationship between the PLC interface addresses and the SINUMERIK 808D MCP from the illustration below: PLC Subroutines Manual Operating Instructions, 12/2012, 6FC5397-2EP10-0BA0...
  • Page 11: Plc Programming Tool

    PLC Programming Tool Installing the 808D Toolbox You must install the 808D Toolbox on your PC/PG. The 808D Toolbox contains the following software tools or information: ● Config Data 808D – System software update – Examples (EasyXLanguage, symbols for MCP customized keys, template for MCP strips, PLC subroutine library) ●...
  • Page 12: Plc Instructions

    PLC Programming Tool 2.2 PLC instructions PLC instructions Various instructions are available in the PLC Programming Tool. You can view them in the instruction branch on the instruction tree: You can right-click over an instruction or directly press the F1 key to view its help information.
  • Page 13: Data Management

    PLC Programming Tool 2.3 Data management Data management The data can be broken down into three areas: ● non-retentive data ● retentive data ● machine data for the PLC (this machine data is all active at POWER ON) Most data, such as the process image, timers, and counters are non-retentive and are cleared each time the control system is restarted.
  • Page 14: Testing And Monitoring Your Program

    Testing and monitoring your program You can check or perform an error analysis of the user program in two methods: ● The HMI of the SINUMERIK 808D ● The PLC Programming Tool Testing and monitoring a PLC program with the HMI There are three ways for program testing and monitoring in the "SYSTEM"...
  • Page 15 PLC Programming Tool 2.5 Testing and monitoring your program By default, three signal status lists (inputs, flags and outputs) are displayed in three columns. You can change column sequence or assign a new signal status list (variables) with the "Edit pad"...
  • Page 16 Testing and monitoring a PLC program with the PLC Programming Tool You can also view the status of your PLC program with the PLC Programming Tool: 1. Establish the communication between the SINUMERIK 808D and the PLC Programming Tool. For detailed information about the establishment of the communication between the SINUMERIK 808D and the PLC Programming Tool, refer to section "Establishing a...
  • Page 17: Establishing A Connection With The Rs232 Interface

    You can activate the connection with the HMI: "SYSTEM" operating area > "PLC" > "STEP 7 connect" > "Connect. ON": Use the <SELECT> key to select a communication baud rate. The SINUMERIK 808D supports the following baud rates: ● 9.6 kbps ●...
  • Page 18 PLC Programming Tool 2.6 Establishing a connection with the RS232 interface ● 115.2 kbps. The active or inactive state is retained even after a power-on (except when starting with the default data). An active connection is displayed by a symbol in the status bar: Communication settings in the PLC Programming Tool To setup the PPI parameters in the PLC Programming Tool, proceed as follows: 1.
  • Page 19 PLC Programming Tool 2.6 Establishing a connection with the RS232 interface 2. Double click on the "Access point" symbol in the "Communication" window on the right side: The "Set PG/PC Interface" dialog is displayed as follows: 3. Check the PG/PC interface being used. For RS232 communication, you must assign the interface "PLC802(PPI)"...
  • Page 20 PLC Programming Tool 2.6 Establishing a connection with the RS232 interface 4. Double click the interface "PLC802(PPI)" or right-click the "Properties" button, and the property dialog is displayed. Set the baud rate for the transmission rate, which the PLC Programming Tool will use to communicate: NOTE: The baud rate you select must be in accordance with what you have set on the controller side.
  • Page 21 PLC Programming Tool 2.6 Establishing a connection with the RS232 interface 7. On the right of the "Communications Setup" dialog box, click the blue text "Double-Click to Refresh". It will take several minutes to search for a valid address: 8. Wait until the icon "808D-PPU14x, Address 2" displays as below, and then the connection is ready: Note You must activate the connection on the control via the HMI ("SYSTEM"...
  • Page 22: Plc Application Download/Upload/Copy/Compare

    PLC Programming Tool 2.7 PLC application Download/Upload/Copy/Compare PLC application Download/Upload/Copy/Compare You can save, copy or over-write the PLC project or the PLC applications in the control system. This is possible using: ● the PLC Programming Tool ● a USB stick A PLC project contains the PLC user program, including all of the important information (symbols, comments, ...).
  • Page 23 PLC Programming Tool 2.7 PLC application Download/Upload/Copy/Compare 3. Click "OK" to proceed directly. You can also select the checkbox "Data Blocks (only actual values)" to include the actual values of the data blocks, and then click "OK": 4. Either select to download the PLC application when the PLC is in the RUN mode (the "Download in RUN mode"...
  • Page 24 PLC Programming Tool 2.7 PLC application Download/Upload/Copy/Compare 5. The download starts and it will take several seconds to do it. 6. The download finishes when the message below appears, Click "OK" to end your operations: Note If you have chosen to download when the PLC is in the STOP mode, you can place the PLC at RUN mode again with the PLC Programming Tool (click button To download an OEM PLC application with an USB stick, perform as follows: 1.
  • Page 25 PLC Programming Tool 2.7 PLC application Download/Upload/Copy/Compare Upload You can backup a PLC application from the permanent memory of the control system using the PLC Programming Tool or an USB stick. To upload a PLC application using the PLC Programming Tool, proceed as follows: 1.
  • Page 26 PLC Programming Tool 2.7 PLC application Download/Upload/Copy/Compare 3. Use the menu command "File > Upload..." or click the upload button to start the upload, and the upload dialog pops up: 4. Click the "OK" button. 5. An information dialog appears saying "Uploading will replace the contents of the selected project components and unsaved changes will be lost.
  • Page 27 PLC Programming Tool 2.7 PLC application Download/Upload/Copy/Compare 8. Click "OK" and you can view the upload result: To upload a PLC application using an USB stick, proceed as follows: 1. Insert the USB stick into the USB interface at the front of the PPU. 2.
  • Page 28 PLC Programming Tool 2.7 PLC application Download/Upload/Copy/Compare 6. Create an empty PLC application with the PLC Programming Tool: 7. Import the .pte file from the USB stick using the menu command "File > Import...": 8. Click "Open" button or double-click on the .pte file. 9.
  • Page 29 PLC Programming Tool 2.7 PLC application Download/Upload/Copy/Compare 10. After successfully importing the PLC application, you can view the imported result: Compare You can compare the project in the PLC Programming Tool with the project on the control system by using the menu command "PLC > Compare...": Press the "Begin"...
  • Page 30 PLC Programming Tool 2.7 PLC application Download/Upload/Copy/Compare Version display Call up via the "SYSTEM" operating area > "Serv. displ." > "Version" ● PLC application The transferred project that is active in the working memory of the PLC after the control system has started up.
  • Page 31: Descriptions Of The Plc Subroutines

    Descriptions of the PLC subroutines PLC machine data Table 3- 1 USER_DATA_INT Unit Description 14510 [12] Layout of the traverse keys 14510 [13] 0.1s Time for spindle braking 14510 [20] The maximum number of tool bits 14510 [21] 0.1s Turret clamping time 14510 [22] 0.1s Monitoring time for searching a tool...
  • Page 32: Conventions For The Symbols Used In The Subroutines

    =, +, -, [ ], etc. Symbol tables 1 to 2 The symbol tables 1 to 2 are for the manufacturer-defined SINUMERIK 808D I/O. Here you can define input/output tables for your machines. Symbol tables 3 to 5, 7 to 13 These ten symbol tables are reserved for the subroutines.
  • Page 33 Descriptions of the PLC subroutines 3.2 Conventions for the symbols used in the subroutines Symbol table 6: MANMACH This symbol table is for the function of a manual machine. Symbol table 14: ASUP This symbol table is for the ASUP function. It defines the start, operating results and other properties of the ASUP function.
  • Page 34: Subroutine 20 - Aux_Mcp (Machine Auxiliary Functions)

    The symbol table 29 defines all the user data (128 byte, retentive) used in the standard subroutines. Symbol table 30: SPC_MEM The symbol table 30 defines the seven special memories of the SINUMERIK 808D (SM0.0 to SM0.6). Symbol table 31: SBR_MEM The symbol table 31 defines the memories used in the standard subroutines.
  • Page 35: Subroutine 21 - Aux_Lamp (Working Lamp)

    Descriptions of the PLC subroutines 3.4 Subroutine 21 - AUX_LAMP (working lamp) Subroutine 21 - AUX_LAMP (working lamp) Purpose Subroutine 21 is used to control working lamp and can be called in AUX_MCP. One-time pressing of the "LAMP" key activates the working lamp while double pressing de-activates the working lamp.
  • Page 36: Subroutine 23 - Aux_Chip (Chip Remover)

    Descriptions of the PLC subroutines 3.6 Subroutine 23 - AUX_CHIP (chip remover) Example for calling subroutine 22 Subroutine 23 - AUX_CHIP (chip remover) Purpose Subroutine 23 is used to control chip remover and can be called in AUX_MCP. At first-time pressing of the "Chip Forward"...
  • Page 37: Subroutine 31 - Plc_Ini_Usr_Ini (User Initialization)

    Descriptions of the PLC subroutines 3.7 Subroutine 31 - PLC_ini_USR_ini (user initialization) Subroutine 31 - PLC_ini_USR_ini (user initialization) Purpose Subroutine 31 is used for user initialization and can be called in subroutine PLC_INI. Since the subroutine PLC_INI can be called only during the first PLC cycle, the subroutine PLC_ini_USER_ini can be called also only during the first PLC cycle.
  • Page 38: Subroutine 33 - Emg_Stop

    Descriptions of the PLC subroutines 3.9 Subroutine 33 - EMG_STOP Example for calling subroutine 32 Subroutine 33 - EMG_STOP NOTICE Do check whether this subroutine complies with relevant safety requirements or not. Purpose Subroutine 33 handles the Emergency Stop. Pressing down the Emergency Stop button produces an emergency stop alarm and disables the 65 enable signal for SINAMICS V60.
  • Page 39: Subroutine 37 - Mcp_Nck (Mcp And Hmi Signal Processing)

    Descriptions of the PLC subroutines 3.10 Subroutine 37 - MCP_NCK (MCP and HMI signal processing) Table 3- 4 Outputs Variable Type Description Drv1_En65 BOOL 65 enable signal of the first SINAMICS V60 Drv2_En65 BOOL 65 enable signal of the second SINAMICS V60 Drv3_En65 BOOL 65 enable signal of the third SINAMICS V60...
  • Page 40: Subroutine 38 - Mcp_Tool_Nr (Display Tool Number On The Mcp)

    Descriptions of the PLC subroutines 3.11 Subroutine 38 - MCP_Tool_Nr (display tool number on the MCP) Local variable definition None Assigned global variables None Example for calling subroutine 37 3.11 Subroutine 38 - MCP_Tool_Nr (display tool number on the MCP) Purpose Subroutine 38 is used to display active tool number (<...
  • Page 41: Subroutine 39 - Handwhl (Selecting A Handwheel According To Hmi Interface Signals)

    Descriptions of the PLC subroutines 3.12 Subroutine 39 - HANDWHL (selecting a handwheel according to HMI interface signals) 3.12 Subroutine 39 - HANDWHL (selecting a handwheel according to HMI interface signals) Purpose Subroutine 39 is used to select one of the two handwheels to control an axis (X, Y or Z) in the machine coordinate system or the workpiece coordinate system according to the HMI signals.
  • Page 42: Subroutine 40 - Axis_Ctl (Controlling The Spindle And Axes)

    Descriptions of the PLC subroutines 3.13 Subroutine 40 - AXIS_CTL (controlling the spindle and axes) 3.13 Subroutine 40 - AXIS_CTL (controlling the spindle and axes) Purpose Subroutine 40 is used to control the drive pulse enable (DB380xDBX4001.7) and controller enable (DB380xDBX2.1), monitoring the hardware limits and the reference cam signals, and controlling the enable signal for the spindle according to a spindle command (for example, SPINDLE CW, SPINDLE CCW, Mo3, M04, SPOS, etc.).
  • Page 43 Descriptions of the PLC subroutines 3.13 Subroutine 40 - AXIS_CTL (controlling the spindle and axes) Encoding the hardware limit switches Result E_Key _1LMTp _2LMTp _3LMTp Direction EMERGENCY STOP active DB3900.DBX4.7 1st + over limit DB3900.DBX4.6 1st - over limit DB3901.DBX4.7 2nd + over limit DB3901.DBX4.6 2nd - over limit...
  • Page 44 The PLC does not need to process the drive ready signals and alarm signals received from the SINAMICS V60 because the SINUMERIK 808D has already processed these signals. The hardware limit + is used for the input if there is only one hardware limit switch or when the hardware solution is used.
  • Page 45: Subroutine 41 - Mini_Hhu (Handwheel Hand-Held Unit)

    Descriptions of the PLC subroutines 3.14 Subroutine 41 - MINI_HHU (handwheel hand-held unit) Example for calling subroutine 40 3.14 Subroutine 41 - MINI_HHU (handwheel hand-held unit) Purpose Subroutine 41 is used to support the customer's handheld units. With a handheld unit, you can assign the handwheels to X axis, Y axis and Z axis, and select incremental override X1, X10, X100 at the same time.
  • Page 46 Descriptions of the PLC subroutines 3.14 Subroutine 41 - MINI_HHU (handwheel hand-held unit) Example for calling subroutine 41 PLC Subroutines Manual Operating Instructions, 12/2012, 6FC5397-2EP10-0BA0...
  • Page 47: Subroutine 42 - Spindle (Spindle Control)

    Descriptions of the PLC subroutines 3.15 Subroutine 42 - SPINDLE (spindle control) 3.15 Subroutine 42 - SPINDLE (spindle control) Purpose Subroutine 42 is used for spindle control, including the spindle braking function. When the braking function is activated, in the JOG mode press the "SPINDLE LEFT" key or "SPINDLE RIGHT"...
  • Page 48: Subroutine 43 - Meas_Jog (Measurement In The Jog Mode)

    Descriptions of the PLC subroutines 3.16 Subroutine 43 - MEAS_JOG (measurement in the JOG mode) Example for calling subroutine 42 3.16 Subroutine 43 - MEAS_JOG (measurement in the JOG mode) Purpose Subroutine 43 is used to process the information from the measuring probe and to realize the "measuring in the JOG mode"...
  • Page 49: Subroutine 44 - Cooling (Cooling Control)

    Descriptions of the PLC subroutines 3.17 Subroutine 44 - COOLING (cooling control) RES_MEASJOG M241.4 Reset Meas_JOG ESC_MEASJOG M241.5 Interrupt Meas_JOG DRY_MEASJOG M241.6 Dry run Meas_JOG SBL_MEASJOG M241.7 Single block Meas_JOG Relevant PLC machine data None Example for calling subroutine 43 3.17 Subroutine 44 - COOLING (cooling control) Purpose...
  • Page 50 Descriptions of the PLC subroutines 3.17 Subroutine 44 - COOLING (cooling control) Table 3- 11 Outputs Name Type Description C_out BOOL Coolant output C_LED BOOL Coolant status display Assigned global variables COOLon MB150.0 Coolant on/off status Relevant PLC machine data None Example for calling subroutine 44 PLC Subroutines Manual...
  • Page 51: Subroutine 45 - Lubricat (Control Of Lubricate)

    Descriptions of the PLC subroutines 3.18 Subroutine 45 - LUBRICAT (control of lubricate) 3.18 Subroutine 45 - LUBRICAT (control of lubricate) Purpose Subroutine 45 is used to control the lubrication according to specific time interval and duration (independent of the distance that the axis has travelled). Meanwhile, a manual button is available to start the lubrication, and you can configure that the lubrication starts automatically each time that the machine is powered up.
  • Page 52: Subroutine 46 - Pi_Service (Asynchronous Subroutine Program)

    Note Important! The SINUMERIK 808D provides two user ASUPs. In the sample application, ASUP1 is used for manual tool change and ASUP2 is used for the MANUAL MACHINE of the workpiece on a turning machine with the Manual Machine Plus function.
  • Page 53 Descriptions of the PLC subroutines 3.19 Subroutine 46 - PI_SERVICE (Asynchronous Subroutine Program) Local variable definition Table 3- 15 Inputs Name Type Description ASUP1_trigger BOOL Calling the ASUP1, rising edge active ASUP2_trigger BOOL Calling the ASUP1, rising edge active Table 3- 16 Outputs Name Type...
  • Page 54: Subroutine 47 - Plc_Select_Pp (Plc Selects A Subroutine)

    Descriptions of the PLC subroutines 3.20 Subroutine 47 - PLC_Select_PP (PLC selects a subroutine) 3.20 Subroutine 47 - PLC_Select_PP (PLC selects a subroutine) Purpose Subroutine 47 is used to select a part program. You firstly need to create a PLC program-calling table, and assign a program index to each part program in this table.
  • Page 55: Subroutine 48 - Servplan (Service Plan)

    Subroutine 48 - ServPlan (service plan) Purpose To use subroutine 48, you must have created a service plan on the SINUMERIK 808D. When the pre-alarm time arrives, the machine outputs a notification message. When the final alarm time arrives, the machine outputs an alarm message.
  • Page 56: Subroutine 49 - Gearchg1_Auto (Automatic Spindle Gear Change)

    Descriptions of the PLC subroutines 3.22 Subroutine 49 - GearChg1_Auto (automatic spindle gear change) 3.22 Subroutine 49 - GearChg1_Auto (automatic spindle gear change) Purpose Subroutine 49 is used to automatically change the gear for the analog spindle with 2-level gear detection signals. During a gear change, the spindle oscillates and the PLC outputs the gear change signal.
  • Page 57: Subroutine 50 - Gearchg2_Virtual (Virtual Spindle Gear Change)

    Descriptions of the PLC subroutines 3.23 Subroutine 50 - GearChg2_Virtual (virtual spindle gear change) Req_SP_G_ BOOL M244.0 Request for spindle gear change Req_Low_G BOOL M244.1 Request to change to the low gear stage Req_Hign_G BOOL M244.2 Request to change to the high gear stage D_S0 TIMER Spindle stop delay...
  • Page 58: Subroutine 51 - Turret1_Hed_T (Turret With Hall Effect Device Position Sensor)

    Descriptions of the PLC subroutines 3.24 Subroutine 51 - Turret1_HED_T (turret with Hall effect device position sensor) Assigned global variables None Relevant PLC machine data None Example for calling subroutine 50 3.24 Subroutine 51 - Turret1_HED_T (turret with Hall effect device position sensor) Purpose Subroutine 51 is used to control the turret with a Hall effect device positioning sensor, and...
  • Page 59 Descriptions of the PLC subroutines 3.24 Subroutine 51 - Turret1_HED_T (turret with Hall effect device position sensor) This subroutine can activate the following alarms: ● Alarm 700022: Turret motor overload ● Alarm 700023: Programmed tool number higher than the max. tool number of the turret ●...
  • Page 60 Descriptions of the PLC subroutines 3.24 Subroutine 51 - Turret1_HED_T (turret with Hall effect device position sensor) Assigned global variables T_cw_m M156.0 Position marking for turret CW rotation T_ccw_m M156.1 Position marking for turret CCW rotation CcwDelay M156.2 Turret CCW rotation delay K_active M156.3 Manual key active...
  • Page 61: Subroutine 52 - Turret2_Bin_T (Turret With Binary Coding Function)

    Descriptions of the PLC subroutines 3.25 Subroutine 52 - TURRET2_BIN_T (turret with binary coding function) 3.25 Subroutine 52 - TURRET2_BIN_T (turret with binary coding function) Purpose Subroutine 52 is used to control the turret with encoder positioning signals and function of dual-direction adjacent tool change.
  • Page 62 Descriptions of the PLC subroutines 3.25 Subroutine 52 - TURRET2_BIN_T (turret with binary coding function) Table 3- 27 Outputs Name Type Description T_cw BOOL Turret CW rotation output T_ccw BOOL Turret CCW rotation output Magent BOOL Turret clamping output T_LED BOOL Status display during the tool change ERR1...
  • Page 63: Subroutine 53 - Turret3_Code_T (Tool Change Control For Turret With Coding Function)

    Descriptions of the PLC subroutines 3.26 Subroutine 53 - Turret3_CODE_T (tool change control for turret with coding function) Example for calling subroutine 52 3.26 Subroutine 53 - Turret3_CODE_T (tool change control for turret with coding function) Purpose Subroutine 53 is used to control the turret with coded tool positions and function of adjacent tool change.
  • Page 64 Descriptions of the PLC subroutines 3.26 Subroutine 53 - Turret3_CODE_T (tool change control for turret with coding function) Tool position Tool position code Tool position code Tool position code Tool position code Table 3- 29 Outputs Name Type Description T_UNCLAMP BOOL Turret release T_CLAMP...
  • Page 65: Subroutine 54 - Turret2_3_Tooldir (Tool Change Direction)

    Descriptions of the PLC subroutines 3.27 Subroutine 54 - Turret2_3_ToolDir (tool change direction) Example for calling subroutine 53 3.27 Subroutine 54 - Turret2_3_ToolDir (tool change direction) Purpose Subroutine 54 is used to find out the direction of searching for an adjacent tool and the pre- indexing position (this is, the previous position of the desired tool in the direction of an adjacent tool).
  • Page 66 Descriptions of the PLC subroutines 3.27 Subroutine 54 - Turret2_3_ToolDir (tool change direction) Local variable definition Table 3- 30 Inputs Name Type Description Tmax DWORD The max. turret tool position number Pnum DWORD Programmed tool number Tcurr DWORD Current position of the turret Table 3- 31 Outputs Name...
  • Page 67: Subroutine 55 - Tail_Stock_T (Tailstcok Control Program For Turning Machines)

    Descriptions of the PLC subroutines 3.28 Subroutine 55 - Tail_stock_T (Tailstcok control program for turning machines) 3.28 Subroutine 55 - Tail_stock_T (Tailstcok control program for turning machines) Purpose Subroutine 55 is used to control forward or backward movement of the tail stock on a turning machine.
  • Page 68: Subroutine 56 - Lock_Unlock_T (Clamping Control For Turning Machines)

    Descriptions of the PLC subroutines 3.29 Subroutine 56 - Lock_unlock_T (clamping control for turning machines) 3.29 Subroutine 56 - Lock_unlock_T (clamping control for turning machines) Purpose Subroutine 56 is used to control the clamping or release for the chuck for a turning machine. In the JOG mode, press the "External/Inside clamping"...
  • Page 69: Subroutine 58 (Mm_Main)

    To use subroutine 58, you must have licensed the optional manual machine plus function for the SINUMERIK 808D turning machine. The subroutines 46, 58 and 59 must be used together. This subroutine is used to control the manual machine function after the manual machine interface is activated.
  • Page 70 Descriptions of the PLC subroutines 3.30 Subroutine 58 (MM_MAIN) Table 3- 37 Outputs Name Type Description AL_03 BOOL Not approaching the reference point on axis X AL_04 BOOL Not approaching the reference point on axis Z AL_09 BOOL Incorrect start in the spindle direction AL_11 BOOL JOG program timeout...
  • Page 71 Descriptions of the PLC subroutines 3.30 Subroutine 58 (MM_MAIN) Relevant PLC machine data Unit Range Description MD14512[19].7 1: to enable the manual machine function 0: to disable the manual machine function Example for calling subroutine 58 PLC Subroutines Manual Operating Instructions, 12/2012, 6FC5397-2EP10-0BA0...
  • Page 72: Subroutine 59 (Mm_Mcp_808D)

    To use subroutine 59, you must have licensed the optional manual machine plus function for the SINUMERIK 808D turning machine. The subroutines 46, 58 and 59 must be used together. Normally, the spindle will be stopped after you press the NC reset key. However, when a manual machine is started, you do not want to stop the spindle after pressing the NC reset key.
  • Page 73: Subroutine 60 - Disk_Mgz_M (Disk-Style Tool Magazine For Milling)

    Descriptions of the PLC subroutines 3.32 Subroutine 60 - Disk_MGZ_M (disk-style tool magazine for milling) 3.32 Subroutine 60 - Disk_MGZ_M (disk-style tool magazine for milling) Purpose You can use subroutine 60 to control the disk-style tool magazine on a milling machine. In the reference point mode, initialize the tool magazine by pressing the "Original position of the tool magazine"...
  • Page 74 Descriptions of the PLC subroutines 3.32 Subroutine 60 - Disk_MGZ_M (disk-style tool magazine for milling) Name Type Description MgzSp_pos BOOL Tool magazine has reached the spindle position MgzOrg_pos BOOL Tool magazine has reached the original position T_rel_pos BOOL Release position fort he tool magazine T_lck_pos BOOL Clamping position for the tool magazine...
  • Page 75: Subroutines 34 To 36, 57, 61 And 62

    Descriptions of the PLC subroutines 3.33 Subroutines 34 to 36, 57, 61 and 62 Example for calling subroutine 60 3.33 Subroutines 34 to 36, 57, 61 and 62 Explanation Subroutines 34 to 36, 57, 61 and 62 are reserved for users. 3.34 Subroutine 63 - TOGGLES Purpose...
  • Page 76 Descriptions of the PLC subroutines 3.34 Subroutine 63 - TOGGLES Local variable definition Table 3- 41 Inputs Name Type Description Delay7 WORD Delay duration of switch 7 (unit: 10 ms) Delay8 WORD Delay duration of switch 8 (unit: 10 ms) Ki_1…Ki_6 BOOL Input of hold switch 1...input of hold switch 6...
  • Page 77: Use Of User Alarms In The Plc Subroutines

    Use of user alarms in the PLC subroutines Some user alarms are activated in a subroutine. In the case that such an alarm is generated, you can search the following list for the subroutine wherein the alarm is activated. Alarm No. Interface Address Alarm Description From SBR...
  • Page 78 Use of user alarms in the PLC subroutines Alarm No. Interface Address Alarm Description From SBR 700035 DB1600.DBX4.3 Spindle not reach tool-release pos. in SBR60: Disk_MGZ_M time 700036 DB1600.DBX4.4 Spindle not reach tool-lock pos. in time SBR60: Disk_MGZ_M 700049 DB1600.DBX6.1 Reference point X-axis not reached SBR58: MM_MAIN 700050...
  • Page 79: Plc Sample Applications

    PLC sample applications PLC sample application (turning) This sample application is applicable to machines with the following configurations: ● Two axes: axes X and Z, with a hardware limit switch respectively in the positive and negative directions of each axis ●...
  • Page 80 PLC sample applications 5.1 PLC sample application (turning) Signal Description Remark I3.1 Reserved I3.2 Reserved I3.3 Reserved I3.4 Reserved I3.5 Reserved I3.6 Reserved I3.7 Reserved I4.0 Handheld unit: axis X selected Valid at a high level I4.1 Handheld unit: axis Y selected Valid at a high level I4.2 Handheld unit: axis Z selected...
  • Page 81 PLC sample applications 5.1 PLC sample application (turning) Structure of the sample application (OB1) Call Conditions Subroutine Name Description Each scan (SM0.0) AUX_MCP (SBR20) Auxiliary function First scan (SM0.1) PLC_INI (SBR32) PLC initialization Each scan (SM0.0) EMG_STOP (SBR33) Emergency Stop control Each scan (SM0.0) MCP_NCK (SBR37) Transferring MCP and HMI...
  • Page 82: Plc Sample Application (Milling)

    PLC sample applications 5.2 PLC sample application (milling) Machine data Corresponding function 14512[19] Bit 1 Function of spindle braking Bit 2 Password clearing by power-on (0: delete the password; 1: do not delete the password) Bit 7 MM+ (Manual Machine Plus) function (enabled when the MM+ has been licensed and corresponding PLC subroutine has been called) PLC sample application (milling) This sample application is applicable to machines with the following configurations:...
  • Page 83 PLC sample applications 5.2 PLC sample application (milling) Signal Description Remark I2.7 Lubrication pump motor overload Normally closed I3.0 Reserved I3.1 Reserved I3.2 Reserved I3.3 Reserved I3.4 Reserved I3.5 Reserved I3.6 Reserved I3.7 Reserved I4.0 Handheld unit: axis X selected Valid at a high level I4.1 Handheld unit: axis Y selected...
  • Page 84 PLC sample applications 5.2 PLC sample application (milling) Structure of the sample application (OB1) Call Conditions Subroutine Name Description Each scan (SM0.0) AUX_MCP (SBR20) Auxiliary function First scan (SM0.1) PLC_INI (SBR32) PLC initialization Each scan (SM0.0) EMG_STOP (SBR33) Emergency Stop control Each scan (SM0.0) MCP_NCK (SBR37) Transferring MCP and HMI...
  • Page 85: Index

    Index Data management, 13 Subroutine 56, 68 Subroutine 58, 69 Subroutine 59, 72 Subroutine 60, 73 Subroutine 63, 75 MCP interface description, 9 Symbols used in the subroutines, 32 System resource distribution, 7 Overview, 7 User alarms, 77 Program organization, 13 Structure of the subroutines, 8 Structure of the symbol tables, 8 Subroutine 20, 34...
  • Page 86 Index PLC Subroutines Manual Operating Instructions, 12/2012, 6FC5397-2EP10-0BA0...

Table of Contents