Home
PLC Subroutines Manual - Service, Support
Contents
1. Communications Setup Horne Address 0 m Double Click Double click the icon representing the PLE to to Refresh communicate with Double click the interface icon to change communication parameters Double click the modem icon to setup the modem parameters or dial to start modem communications Communication Parameters Remote Address a Local Address Module COM 1 Protocol PPI Transmission Rate Mode 11 bit PLC Subroutines Manual 6FC5397 0FP40 OBAO 08 2013 2 None Address 0 PLC Subroutines Manual 6FC5397 0FP40 0BA0O 08 2013 Alternatively you can call the above dialog by double clicking the a Communications icon in the project tree or choosing from the main screen menu STL Ladder Symbol Table Status Chart Data Block NC Variables Cross Reference Communications None Address O 1 Double click the icon representing the PLC to Double Click communicate with to Refresh Then the following Set PG PC Interface dialog is displayed Set PG PC Interface x Access Path LLDP Access Point of the Application Programming Tool 828 PLES02 PPI z Standard for Programming Tool 828 Interface Parameter Assignment Used PLCS02 FPI Properties lt None gt H150 Ind Ethernet Broadcom Net H PLCS02 PPI Copy 25 PLCS Y Delete Assigning Parameters to an POPPI cable for an PPI Network Interfaces
2. Purpose To use subroutine 48 you must have created a service plan on the SINUMERIK 808D ADVANCED When the pre alarm time arrives the machine outputs a notification message When the final alarm time arrives the machine outputs an alarm message Note To perform a service plan on the PLC you need to download DB9903 SP_INI and DB9904 SP_ACT Local variable definition Table 3 21 Inputs Name Type Description S BOOL Freezing a service plan AckMsgO BOOL Confirming the notification message of a service plan Table 3 22 Outputs Name Type Description 3 HintMsgO BOOL Notification message BOOL Assigned global variables ServPlan_msg0 BOOL Notification message of the first service plan ServPlan_almO BOOL Alarm message of the first service plan PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 49 Relevant PLC machine data None Example for calling subroutine 48 OME seriPlan Hinthisg0 p ALAR M30 l3 6 4 0eact Alarm ALAR M31 3 7 AckMs gi 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 When the PLC detects that the desired gear level has been reached the gear change has been completed You cannot use this subroutine together with subroutine 50 Local variable
3. gt Network connections on your PC 3 On the left side of the communication setting window enter the IP address for the corresponding SINUMERIK 808D ADVANCED control e When you select Yes for the DHCP on the control enter the IP address that is already automatically assigned e When you select No for the DHCP on the control enter the IP address that you ve previously entered on the control manually Communication Parameters Remote Address 172 16 202 200 Double Click 4 Double click this icon on the right side of the communication setting window to establish a to Refresh connection to the specified IP address Communications Links Communications Setup IHH TCPIP gt Intel h 82579LM Gigab Double click the icon representing the PLC to 4 5090 PFU16 communicate with SES Double click the interface icon to change communication parameters Double click the modern icon to setup the modem parameters or dial to stark modem communications Communication Parameters Remote Address 172 16 202 200 Module TCPyIP gt Intel A 8257 SLM Gigab Protocol PPI Note e Before configuring communications in the PLC Programming Tool make sure the connection must be already enabled on the control 2 9 PLC application Download Upload Copy Compare You can save copy or over write a PLC project or PLC application on the control system by using the following e PLC Programming Tool e USB stick
4. Local variable definition Inputs None Table 3 25 Outputs Name Type Description S HL_gear BOOL Output of the high low gear 0 gear level low gear 1 gear level high gear Assigned global variables None Relevant PLC machine data None PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 51 Example for calling subroutine 50 OME Gearlhg Virtual 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 the turret motor is controlled by the PLC The turret rotates clockwise to search for a tool and rotates counter clockwise after positioning the desired tool to clamp it the turret CCW rotation time can be adjusted An alarm occurs if the turret fails to position the desired tool after the duration expires The subroutine verifies the time that the turret rotates CCW and sets a limit of maximum 3 seconds for this rotation time to prevent the turret motor from being broken In the AUTO and MDA modes the T function starts a tool change operation In the JOG mode a short strike on the MCP key changes a turret position During a tool change the NC interface signals Read in disable DB3200 DBX6 1 and Feedhold DB3200 DBX6 0 are set this means that the part program can only continue to run after the tool change The turret positioning is prohibited in the case of an Emergency St
5. SP_LED BOOL Spindle running state Assigned global variables SP_B_CMD BOOL Spindle braking command TIMER Spindle braking timer Relevant PLC machine data No Type Description 22222 14510 13 BOOL Spindle braking duration unit 0 1 s 14512 19 1 BOOL Selection of spindle braking function 1 enabled 0 forbidden Example for calling subroutine 42 510 0 SPINDLE EN DB4500 DBWW26 4 DELAY oP_hrake pa 1130 07 Oren oP_LEDPM236 0 M225 045P_EN DA4500 0841019 1 4lsBrake 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 function You can use this subroutine to calibrate the probe and measure a tool The precondition for calling this subroutine is to call subroutine MCP_NCK SBR38 in the main program The measuring in the JOG mode function is automatically deactivated if you have changed the operating mode when the function becomes active Local variable definition Table 3 11 Inputs Name Type Description 222222 Meas_Enable BOOL Activating the function of measuring in JOG mode PLC Subroutines Manual 44 6FC5397 0FP40 0BAO 08 2013 DB1400 DBD64 DWORD Valid tool number DB1400 DBD64 Assigned global variables MEAS_OPAUT CHL_HM NO_KEY FDI MEASJOG ON_MEASJOG PROBE_ON JOG_MEASJOG AUT_MEASJOG CHL_MEASJOG KEY_MEASJOG RES_MEASJOG ESC_MEASJOG DRY_ME
6. realize most machine functions by re organizing the PLC subroutines or modifying some must networks Make sure that you perform a complete machine test to all subroutines used in your main program in order to verify that all the subroutines called by the main program function as you desire Failure to observe may cause personal injury or property damage System resource distribution The system resources can be distributed into three parts e PLC system Inputs 10 0 to 12 7 24 inputs of the SINUMERIK 808D ADVANCED 13 0 to 18 7 distributed 48 inputs Outputs Q0 0 to Q1 7 16 outputs of the SINUMERIK 808D ADVANCED Q2 0 to Q5 7 distributed 32 outputs Memory MO O to M255 7 256 bytes Non volatile memory DB1400 DBX0 0 to DB1400 DBX127 7 128 bytes PLC user alarms DB1600 DBX0 0 to DB1600 DBX15 7 128 user alarms Timer TO to T15 100ms timer PLC Subroutines Manual 4 6FC5397 0FP40 0BA0O 08 2013 T16 to T63 10ms timer Counter CO to C63 64 counters e NCK PLC machine data MD14510 MD14512 MD 14514 MD14510 machine data INT DB4500 DBWO to DB4500 DBW62 32 words MD14512 machine data hex DB4500 DBB1000 to EDB4500 DBB1031 32 bytes MD14514 machine data real DB4500 DBD2000 to DB4500 DBD2028 8 Dword e PLC Programming Tool Symbol table SYM1 to SYM32 32 symbol tables Subroutine SBRO to SBR63 64 subroutines Structure of the symbol tables The PLC subroutine lib
7. 3rd axis swtich Input to _3LMTp Release button 2nd axis swtich Input to _2LMTp 1st axis swtich Input to _1LMTp 24V E inputs mergency Stop E Key a 65 of the SINAMICS V60 Encoding the hardware limit switches ump AMO EMERGENCY STOP active 4 DB3900 DBX4 7 1st over limit COM a e 1 TI TI PLC Subroutines Manual 40 6FC5397 0OFP40 OBAO 08 2013 In the hardware solution above the feed stop signals for all axes can be activated via the hardware limit switches when any of the hardware limits is reached or an EMERGENCY STOP happens You can check the information of the PLC diagnostics from the encoding of the hardware limit switches shown in the table above and identify the cause Emergency Stop button or a hardware limit switch of an axis of the EMERGENCY STOP signal Note When using the hardware solution you must take below information into consideration e You must assign the axes one by one for example X axis Z axis spindle or X axis Y axis Z axis spindle You must not assign the axes like X axis Y axis spindle Z axis e You must set constant 1 i e SMO O to the input signals of the hardware limits for undefined axes otherwise the hardware limits of the undefined axes can be activated Local variable definition Table 3 7 Inputs Name Type Description OOOO Brake release switch NO used for drive optimization reserved 1st axis hardware limit switch NC 1 1s
8. 44 COOLING cooling CONTTOl ooccccooccnccccccncconcnncnononnnnnconcnnncnnnnnncnnonnnrnnnnnrnnonnnrnnnnnarnnnnnoos 3 18 Subroutine 45 LUBRICAT control of lubricate oooccccooccccccocnnnonononcnnncnnononcnnononononnncnnnnonrnnonnnrnnnnnoos 3 19 Subroutine 46 PILSERVICE Asynchronous Subroutine PrograM ooccccconccccccccncococononnncnnononcnnonaninonnnoos 3 20 Subroutine 47 PLC_Select_PP PLC selects a subroutine oocccccooccnccnocnnononcnnnnonononnncnnononnnnonanononnnoos 3 21 Subroutine 48 ServPlan Service Plan ccccccccsseccceeececceeececceneecceseecseececseuseeseaeeeeseueeessegeeesseneessaagees 3 22 Subroutine 49 GearChg1_Auto automatic spindle gear Change oocccccoccnnccoccnconononcnnncnnononcnnnnanonononons 3 23 Subroutine 50 GearChg2_ Virtual virtual spindle gear Change cooooccncccocccncnoccnnnnononononcnnononnnnonaninonnnoos 3 24 Subroutine 51 Turret1_HED_T turret with Hall effect device position sensor ccooccccccccccccnconcncnncnnnns 3 25 Subroutine 52 TURRET2_BIN_T turret with binary Coding TUNC ION occccooccncococcnconncnnononcnnonanononnnoos 3 26 Subroutine 53 Turret3_CODE_T tool change control for turret with coding function cccooccoco PLC Subroutines Manual 6FC5397 0FP40 0BAO 08 2013 3 3 27 Subroutine 54 Turret2_3_ToolDir tool change direction oocccoocccconnncocnncconnncnnnnnnnnncnnnnononnncnnnn
9. 6FC5397 0FP40 OBAO 08 2013 a gt CES 8 Choose these two menus from the menu bar or click ha in the tool bar to create a new and empty PLC application PLC Programming Tool Project Ple Edt Wew PLC Debug Tools Windows Help OSE GO Ho jar Qle Or mln ss gt e gt 44 0 0 ho o a Proact 08280 3 Program Block MAN 0B1 E SIMATIC LAD 10 S8R_0 SBRO 5 Symbol Table 9 Status Chart Data Block Cross Reference Communications 2 8 Instruction 4 a Bi Logic 19 Compare Network 1 NETWORK TITLE single Ine 38 Flosting Pant Math 3 Integer Math Network 2 Network 3 Network 4 Network 1 Row 1 Col 1 DS 4 File gt 9 Import the pte file from the USB stick by choosing these two menus from the menu bar Import Look in Removable Disk F da t EE E qurecycle SnagitPortable ES pic_app pte File name plc_app Files of type Data File pte Cancel ee ee 10 Click this button or double click the pte file It will take several seconds to import the pte file 11 After successfully importing the PLC application you can view the import results Network 1 turning or milling setting for the following program ONE Flag with defined ONE signal T_or_h M255 0 0 turning 1 milling Network 2 Initialization 510 1 PLE_ini EN SCAN_15T SMO 1 First PLG cycle 1 and following cycle 0 Network 3 Eme
10. A Setups cfg Setup aam Microsoft Office Outlook Conti Siemens AG jad ike slemense Ext Text Document 3 KB To start the installation double click the Setup exe file In the setup dialog select one or multiple options that you desire to install 2 2 PLC instructions Various instructions are available in the PLC Programming Tool You can view them in the instruction branch on the instruction tree Project 8080 PPU7 6x Program Block i MAIN 081 i SER_O SBRO Symbol Table 10 Status Chart Data Block We Cross Reference aes Communications IH Instructions 41 Bit Logic 3 Compare ed Convert 1 Counters 8 Floating Point Math 1 Integer Math 1 Interrupt 41 Logical Operations aa Move an Program Control w Shift Rotate Subroutines PLC Subroutines Manual 6FC5397 0FP40 0BA0O 08 2013 You can right click over an instruction or directly press the F1 key to view its help information For example Instructions Pan oe MD INT 24 DB4500 DEWA48 MD14510 24 Lubricating interval unit 1 a 41 4 Programming Tool aj x unit egy NC File Edit Bookmark Options Help ae Al NE 0 4 Output Immediate EE Bit Logic 2 pa 42 5 Inputs Outputs Operands Data Types o AA bit LAD STL a BOOL Ty NOI memory Ranges ENO Instruction Support SIMATIC Anternational Mnemonics a st lll 2 2 m E Al When the Output Immediate instruction is executed the physical E lt z 1 output
11. AE CTC A 003 chipbactwad OOOO AN CTC TT AN 005 Lubicatonpump e U O O l Ca ANN oro magazine raatna aoas ToS att Magazine rotating counter os SSSCSCS S sSSSSSSCSCS S 012 Magazin approaching spindle positon a s Magazine approaching original postion o oea O Coas OOOO ANN A ANN NCAA ore AN PLC Subroutines Manual 12 6FC5397 OFP40 OBAO 08 2013 Table 5 4 Definition of user defined keys on the MCP Structure of the sample application OB1 Each scan SMO 0 MCP_NCK SBR37 Transferring MCP and HMI signals to the NCK interface Each scan SMO 0 HANDWHL SBR39 Selecting a hand wheel through the interface signal DB1900 DBB1xxx Each scan SMO 0 AXIS_CTL SBR40 Coordinate enabling control hardware lt lt etc Each scan Each scan SM0 0 st 0 SPINDLE SBR42 ss SBR42 Spindle control control Each scan SMO 0 COOLING SBR44 Cooling control Each scan SMO 0 LUBRICAT SBR45 Lubrication control Setting relevant PLC machine data Machine data Corresponding function 14510 12 JOG key layout Time for spindle braking 14510 20 The maximum number of tool positions Lubrication interval in 1min 14510 25 Lubrication duration in 0 01s 14512 16 Function of chip remover Function of safe door When the function of safe door is active it can be triggered by M01 M02 Handwheel assignment with the MCP HMI 14512 17 BitO Tool magazine function Selection be
12. Also you can click the communication button EE in the navigation bar or click the communication icon 4 Communications in the project tree to display the window Communications Communications Links i X Communications Setup Horne Address O Double click the icon representing the PLC to y Double Click communicate with to Refresh Double click the interface icon to change communication parameters Double click the modern icon to setup the modem parameters or dial to start modem communications Communication Parameters Remote Address z Local Address Module COM 1 Protocal PPI Transmission Rate Mode 11 bit 4 2 Double click this icon on the right side Then the following interface setting dialog is displayed ore Address O Set PG PC Interface Access Path LLDP DCP PNIO Adapter Access Point of the Application Tagramnmirg Tool 82t Standard for Programming Tool 828 Interface Parameter Assignment Used TCP IP gt Intel R 82579LM Gigab lt Acti a SUSE 3 BS TCP IP gt Intel R 2579LM Gigab Bel TCP IP gt NdisWwanlp lt Active gt w lt iiil gt Assigning Parameters to Your NDIS CPs with TOPYIP Protocol RFC 1006 Interfaces PLC Subroutines Manual 6FC5397 0FP40 0BA0 08 2013 21 Select the TCP IP pointed to the Ethernet card of your PC and then click the DK button You can find the name of your Ethernet card under Start gt Settings
13. Q0 3 Tailstock backward PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 69 Chuck output 1 Chuck output 2 Turret motor rotating clockwise Turret motor rotating counter clockwise Q1 2 Reserved for other types of turrets Reserved for other types of turrets ee SBR50 GearChg2_ Virtual Q1 4 Gear shift low gear level SBR49 GearChg1_Auto Gear level status Gear shift high gear level SBR49 GearChg1_Auto Q1 6 Handheld unit valid Table 5 2 Definition of user defined keys on the MCP User defined key 5 Chuck clamping internally externally User defined key 6 Tailstock Structure of the sample application OB1 First scan SMO 1 Each scan SMO 0 MCP_NCK SBR37 Transferring MCP and HMI signals to the NCK interface Each scan SMO 0 HANDWHL SBR39 Selecting a hand wheel through the interface signal DB1900 DBB1xxx Each scan SMO 0 AXIS_CTL SBR40 Coordinate enabling control hardware limit etc Setting relevant PLC machine data Machine data Corresponding function 14510 12 JOG key layout 14510 13 Time for spindle braking 14510 20 The maximum number of tool positions 14510 21 Time for locking a turret in 0 1s 14510 22 The monitoring time for searching a tool in 0 1s PLC Subroutines Manual 70 6FC5397 0FP40 0BAO 08 2013 14512 17 Turret function Clamping function Tailstock function Selection between handwheel and hand held unit 0 handwheel 1 hand held unit 14512 1
14. Stop button and then press the RESET key on the MCP This subroutine can activate the alarm below Alarm 700016 DRIVE NOT READY Local variable definition Table 3 3 Inputs E KEY BOOL Emergency Stop key NC Drv_RDY BOOL Drive Ready signal for SINAMICS V60 ready HWL_ON BOOL Triggered by the hardware limit switch of any axis NO 1 SpStop BOOL External spindle stop NO 2 NO Normal Open NC Normal Close PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 37 1 This input can come from signal OVImt of subroutine 40 and triggers the emergency stop when the hardware limit appears 2 Before the drive system disables the control enable signal the PLC detects the spindle stop signal from NCK to ensure that the spindle has stopped Table 3 4 Outputs NC_Ready BOOL NC ready Relevant PLC machine data No Valle Description 14512 18 4 Spindle has an external stop signal Spindle has no external stop signal Example for calling subroutine 33 510 0 EMG_STOP MC Readye ht 30 0 3 10 Subroutine 37 MCP_NCK MCP and HMI signal processing Purpose Subroutine 37 is used to transfer the interface signals from the MCP and HMI to the NCK interfaces and thus to activate the specific operating mode and control sequences It has the following main functions e Selecting specific operating mode e Selecting override e Transferring signals from the HMI to NCK interfaces for instance program control handwheel
15. The PLC project contains the PLC user program including all of the important information symbols comments You can upload download a PLC project from to the control system with the PLC Programming Tool Also with this tool you can import and export the PLC project in the pte format Additionally you can read write the PLC project in the pte format from to a USB stick directly on the control system PLC Subroutines Manual 22 6FC5397 0OFP40 0OBAO 08 2013 PLC Programming Tool m gt Download fS Upload O Compare F z 9 9 89 ZEZSY PLC application pte USB stick 4 PLC application pte Y SINUMERIK 808D Download You can write the transferred data into the permanent memory load memory of the control system with the PLC Programming Tool or a USB stick To download a PLC application with the PLC Programming Tool proceed as follows 1 Download Establish the communication between the control and the PLC Programming Tool You can establish the connection by using the following three methods Establishing a connection with the RS232 interface Page 13 Establishing a direct connection with the Ethernet interface reel Page 20 Choose these two menus from the menu bar or click the download icon E to start the download and the download dialog pops up Remote Address 17216 202 196 Remote PLE Type 2080 PPOT 6 06 00 Blocks to Download W B
16. definition Table 3 23 Inputs Name Type Description SS D_CHG WORD Gear change delay time unit 0 01 s D_MON WORD Gear change monitoring time unit 0 01 s WORD Spindle stop delay time unit 0 01 s WORD Monitor time for whole gear change process must gt D_CHG D_MON D_SSO unit 0 01 s S_hold BOOL Signal of zero spindle velocity NO BOOL Spindle alarm NO BOOL Low detection switch NO BOOL High detection switch NO Table 3 24 Outputs Name Type Description SS O Assigned global variables BOOL M248 0 Signal indication of high gear stage output BOOL M248 1 Signal indication of low gear stage output BOOL M248 2 High gear level command BOOL M248 3 Low gear level command SPhold BOOL M248 4 Spindle stops and ready for oscillation PLC Subroutines Manual 50 6FC5397 0OFP40 OBAO 08 2013 Dstill BOOL M248 5 Signal for spindle stop BOOL M248 6 Spindle gear change delay BOOL M248 7 Monitoring for the gear change Reg_SP_G_CH BOOL M244 0 Request for spindle gear change G Relevant PLC machine data None Example for calling subroutine 49 OME Gearlhg1_ Auto 3 23 Subroutine 50 GearChg2_ Virtual virtual spindle gear change Purpose Using subroutine 50 you can requests the system to switch to the corresponding gear after changing the gear manually The corresponding gear is set when M41 M45 are executed This subroutine must not be used together with GearChg1_Auto SBR 49
17. etc e Controlling the axis traversing signal according to the PLC machine data Local variable definition Table 3 5 Inputs NODEF BYTE AFL_Key BOOL Define the Auxiliary Function Lock at the MCP key Table 3 6 Outputs AFL_LED BOOL Define the Auxiliary Function Lock at the MCP LED PLC Subroutines Manual 38 6FC5397 OFP40 OBAO 08 2013 Example for calling subroutine 37 510 0 MEP_NEK 07 MNODEF AFL_LED f M255 7 3 11 Subroutine 38 MCP_Tool_Nr display tool number on the MCP Purpose Subroutine 38 is used to display active tool number lt 100 with the 7 segment LED on the MCP For a tool number 2 100 it displays FF Local variable definition None Assigned global variables None Relevant PLC machine data None Example for calling subroutine 38 OME Tool_Mr_LED 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 With the HANDWHEEL key and axis selection key on the MCP you can assign the handwheel 1 in the workpiece coordinate system to any axis Note You cannot use subroutine 39 together with subroutine 41 MINI_HHU Local variable definition None Assigned global variable None Relevant PLC machine data No Value Description S 14512 16 7 H
18. for your machines Within the PLC subroutine library and all the subroutines all the MCP related signals are defined in this symbol table An MCP signal is transferred to the interface area via a subroutine For the SINUMERIK 808D MCP you can use subroutine 37 to transfer the MCP input output signals to the interface area For your own MCP you just need to create a subroutine to realize the transfer and the other subroutines are still available PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 33 Symbol table 17 IS_HMI The symbol table 17 defines interface signals to from the HMI Symbol table 18 IS_AUX The symbol table 18 defines the interface signals from the NCK channel including the auxiliary functions D functions H function etc Symbol table 19 IS_NCK The symbol table 19 defines the interface signals to from the NCK Symbol table 20 IS_CHA The symbol table 20 defines the interface signals to from the channel Symbol table 21 22 23 24 25 IS_AX1 IS_AX2 IS_AX3 IS_AX4 IS_AX5 These five symbol tables define the interface signals to from the axes Symbol table 26 IS_AX_P1 The symbol table 26 defines the interface signals to from the PLC axis Symbol table 27 MD_PLC The symbol table 27 defines the PLC machine data from the NCK Symbol table 28 ALARM The symbol table 28 defines each bit of a PLC user alarm V1600 000x Symbol table 29 NV_MEM The symbol table 29 defines all the user data 12
19. or backward movement of the tailstock Local variable definition Table 3 34 Inputs Name Type Description OOOO TailCtrl_K BOOL Tailstock SP_status BOOL Spindle status Table 3 35 Outputs Names Type Description OOOO TailAdv_O BOOL Output to move the tailstock forward TailRet_O BOOL Output to move the tailstock backward Assigned global variables SP_RUNm BOOL M236 0 Indicate that the spindle is running TailAdv_m BOOL M229 2 Indicates that the tailstock is moving forward TailRet_m BOOL M229 3 Indicates tailstock is moving backward Relevant PLC machine data None Example for calling subroutine 55 MO _HE _17_2 Tail stock_T EN 04nodef TailAdy OPFQO0 2 PM CKasTailCtiEeK TailRetoOrao 3 SP RUINm S5P_ status AdvRetL Fi_CkKa 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 key to select either external clamping or inside clamping and press Clamp or Unclamp key to clamp or release the chuck Furthermore you can also use the Foot switch to clamp or release the chuck Pressing the Foot switch for once release the chuck and one more pressing clamps the chuck In the AUTO mode you can execute M10 M11 to control the clamping or release of the chuck PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 59 Note The chuck s
20. point bith is sel equal to power flora o 4 ISI The I Indicates an immediate reference the new value is writen o to both the physical output and the corresponding process image oe 3 Al register location when the instruction is executed This differs from HL H E Compar the non immediate references which write the new value to the 9 4 Heg Convert process image register only l ET Counter A special position takes the immediate digital onboard outputs They KAI aaan T CTL have not a corresponding proces imadge register location ce Ty CTE Seed l AZ E oe T CTL n STL the Output immediate instruction copies the top of the stack A to the specified physical output point Coit immediately fo H E Floating A 21 Integer H Interrup slpporting GPUs H A Logical ay Move 1 38 Progran H E ShifteAi H Timers Librarie 2 a Chira hnas 2 3 Data management The data can be broken down into three areas non retentive data retentive data e 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 For the retentive data there is a data range of 1400 0000 1400 0127 This location can be used to save all the data which is to remain valid after POWER OFF ON With the aid of the PLC MD see user interface you can pre assign your program with dat
21. progress bar disappears PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 25 Upload You can back up a PLC application from the permanent memory of the control using the PLC Programming Tool or a USB stick To upload a PLC application using the PLC Programming Tool proceed as follows rie Dd i Choose these two menus from the menu bar or click 17 in the tool bar to create a new and empty PLC application Ple Edt Wew PLC Debug Tool Windows Help osgan i Peo Blaz gt e gt 44 2 0 ho So 00 Lit Q lo rua Network 1 NETWORK TITLE singe Counters ij Flosing Pont Math 89 Integer Math 2 Establish the communication between the control and the PLC Programming Tool You can establish the connection by using the following three methods e Establishing a network connection with the Ethernet interface Page 20 PLC Subroutines Manual 26 6FC5397 0OFP40 OBAO 08 2013 Mi 3 Choose these two menus from the menu bar or click the upload icon E to start the upload and the upload dialog pops up Remote Address 172 716 202 00 Remote PLE Type 2080 PPOT 6 06 00 Blocks to Upload i Blocks MAIN SBR INT DB Data Blocks only actual values cancel DK 4 Click this button 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 this button if Data Blocks o
22. the NC interface signal Feedhold DB3200 DBX6 0 is set this means that the part program can only continue to run only after the tool change The turret positioning is prohibited in the case of an Emergency Stop turret motor overload or program test simulation Local variable definition Table 3 30 Inputs Names Types Description OOO BOOL Tool position code signals BOOL Tool position code A Tool position code B Tool position code C Tool position code D E PO a o oo PLC Subroutines Manual 56 6FC5397 0FP40 0BAO 08 2013 Table 3 31 Outputs Name Type Description S PERO we BOOL T_CLAMP BOOL Turret clamping BOOL Turret CW rotation T_CCW BOOL Turret CCW rotation T_LED BOOL Status display during the tool change Assigned global variables Relevant PLC machine data No A Description O 14510 22 Monitoring time for searching for a tool Example for calling subroutine 53 MD HEX 17_0 Turret3 CODE T MD INT_22 Pm ck 1 2 1 3 1 4 1 5 1 6 1 7 12 0 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 To find out the direction you need to know the max tool number of the turret and the programmed tool number You can use this subroutine to control the turret to search for an
23. timeout Spindle rate not 100 Spindle not being started Feed rate 0 Spindle direction change in a thread not allowed Assigned global variables Byte Signal Byte7 Byte6 Byte5 Byte4 Byte3 Byte2 Byte1 Byte0 MB170 HMI lt gt MM Request MM HMI MM HMI for MM enabled started HMI startup AA MB171 HMis gt MM meaz2 Hime MM fMei73 HMi lt omm S S S S S S PLC Subroutines Manual 6FC5397 0FP40 0BAO 08 2013 61 Byte Signal Byte7 Byte6 Byte5 Byte4 Byte3 Byte2 Byte1 Byte0 MB174 HMI lt gt MM Cone Cone Cone angle angle 90 angle 90 180 270 180 MB175 HMI lt gt MM Direction Spindle key rotated enabled MB176 HMI lt gt MM Working Groove Thread Drilling Arc Cutting Thread step enabled chaining enabled enabled enabled enabled enabled enabled MB 177 HMteRMM S S S S S w a G ae a I e a mero AA MB180 Recutting Recutting Recut the canceled performed thread or not Relevant PLC machine data No Unit Range Description MD14512 19 7 1 to enable the manual machine function 0 to disable the manual machine function PLC Subroutines Manual 62 6FC5397 OFP40 OBAO 08 2013 Example for calling subroutine 58 hihi _ WAIN PB4500 08 1019 7 N_ 1 TK_P N_1_TK_N N_3_TK_P N_3 TK_N Pm RAPID P_M_SP_Cw PoM_SP_CCw P_h_SP_STOP P_h_NCSTART P_M_NCSTOP manma_ active ALAR MSO ALAR AG A ALAR MSZ ALAR MSS ALAR MS4 ALAR MSS ALAR MSG ALA
24. turret function of a turning machine PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 53 Example for calling subroutine 51 Network 3 Turret control MD_HEx_17_0 Turretl_HED_T MO_INT_20 11 0 MO_INT_21 11 1 MD_INT_ 22 M_CK3 ZERO ALARM 26 P_M_CK3 ALARM 24 1 2 ALAR M2 Hs ALARM23 11 4 ALARM25 ES NULL_b 11 6 1 7 12 0 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 Contact the turret vendor for the working theory and the timing diagram of a tool change During a tool change the NC interface signals Read in disable DB3200 DBX6 1 and Feedhold DB3200 DBX6 0 are set so the part program can continue running only after the tool change action The turret position action is forbidden in case of an emergency stop turret motor overload or program test simulation This subroutine can activate the following alarms e Alarm 700022 Turret motor overload e Alarm 700023 Programmed tool number higher than the max tool number of the turret e Alarm 700024 Wrong setting of the max tool number for the turret e Alarm 700026 Not able to find expected tool in monitor time e Alarm 700011 Not able to lock tool in expected time Local variable definition Table 3 28 Inputs Name Type Description 3 O BOOL Tool codeBx2 o BOOL Tool code B x 2 Tool code
25. 1904 pasBaaaa 4 pBBBBABA 4 BBB 1005 pesa 5 0080899989 5 0080999989 1006 panaaaas 6 gseeeeaaa 1007 panas 7 098088998 1008 puse 8 puuBBaaa 1009 puaBaaaa 9 paBBBaaa 1010 poeuBBaaa 10 puBeaaaa 1011 gaeeeeee 11 puBBaaaa 12 pessaaaa 13 poessoaaa 14 pananaga PLC Subroutines Manual STEP 7 connect Disease ELAR WI PLC status pa ul 6800099908 PLC Program Edit PLC program list alarm txt 6FC5397 0FP40 0BA0 08 2013 ay 16 18 33 AL 2013 07 13 SMO M255 Program aC stat OFF Network 2 Initialization Symbolic SM 1 PLC i address Hd Network 3 Emergency control SMO 0 Le a 2 1 M10 241 184 2 0 M2 24 0 M2 Network 4 Interface processing activating the NCK signals SMO 0 PLC Status Pte el Window 2 oe status list OB1 SBR26 reference Program You can view the status of the main program or use the block softkey to view the status of a subroutine xX Y te SIMATIC LAD MAIN OB1 abs Proper ties l variables Absolute name Network 2 OB1 MAIN SBR20 AUX_MCP SORA AU LM SBR22 AUX_SAFE_DOOR Network 3 SBR23 AUX_CHIP Smo 9 SBR31 PLC_ini_USR_ini _ SBR32 PLC_ini d SBR33 EMG_STOP SBR37 MCP_NCK SBR38 MCP_Tool_Nr SBR39 HANDWHL SBR40 AXIS_CTL SBR41 MINI_HHU pa SBR42 SPINDLE SBR43 MEAS_JOG PLC Status Stell Window 2 Cross status list OB1 SBR26 refs SMO 1 Network 4 vw 16 37
26. 32 A 2012 05 13 SIMATIC LAD AUX_LAMP SBR21 O Program block Network 1 for lamp control M211 3 M211 Program mm s stat OFF M211 3 M211 7 n n Symbolic address Network 2 record last status of 00 8 M211 7 M211 3 3 Li 1 3 L1 2 3 Network 3 NETWORK TITLE single line ere Fetwork title AN PLC Status Pte sl Window 2 Cross status list SBR21 SBR26 refs Two windows are available for you to view the program PLC Subroutines Manual 12 6FC5397 0FP40 OBAO 08 2013 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 ADVANCED and the PLC Programming Tool There are three methods for establishing the communication between the SINUMERIK 808D ADVANCED and the PLC Programming Tool Establishing a connection with the RS232 interface Page 13 2 Use the menu command ETI MEETS to view the status of a PLC signal You can also first click the status chart symbol and then click the Al symbol to view the status lO Pi Edi Wire POC Debug Toole Wincor Help Ora ee ba ai uso e ja REA E 2 e 4 4630 ls lee E i o Praga Block EE Bantu Table Sisa Chus Custo Bloc r Lee s eei Cross Fisieke 0 e Cotrararicalon RR RRE ERRE RRE RRE RRE E E E Fund Fem msze Do 0 COML Remote 2 Fata htm E 2 6 Establishing
27. 8 MM_MAIN 700050 DB1600 DBX6 2 Reference point Z axis not reached SBR58 MM_MAIN 700056 DB1600 DBX7 0 Change of spindle direction not possible in SBR58 MM_MAIN thread 700059 DB1600 DBX7 3 Safe door not closed NC start not possible SBR22 AUX_SAFE_DOOR 700060 DB1600 DBX7 4 PRT AFL change not possible channel not SBR37 MCP_NCK reset 5 PLC sample applications 700036 DB1600 DBX4 4 Spindle not reach tool lock pos in time SBR60 Disk_MGZ_M 5 1 PLC sample application turning This sample application is applicable to machines with the following configurations e Two axes axes X and Z with a hardware limit switch respectively in the positive and negative directions of each axis e An analog spindle SP e HALL effect device turret with six working stations e PLC controlled timely and quantitatively lubrication system e PLC controlled cooling system PLC Subroutines Manual 68 6FC5397 OFP40 OBAO 08 2013 Table 5 1 Assignment of inputs and outputs Signal Cescription Remark O 10 0 EmergencyStopbutton Normally closed Limit switch in the direction of axis X Limit switch in the direction of axis X a O AA O Limit switch in the direction of axis Z 106 Limit switch in the direction of axisZ Normally closed A O 11 5 Valid at a low level A A O Reseved Reserved O Reserved BR Reserved MO Reserved O A Reserved MO Reserved O Reserved ME O A A Q02 Tailstockfoward o G O Tailstock backward o d O
28. 8 One time automatic lubrication after the power on Stop signal for an external spindle Fixing the direction of a spindle Hardware limit is independent of the PLC application One hardware limit triggered per axis enabled when bit 6 0 14512 19 Function of spindle braking 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 Spindle disable mode 5 2 PLC sample application milling This sample application is applicable to machines with the following configurations e Three axes axes X Y and Z with a hardware limit switch respectively in the positive and negative directions of each axis e An analog spindle SP the fourth axis e PLC controlled timely and quantitatively lubrication system e PLC controlled cooling system Table 5 3 Assignment of inputs and outputs Signal Description Remark o 10 0 EmergencyStopbutton Normally closed Limit switch in the direction of axis X Limit switch in the direction of axis Y Limit switch in the direction of axis Y E 6 Limit switch in the direction of axis Z Reference point switch of axis Y nf Valid atatowtevel AR Normally closed S O Reserved O PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 171 CDe A A OO OO o o o e O 7 AN O 7 AN A O O A e A A A O 7 AN A O o O TT A A
29. 8 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 ADVANCED SMO 0 to SMO 6 Symbol table 31 SBR_MEM The symbol table 31 defines the memories used in the standard subroutines These memories can be used as the global variables Symbol table 32 reserved for the subroutines The symbol table 32 is a reserved symbol table 3 3 Subroutine 20 AUX_MCP machine auxiliary functions Purpose Subroutine 20 is used to control machine auxiliary functions like lamps safe door milling and chip remover milling Local variable definition None Relevant PLC machine data None PLC Subroutines Manual 34 6FC5397 OFP40 OBAO 08 2013 Example for calling subroutine 20 OME ALIA MCF EN 3 4 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 Local variable definition None Relevant PLC machine data None Example for calling subroutine 20 OME AUX_LAMP LamplED FM CK1 LampOuteao o0 3 5 Subroutine 22 AUX_SAFE_DOOR safe door Purpose Subroutine 22 is used to control safe door and can be called in AUX_MCP Local variable definition None Relevant PLC machine data No Desoription S O 14512 16 2 Selection o
30. ASJOG SBL_MEASJOG Relevant PLC machine data None Example for calling subroutine 43 OME MEAS JOG 001400 00064 1 ACT 3 17 Subroutine 44 COOLING cooling control Purpose Subroutine 44 is used to start stop cooling using the buttons on the MCP in the JOG mode or to start using the auxiliary function MO7 MOS8 in the part program or to stop using the MO9 in the part program cooling in the AUTO MDA mode Cooling is forbidden in case of EMERGENCY STOP cooling motor overload program test or under the simulation mode This subroutine can activate the following alarms e Alarm 700018 motor overload for the cooling pump e Alarm 700019 low coolant level Local variable definition Table 3 12 Inputs Name Type Description 22 BOOL Manual operating key triggering signal OVload BOOL Cooling motor overload NC BOOL Low coolant level PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 45 Table 3 13 Outputs Name Type Description S O 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 SM0 0 COOLING 0 c outban s DE1000 DB 1 2 C_LEDPDB1100 DB x1 2 12 5 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 th
31. Add Remove Select Cancel Help Check the PG PC interface being used For RS232 communication you must assign the interface PLC802 PPI to the PLC programming tool 15 3 Double click the interface PLC802 PPI or click the context menu Properties and the following property dialog is displayed Properties PLCS02 PPI X PFI Local Connection Station Parameters Address Timeout Network Parameters Advanced FFI Me Multiple master network Transmission rate 38 4 kbps Highest station address On the PPI tab page set the baud rate for the transmission rate which the PLC Programming Tool will use for communication NOTE The baud rate you select must be the same as what you have set on the control 4 Open the Local connection tab to specify the COM port to which the RS232 V24 cable is connected Properties PLC302 PPI x FFI Local Connection Connection to Modem connection Default Cancel Help DE 5 Click this button twice to exit the Set PG PC Interface dialog y Double Click 6 Double click this icon on the right side of the communication setting window It will take several to Refresh minutes to search for a valid address 7 Wait until the information on the connected control system is identified as follows and then the connection is ready IHH TCPIP gt IntellA 82579LM Gigab q S090 PPLM bx PLC Subroutines Ma
32. C x 4 Tool code D x 8 Position parity Position strobe PLC Subroutines Manual 54 6FC5397 0FP40 0OBAO 08 2013 Name Type Description OOOO OVload BOOL Turret motor overload NC BOOL Turret pre indexing sensor BOOL Manual tool change key triggering signal Table 3 29 Outputs Name Type Description SO Status display during the tool change Not able to lock in expected time Assigned global variables Monitoring the tool change buffer zone in the JOG mode T_DIR Relevant PLC machine data CO A PEA 14510 20 Max tool number 4 or 6 14510 21 Turret clamping time 14510 22 Monitoring time for tool searching 14512 17 0 PO Activating the turret function of a turning machine PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 55 Example for calling subroutine 52 Network 15 MO HEX 17_0 Turret BIN _T MD INT 20 11 0 MO INT 21 11 1 MO_INT_22 11 2 AS M_CK4 1 3 ALAR M26 11 4 ALARM 24 11 5 ALAR MT 11 6 ALARMAS iW ALARM25 2 0 2 1 P_M_Ck4 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 The difference between the subroutine 52 and the subroutine 53 is that the subroutine 52 uses binary tool position codes while the subroutine 53 uses tool position codes made according to a specific common turret During a tool change
33. Communications Communications Links X Communications Setup None Address 0 Double click the icon representing the PLC to y Double Click communicate with to Refresh Double click the interface icon to change communication parameters Double click the modern icon to setup the modem parameters or dial to start modem communications Communication Parameters Remote Address z Local Address Module LOM 1 Protocol PPI Transmission Rate Mode 11 bit i 2 Double click this icon on the right side Then the following interface setting dialog is displayed OTe Address 0 Set PG PC Interface Access Path LLOP DCP PNIO Adapter Access Point of the Applications Programming Tool 828 Standard for Programming Tool 828 Interface Parameter Assignment Used TCP IP gt Intel R 82579LM Gigab lt Acti PLC802 P FI Diagnostics SFLUSEB Be TCP IP gt Intel R 82573LM Gigab Bel TCP IP gt NdisWwanlp lt Active gt w Es Assigning Parameters to Your NDIS CPs with TEP IP Protocol RFC 1006 Interfaces Add Remove Select PLC Subroutines Manual 18 6FC5397 0FP40 0BAO 08 2013 Double Click to Refresh Note Select the TCP IP pointed to the Ethernet card of your PC and then click the ok _ button You can find the name of your Ethernet card under Start gt Settings gt Network connections on your PC On the left side of the communicatio
34. D Spindle signal processing for the manual machine Disk_MGZ_M Disk tool magazine for a milling machine 61 62 EN Reserved for the subroutine 63 TOGGLE Six key operated switches K1 to K6 Two delay switches K7 K8 MCP interface description input output DB number Bi7 Bits pits ita pits Bi2 Bit BitO Input MCP gt DB1000 DBBO M01 Program MDA Single AUTO REF JOG Hand PPU test block POINT wheel penn R Turret2_BIN_T Turret control of the turning machine turret type position detection with encodings V DB1000 DBB2 100 10 INC 1 INC Key 21 Key 20 Key 19 Key 18 Key 17 INC DB1000 DBB3 Key 32 Key 31 Cycle Cycle RESET Spindle Spindle Spindle start Stop right Stop left DB1000 DBB4 Key39 Key38 Key37 Key36 RAPID Key 34_ Key 33 pB1000 DBBS PLC Subroutines Manual 6 6FC5397 OFP40 OBAO 08 2013 Input output_ DB number Bi7 66 pits pita e e Bin eto DBAO00 DBBS DB1000 D8B87 o y DB1000 DBB8 Feed override value in Gray code DB1000 DBB9 Spindle override value in Gray code AO Output PPU DB1100 DBBO LED8 LED 7 LED 6 LED 5 LED 4 LED 3 LED 2 LED 1 gt MCP DB1100 DBB1 LED LED15 LED14 LED13 LED12 LED11 LED10 LED9Q DB1100 A DB1100 DBB2 2 LED22 LED21 LED20 LED19 LED18 LED17 24 DB1100 0883_ LED30 LED 29 LED28 LED27 LED26 LED25 B11000884 DB1100 DBB5 DB1100 DBB6 DB1100 DBB7 7 SEG LED 1
35. DB1100 DBB10 DB1100 DBB11 DB1100 DB8B812 o oo Pa Pan 1 The decimal point of the 7 SEG LED 1 2 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 following illustration for a horizontal MCP E a E E m A E WHEEL JOG REF POINT RAPID E E A E Eg Key 16 MM Key 17 Key 18 Key 37 Bj Key 38 Key 39 AUTO BLOCK MDA E E E E E a Oo E A lo o ROV Key 19 Key 20 MM Key 21 a 4 e 10 i 1 iO UC 2 PLC Programming Tool 2 1 Installing the 808D Toolbox You must install the 808D Toolbox on your PC PG PLC Programming Tool The 808D Toolbox contains the following software tools and information e Config Data 808D System software update Examples EasyXLanguage symbols for MCP customized keys template for MCP strips PLC subroutine library PLC Subroutines Manual 6FC5397 0FP40 0BA0O 08 2013 T e PLC Programming Tool The tool for creating PLC user programs e Windows setup software for toolbox e User documentation e License information and conditions about Open Source Software Readme_OSS e SinuComPCIN e Access MyMachine P2P AMM Installing the 808D toolbox The toolbox installation folder is shown below examples O license setup O UF 4 autorun inf User_doc Setup Information 1 KB Setup exe f
36. OL sosa ee eee 2 1 Installing the 808D TOOIDOX sa csersiesueennsaseiniceanaiciantarini iawaisansagerideiangiednviuhidieianniemnsai dacieneinannduelidtiumeiaanscities 2 2 PLEC INS TUCUONS PAM e S EE 2 3 Data EE 2 4 Program Ol OAM AMA O o OI A KETENE EE AO 2 9 Testing and monitoring your program cccceecccescccsscecceececsececeueceeseceseeeeseueessuecsseeensesetsueessaessneeteneeeeneas 2 6 Establishing a connection with the RS232 interface occcconccccccccncococnncnnncnnonononcnnnnnnononnnnonnnoncnnnrnnnnnnnnnnnos 2 Establishing a direct connection with the Ethernet interface oocccconccccccccnnonncnncnnocnnononcnnnnnnoncnnnnnnonanennnnos 2 8 Establishing a network connection with the Ethernet interface ooccccoonccccccccnccnocnncnonnnnonnonononnnnnnnncnnonos 2 9 PLC application Download Upload Copy COMPAT8 occoocccccccnccccnccoccncnccncnncnnnncnnnonnnnonononnnnnonnnnnnnnnonnnnnnnnnnnnnos 3 A nn PP o E 3 1 E o e r 3 2 Conventions for the symbols used in the SUDroutines ooccccocccncccccnncnnnnncnnononcnnncnnononononnnnonononnnnnnnannnnnnoos 3 3 Subroutine 20 AUX_MCP machine auxiliary functions cooooocncccoccnconoconononcnnnnnononnncnnononnnnonanononnnoos 3 4 Subroutine 21 AUX_LAMP working lamp ooocccccoccocccoccnccoocnnononcnnonorononnnnnnononnnnonnnrnonnnrnnnnnnrnnnnnnrnnnnnnos 35 Subroutine 22 AUX_SAFE_DOOR safe door ooccccccoccccccoccncconconononcnnonnnonononnnnnnnncnnon
37. OOL Calling the ASUP1 rising edge active Table 3 18 Outputs Name Type Description SS O Occupied global variables IniASUP1 M229 0 Mark of ASUP1 initialization IniASUP2 M229 1 Mark of ASUP2 initialization Relevant PLC machine data None Example for calling subroutine 46 OME PI_SEWICE EN Us nodet ASUPTRUNFASUP1 run FEROIASUP1_treASUP2Run FEROSASUP tr Err FASUP1_err Err PAsSuP err 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 In subroutine 47 you can assign DB1700 DBB1000 to the Program index to select the corresponding part program Local variable definition Table 3 19 Inputs Name Type RR C C RNCCS BOOL The index for a part program PLC Subroutines Manual 48 6FC5397 0FP40 0BAO 08 2013 Table 3 20 Outputs Name Type Description S O BOOL Part program selection finished BOOL Part program selection error Assigned global variables SelPP_FinOm BOOL M239 6 Indicates that a part program has been selected SelPP_ErrOm BOOL M239 7 Indicates that an error occurs when selecting a part program Relevant PLC machine data None Example for calling subroutine 47 OME PLE select_PP EN FatFraMr4PF_num Finish SelPP_fin Errore SelPP_err 3 21 Subroutine 48 ServPlan service plan
38. RMS 3 31 Subroutine 59 MM_MCP_808D Purpose To use subroutine 59 you must have licensed the optional Manual Machine Plus function for the SINUMERIK 808D ADVANCED T Turning 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 In this case call subroutine 59 MM_MCP_808D after executing subroutine 37 MCP_NCK Then you do not need to rewrite subroutine 37 MCP_NCK PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 63 Local variable definition Table 3 40 Inputs Name es Description O SP_STOP_K BOOL Spindle stop Outputs None Assigned global variables None Relevant PLC machine data No Unit Range Description S MD14512 19 7 1 to enable the manual machine function 0 to disable the manual machine function Example for calling subroutine 59 084500 08 1019 MM MCP S080 EN FPM _SP_STOF 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 key In the manual mode you can rotate the tool magazine clockwise or counter clockwise and enable the tool magazine to reach the spindle or tool cha
39. SIEMENS SINUMERIK SINUMERIK 808D ADVANCED PLC Subroutines Manual User Manual Legal information Warning notice system This manual contains notices you have to observe in order to ensure your personal safety as well as to prevent damage to property The notices referring to your personal safety are highlighted in the manual by a safety alert symbol notices referring only to property damage have no safety alert symbol These notices shown below are graded according to the degree of danger AXDANGER indicates that death or severe personal injury will result if proper precautions are not taken ARWARNING indicates that death or severe personal injury may result if proper precautions are not taken AR CAUTION indicates that minor personal injury can result if proper precautions are not taken NOTICE indicates that property damage can result if proper precautions are not taken If more than one degree of danger is present the warning notice representing the highest degree of danger will be used A notice warning of injury to persons with a safety alert symbol may also include a warning relating to property damage Qualified Personnel The product system described in this documentation may be operated only by personnel qualified for the specific task in accordance with the relevant documentation in particular its warning notices and safety instructions Qualified personnel are those who based on their training and experience are capab
40. X2 0 Drives not ready SBR33 EMG_STOP 700017 DB1600 DBX2 1 Operate chuck when spindle or part program is SBR56 Lock_unlock_T running 700018 700019 SBR45 LUBRICAT 700021 700022 PLC Subroutines Manual 6FC5397 0FP40 0BAO 08 2013 67 Interface Address Alarm Description From SBR 700023 DB1600 DBX2 7 Programmed tool number gt max turret on turret SBR52 Turret2_BIN_T number SBR53 Turret3_CODE_T 700024 DB1600 DBX3 0 Max tool number setting error 700025 DB1600 DBX3 1 No position signals from turret 700026 DB1600 DBX3 2 Not able to find expected tool in monitor time 700027 DB1600 DBX3 3 Approach reference point again after rotation SBR40 AXIS_CTL monitoring 700028 DB1600 DBX3 4 Tool is not locked SBR53 Turret3_CODE_T 700029 DB1600 DBX3 5 Reminding information for 1st service plan SBR48 ServPlan 700030 DB1600 DBX3 6 Alarm for 1st service plan 700031 DB1600 DBX3 7 Magazine not in spindle position or original SBR60 Disk_MGZ_M position 700032 DB1600 DBX4 0 Magazine in spindle position and original SBR60 Disk_MGZ_M position 700033 DB1600 DBX4 1 Magazine turn key when magazine or spindle SBR60 Disk_MGZ_M not ready 700034 DB1600 DBX4 2 Block search tool in spindle lt gt programmed SBR60 Disk_MGZ_M tool 700035 DB1600 DBX4 3 Spindle not reach tool release pos in time SBR60 Disk_MGZ_M 700049 DB1600 DBX6 1 Reference point X axis not reached SBR58 MM_MAIN 700051 DB1600 DBX6 3 Wrong spindle direction started SBR5
41. a connection with the RS232 interface You can establish a communication between the control system and the PC PG via the RS232 interface Operating sequence to make an RS232 connection to the control 1 Connect the control system with the PC PG using an RS232 cable SYSTEM 2 Select the desired operating area on the PPU DON SHIFT ALARM PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 13 _ 3 PLC gt STEP 7 connect 4 Connect O OH Press these two softkeys in succession to open the following communication setting window Communication settings Active communication paraneter Baud rate 38408 Q Stop bits 1 Parity Even Data bits a Use this softkey to select a communication baud rate The SINUMERIK 808D ADVANCED supports the following baud rates e 9 6 kbps e 19 2 kbps e 38 4 kbps e 57 6 kbps e 115 2 kbps Activate the RS232 connection with this softkey No modifications to the settings are possible in this state The active or inactive state is retained even after a power on except when starting with the default data In the lower right corner of the screen the REX icon shows that the connection to the PG PC via the RS232 interface is active Operating sequence to configure communications in the PLC Programming Tool 14 1 Start the PLC Programming Tool on your PC PG and click this button in the navigation bar to open the following dialog Communications Links x
42. a or parameterize various parts of the program 2 4 Program organization When programming the PLC you must structure your program into finished program parts Subroutines The programming language for S7 200 offers you the capability to set up your user program in a structured manner There are the following two types of programs e The main program e The subroutine Eight levels of programming are possible PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 9 2 5 Testing and monitoring your program You can check or perform an error analysis of the user program in two methods e HMI of the SINUMERIK 808D ADVANCED e PLC Programming Tool Testing and monitoring a PLC program with the HMI SYSTEM N There are three ways for program testing and monitoring in the lt SYSTEM gt operating area sHirr ALARM o pre PL gt inne WW AL Wu Jog PLC status display Operand STEP 7 PLC connect status Format Value B B You can enter an operand to view its status Use the softkey softkey to change the value of the operand and the all prc PLC AL ANN Wu Jog STEP 7 connect 10 Operand Operand or Status gt list PLC Status status list Status PLC Program Edit PLC list program list alarm txt 8 8 gagaaaaa 8 pub 1 11111011 1 geeeeaaa 1 passes 2 11111111 2 098088998 2 0980988998 3 0009 3 pgBaBaBA 3 puuBBaaa 4 9000809 4
43. adjacent tool on a turning machine or a machine centre The turret tool position ranges from 2 to 64 For example PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 57 Current postion Local variable definition Table 3 32 Inputs Name Type Description DWORD The max turret tool position number DWORD Programmed tool number DWORD Current position of the turret Table 3 33 Outputs Name Type Description 2222222 Pu a indexing position the previous tool position of the desired tool in the direction of lanai A adjacent tool pre ps Tool change direction 1 CW 0 CCW Assigned global variables None Relevant PLC machine data None Example for calling subroutine 54 This subroutine is called by subroutine 52 and subroutine 53 Network 9 Make out the direction of turret as well as pre indexing position ONE TOOL_DIR EN PLINDEXo M20 1 49 Tmax P_INDEXo P_C_TFUNC4Pnum T CURRENT 4 Pcurr PLC Subroutines Manual 58 6FC5397 0OFP40 OBAO 08 2013 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 In the JOG mode press the Tailstock key to move the tailstock forward or backward Pressing Tailstock moves the tailstock forward and one more pressing moves the tailstock backward In the AUTO mode you can use M20 or M21 to control the forward
44. andwheel assignment with the HMI Oo Handwheel assignment with the MCP PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 39 Example for calling subroutine 39 HHU_ ACT HAN DV HAL i EN 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 M03 M04 SPOS etc The motor brake is automatically controlled by the SINAMICS V70 drives This subroutine provides two ways to realize the hardware limit control e PLC solution MD14512 18 bit 6 0 Each feed axis has one MD14512 18 bit 7 1 or two MD14512 18 bit 7 0 hardware limit switches This subroutine activates the NCK hardware limit function via the NCK interface DB380xDBX1000 0 or DB380xDBX1000 1 according to the configurations of the hardware limit switches and thus makes the NCK produce a feed stop signal to an over distance axis Furthermore you can also connect the output OVImt of this subroutine with the input HWL_ON of subroutine 33 to activate the Emergency Stop automatically once the hardware limit of any axis has been reached e Hardware solution MD14512 18 bit 6 1 This solution is independent of the PLC and thus is much safer 24 VDC
45. at 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 Normally lubricating starts automatically and cyclically according to specified time interval Lintv and operates for a specific time Ltime at each cycle Lubrication stops in case of an Emergency Stop lubrication motor overload low lubricant level This subroutine can activate following alarms e Alarm 700020 lubrication motor overload e Alarm 700021 low lubricant level Local variable definition Table 3 14 Inputs Name Type_ Description 222 WORD Lubricating time interval unit 1 min WORD Lubricating time duration of each cycle unit 0 01 s max 327 67 s BOOL Manual lubricating key triggering signal BOOL Mode selection the lubrication starts at the first PLC scan BOOL Lubricating motor overload BOOL Low lubricate level Table 3 15 Outputs Name Type Description S O BOOL Lubrication output L_LED BOOL Indicant for lubricate output PLC Subroutines Manual 46 6FC5397 0OFP40 OBAO 08 2013 Assigned global variables se Timer for the lubricating time intervals unit min L_time Timer for very lubricating time duration unit 0 01s max 327 67 S Relevant PLC machine data No Unit Range Description 2222222222 14510 24 Min Lubricating time interval 14510 25 100 to 2 000 Lubricating time dur
46. ation Example for calling subroutine 45 OME LUBRICAT L outPoos L_LED FM CK3 MD_INT_25 Pm CKS ONE 12 7 12 6 3 19 Subroutine 46 PILSERVICE Asynchronous Subroutine Program Purpose Subroutine 46 is for realizing functions like ASUP Asynchronous Subroutine Program deleting a password and reading current tool number ASUP function means the execution of PLCASUP1 SPF or PLCASUP2 SPF called by the PLC The SINUMERIK 808D ADVANCED provides two ASUPs for the PLC The two ASUPs can not be simultaneously executed and the PLCASUP1 SPF has a higher priority over the PLCASUP2 SPF In a program firstly you can initialize the ASUP1 and ASUP2 by setting Pl index DB1200 DBB4001 and NCK read write start DB1200 DBX4000 0 and then use a rising edge to trigger ASUP1 start DB3400 DBX0 0 and ASUP2 start DB3400 DBX1 0 Table 3 16 Relevant machine data 10702 IGNORE_SINGLEBLOCK_MASK 11602 ASUP_START_MASK 11604 ASUP_START_PRIO_LEVEL 20116 IGNORE_INHIBIT_ASUP Note Important The SINUMERIK 808D ADVANCED 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 PLC Subroutines Manual 6FC5397 0FP40 0BA0O 08 2013 47 Local variable definition Table 3 17 Inputs Name Type Description S ASUP1_trigger BOOL Calling the ASUP1 rising edge active ASUP2_trigger B
47. automatic lubrication after first power on factory setting Bit 4 signal that external spindle stops Bit 5 spindle positioning direction Bit 6 the hardware limit is independent from a PLC program Bit 7 each feed axis has a hardware limit switch activated when Bit 6 0 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 manual machine function this function become active if you have installed licensed turning machine system and called it with a PLC subroutine 14512 20 Bit 1 Spindle disable mode 0 disable by pressing the spindle stop key 1 disable when detecting the standstill speed 1 1 When setting bit 1 to 1 make sure that the speed control mode is active 3 2 Conventions for the symbols used in the subroutines The symbols used in the subroutines follow the conventions listed below e Leading characters designate the destinations of interface signals P_ to PLC interface H to HMI interface Nto NCK interface M_ to MCP interface PLC Subroutines Manual 32 6FC5397 OFP40 OBAO 08 2013 e Subsequent characters are for areas N NCK C_ Channel 1_ Axes M MCP Other short forms of the symbols HWL Hardware Limit HW Handwheel RT Rapid Traverse TK Traverse key ACT Active SEL Selected e A symbol consists of a maximum of 11 upper case characters and numbers including the
48. d 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 You can then use the handwheels to control the movements of your machine Local variable definition None Assigned global variables None Relevant PLC machine data None PLC Subroutines Manual 42 6FC5397 OFP40 OBAO 08 2013 Example for calling subroutine 41 ONE full HAL _Hih_Sel ONE ONE OME NULL b 10_LEDPNULL_b 100_LEDPNULL_b HHU ACT o 7 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 key and then press the SPINDLE STOP key after that the spindle brakes In the AUTO mode the spindle brakes when it changes rotating direction or coasts down When the spindle brakes corresponding output becomes active meanwhile the spindle does not accept rotary command until braking completes PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 43 Local variable definition Table 3 9 Inputs Name Type Description 222222 DELAY WORD Spindle braking duration unit 0 1 s BOOL SP_EN BOOL Spindle action condition 1 allowed 0 not allowed BOOL Spindle braking function 1 enabled 0 forbidden Table 3 10 Outputs Name Type Description S O SP_brake BOOL Spindle braking output
49. efinition None Relevant PLC machine data None Example for calling subroutine 31 OME PLO_ini_USR_ini EN 3 8 Subroutine 32 PLC_INI PLC initialization Purpose Subroutine 32 is executed at the first PLC cycle SMO 1 This subroutine set NCK interface signals according to the machine settings defined by PLC machine data In this subroutine the following interface signals are set e DB3200 DBX6 7 feed override of the NCK channel becomes active PLC Subroutines Manual 36 6FC5397 OFP40 OBAO 08 2013 e DB380x DBX1 5 measurement system 1 of the axes is active e DB380x DBX1 7 feed override of the axes is active e DB1700 DBX1 3 active ROV the following are reset e DB1700 DBX0 6 reset DRY At the end of this subroutine subroutine 31 PLC_ini_USR_ini is automatically called You can program the initialization of customer PLC project in the subroutine 31 Local variable definition None Relevant PLC machine data None Example for calling subroutine 32 Network 1 Initialization SCAN_1ST PLC_INI EN 3 9 Subroutine 33 EMG_STOP NOTICE Program safety Do check whether this subroutine complies with the 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 control enable signal for SINAMICS V70 If you want to clear the emergency stop alarm you must first release the Emergency
50. em with the local network using an Ethernet cable TEM 2 Select the desired operating area on the PPU 0 A SHIFT ALARM SENOS 3 Press these two softkeys in succession to enter the service control window it displ Service control TEREE 4 Press this softkey to enter the window for network configuration network Note In this case make sure the following vertical softkey is deselected Direct connect 5 Configure the network as required in the following window Local data Protocol TCP IP DHCP Yes Cmpt nane HONAKE_HCU IP address 12 16 B2 z Subnet mask 255 255 255 Gateway DHS 1 E 3 DHS Domain test comT Honitoring time 38 MAC address H 1c 66 f Ff ba 58 You can configure the DHCP with the hardkey e lf you select Yes for the DHCP the IP address and subnet mask will be automatically assigned If you select No for the DHCP you must manually enter the values for the IP address and subnet mask The IP address here must be within the same network segment with the IP address of your PC PLC Subroutines Manual 20 6FC5397 0OFP40 OBAO 08 2013 6 Press this softkey to save the configuration If you select Yes for the DHCP you need to Save restart the control system to activate the network configuration Operating sequence to configure communications in the PLC Programming Tool Tay 1 Choose these two menus from the menu bar to open the following communication setting NN window
51. f safe door function 0 do not use 1 use 14512 16 3 Safe door function is activated by M01 M02 0 deactivate 1 activate Example for calling subroutine 22 MDOD_HE _16_2 T_or_h Alls SAFE DOOR H __ EM nodef DoorOpF 20 6 FM CKS4Ooork DoorLED RM CK IZ OaisDoorclls MsgDoor PALARMBO WO HEX 16 34h 2 Op PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 35 3 6 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 key the output ChipFwd is high at second time pressing of the Chip Forward key the output ChipFwd becomes low When the output ChipFwd is low the output ChipRev becomes high at pressing Chip Reverse key and becomes low at releasing the Chip Reverse key Local variable definition None Relevant PLC machine data No MR SS 14512 16 1 Selection of chip remover function 0 do not use 1 use Example for calling subroutine 23 MO_HEA_16_1 T_or_M All CHIP c EN nodef ChipFwd ChipFwdk ChipFwed Chiprevke ChipRewL ChipRevw 3 7 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 Local variable d
52. he comment text box you can add your own additional information for the PLC application Properties OB1 General Protection Name Author Block Number Date Created 08 08 2008 08 09 44 am Last Modified 05 29 2073 10 00 06 am Comment Subroutine Library Falcon I YO0 07 003 for turning Then in the version display on the control the added information is visible PLC Application default default _turning ptp 13 29 65 66 2013 Subroutine Library Falcon II Y6H 61 64 for turning 65 66 2613 PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 31 3 PLC subroutines 3 1 PLC machine data Table 3 1 USER_DATA_INT No junit Description S O 145101021 f bayout of the traverse keys 3 3 33 3 14510120 f The maximum number of tool bits S Turret clamping time OOOO 14510 21 Turret clamping time 14510 22 Monitoring time for searching a tool 14510 24 Lubricating intervals 14510 25 Lubricating duration Table 3 2 USER_DATA_HEX No Descriptions S O 14512 16 function of chip remover milling function of safe door milling when the function of safe door is active it can be triggered by M01 M02 milling handwheel assignment with the MCP HMI 14512 17 turret turning tool magazine milling clamping function turning tail stock function turning selection between handwheel and hand held unit 0 handwheel 1 hand held unit 14512 18 Special configurations for a machine Bit 2
53. le 3 42 Outputs Name Type Description S MgzSp_LED BOOL Magazine reaches spindle position MgzOrg_LED BOOL Magazine reaches original position Assigned global variables MgzCW_cmd BOOL M230 0 Command for clockwise rotation of the tool magazine MgzCCW_cmd BOOL M230 1 Command for counter clockwise rotation of the tool magazine Mgz_rot_CMD BOOL DB4900 DBB24 Tool change command from the tool change subroutine PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 65 Relevant PLC machine data None Example for calling subroutine 60 084500 01851 041 7 0 DISK Moz M EN 04nodef Mozo Pa 1 0 11 2 ahigz cnt PANES NE 081000 08 lt 1 55 MgzRef_k MazSsp_o FQ1 2 081000 08 1 4 hMgzC4w_k Mogz rg_op 21 3 DB1I000 DBx1 b4iMigztcyy SpRelTorat4 DB1IO00 DBxX2 14MgzSp_k RelT_En_o FDB1100 0B0x2 3 DB1IO00 DBx2 24MgzOrg_k MgzSp_L DB1100 DBx2 1 1 37 hmMgz5p_p MozOrg_L F081100 08x2 2 11 44 hmgz0Org_p 1 57T_rel_ pos 1 647 Ick pos DB1000 DBxX2 447_rel_k DB1000 0BxX 347_rel_Enk W251 O4Reserved 251 07 Reserved2 251 07 Reserved3 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 Two types of switches are provided in subroutine 63 more specifically a hold switch for switching a circuit on press and off press again and a delay switch for switching on a circuit and automatically switching it off after a certain time period A t
54. le of identifying risks and avoiding potential hazards when working with these products systems Proper use of Siemens products Note the following 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 The permissible ambient conditions must be complied with The information in the relevant documentation must be observed Siemens AG 2012 2013 All rights reserved 6FC5397 0FP40 OBAO 08 2013 1 Preface Applicable products This manual is applicable to the following control systems Control system SINUMERIK 808D ADVANCED T Turning SINUMERIK 808D ADVANCED M Milling Documentation components and target groups Component User documentation Programming and Operating Manual Turning Programming and Operating Manual Milling Programming and Operating Manual ISO Turning Milling Programming and Operating Manual Manual Machine Plus Programmers and operators of turning machines Turning Diagnostics Manual Mechanical and electrical designers commissioning engineers machine operators and service and maintenance personnel Manufacturer service documentation Commi
55. leading character Except for underlines you cannot use any other special symbols like 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 Note Important If the colour of a symbol is displayed in red this indicates that the naming does not follow the rules of the PLC Programming Tool In this case you must check e whether the name uses special symbols like etc e whether the leading character is a number If there is a red wave under a symbol name or address it indicates that you have used the same symbol name or address for another symbol there is also a red wave under its name or address In this case you must check the repeated name or address and change it 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 Symbol table 15 PLC_sle_PP This symbol table is for the PLC to select part programs It defines the interface signals for the PLC to select part programs Symbol table 16 IS_MCP This symbol table is for the manufacturer defined MCP interface signals With this symbol table you can define the MCP signal tables
56. locks MAIN SBR INT DB Data Blocks only actual values cancel PLC Subroutines Manual 6FC5397 0FP40 0BA0O 08 2013 23 DK 3 Click this button 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 this button W Data Blocks only actual values All i 5P_INI 0063303 Mw SP_LACT 063304 M CTAL_E 063306 4 Choose to download the PLC application when the PLC is in the run mode or in the stop mode pownioad ij x Downloading the program during RUM mode should only be performed by authorized personnel who understand the limitations of downloading a program in RUM mode with respect to system operation Downloading the program during RUN mode can result in unexpected system operation causing serous injury death and or damage to equipment Place the PLC in STOP mode Download in Aun Mode Cancel Caution You are recommended to download the PLC application when the PLC is in the stop mode Downloading the PLC application when the PLC is in the run mode can cause machine damages or even human injuries 5 The download starts and it will take several seconds to do it DK 6 The download finishes when the following message appears Then click this button to end your operations PLC Programming Tool X 1 Download was Successful Note If you have chosen to download when the PLC is in the stop m
57. marks of Siemens AG The remaining trademarks in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owner Disclaimer of Liability We have reviewed the contents of this publication to ensure consistency with the hardware and software described Since variance cannot be precluded entirely we cannot guarantee full consistency However the information in this publication is reviewed regularly and any necessary corrections are included in subsequent editions Siemens AG Industry Sector Postfach 48 48 90026 N RNBERG PLC Subroutines Manual 6FC5397 0FP40 0BAO 08 2013
58. n setting window enter the IP address for the corresponding SINUMERIK 808D ADVANCED control which is previously displayed in the link setting dialog on the control as shown below Communication Parameters Remote Address 169 254 11 22 Double click this icon on the right side of the communication setting window to establish a connection to the specified IP address Communications Links Communications Setup IHH TCP IP gt Intel A 82579LM Gigab 2 Double click the icon representing the PLC to 4 5080 PFU16 communicate with E Double click the interface icon to change communication parameters Double click the modem icon to setup the modem parameters or dial to stark modem communications Communication Parameters Remote Address 169 254 11 22 Module TCPYIP gt IntelA 8257 9LM Gigab Protocol PPI e Before configuring communications in the PLC Programming Tool make sure the connection must be already enabled on the control e Ensure that the IP address of your PC and the IP address of the control exist in the same network segment PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 19 2 8 Establishing a network connection with the Ethernet interface You can establish a network connection between the control system and the PC PG via the Ethernet interface Operating sequence to enable an Ethernet network connection to the control 1 Connect the control syst
59. nge position respectively through the Clockwise rotation of the magazine Counter clockwise rotation of the magazine Tool magazine reaching the spindle and Tool magazine reaching the tool change position keys In the auto mode you need to execute M06 to call the tool change subroutine when compiling a part program Subroutine 60 and the tool change subroutine must be used together during the tool change process Three operations are involved in the tool change control that is tool return tool retrieval and tool change 1 The tool return operation is to return the tool on the spindle back to the tool magazine disk when compiling TO and a tool is located on the spindle 2 The tool retrieval operation is to get the desired tool from the tool magazine disk and install it on the spindle when compiling Tx x 0 and no tool is on the spindle 3 The tool change operation is to first return the tool on the spindle back to the tool magazine disk and then get the desired tool from the tool magazine disk when compiling Tx x 0 x number of the tool on the spindle For details please refer to the tool change subroutine The following machine data is involved in this subroutine MD10715 M_NO_FCT_CYCLE O MD10716 M_NO_FCT_CYCLE_NAME O MD22550 TOOL_CHANGE_MODE PLC Subroutines Manual 64 6FC5397 OFP40 OBAO 08 2013 MD22560 TOOL_CHANGE_M_CODE Local variable definition Table 3 41 Inputs Name Type Description S Tab
60. nly actual values 5 The upload has been completed when the following message appears PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 27 6 Click this button and you can view the upload results Network 1 turning or milling setting for the following program 255 0 R OME 50 0 Flag with defined ONE signal T_or_M M255 0 0 turning 1 milling Network 2 Initialization 51010 1 PL _ini EN SCAN 1ST 510 1 First PLE cycle 1 and following cycle 0 Network 3 Emergency control SMO O EM s_ STOP EN To upload a PLC application using a USB stick proceed as follows SYSTEM 0 CA SHIFT ALARM Oo Sys EE data gt 868D E data Copy y USB 28 1 2 Insert the USB stick into the USB interface at the front of the PPU Select the desired operating area on the PPU Access the 808D data screen by pressing these two softkeys in succession Access the NCK PLC data folder by pressing this hardkey Then select the machine manufacturer s PLC application file pte Hane Type Ea E Leadscrew error compensation E Global user data E Machine data BR variables E Setting data E Tool data Work offset Press this softkey to copy the selected file Past Press this softkey and paste the pte file into the USB stick with the ac softkey Unplug the USB stick and plug it into the USB interface of your PC PLC Subroutines Manual
61. nnrnnnnnrnnnnnnrnnnnnnrnnnnanos 3 6 Subroutine 23 AUX_CHIP Chip reMover ccceccccsescecceeececceeeeeceusceccaueeesseueeessaseeeseseessegeeessageeesaeees 3 7 Subroutine 31 PLC_ini_USR_ini user initialiZatiON ooooccccoocnnnccncnnconannnononcnnnnanonnnnnnnnnnonnnnnnnnrnnnnnoos 3 8 Subroutine 32 PLC_INI PLC initialization ooooocnccconcncocnnnnonononnnnnnnnnnnnnnnnnonnnnnnnnononnncnnononnnnnnnnrnnnnanos 3 9 Subroutine 33 EMG_ STOP 2 0 ce ccccceccccccescecceececceneeeceeuseeceeucecseusecceeueeesaaeceeseueeessusesssueeessageeesseeeeesagees 3 10 Subroutine 37 MCP_NCK MCP and HMI signal processing ccccooccnccccccncnoccncnnonononnncnnononnnnonancncnnnoos 3 11 Subroutine 38 MCP_Tool_Nr display tool number on the MCP oocccooccnccnccccccnccnconoconononcnnonononcnnnncnonnnoos 3 12 Subroutine 39 HANDWHL selecting a handwheel according to HMI interface signals 3 13 Subroutine 40 AXIS_CTL controlling the spindle and axes c oooccccccoccccconccncnoncnonnnnoncnnncnnononnnnnnnnnnnnnnoos 3 14 Subroutine 41 MINI_HHU handwheel hand held unit cooooccnccocccncccocnnononcncnnnnononnnconononcnnnnanononnnoos 3 15 Subroutine 42 SPINDLE Spindle CONtTOl ocoooocccccccccnccoccnccnoncnnononononnncnononncnnonnncnnnnncnnnnnnnnnnnnnrnnnnnoos 3 16 Subroutine 43 MEAS_JOG measurement in the JOG MOde cooocncconccncccocccccnccnccnnnonononcnnonononcnnancncnnnoos 3 17 Subroutine
62. nononos 3 28 Subroutine 55 Tail_stock_T Tailstcok control program for turning machines cccooocccccccccncncncnncnnncnnnnos 3 29 Subroutine 56 Lock_unlock_T clamping control for turning Machines oocccccoccncccnccnncnonnnononcnnnnnncnnnnos 3 30 Subroutine 58 MM MAIN J sccczseccasencescameanensasaueaactnausenesncesasuceaucensenatcaasesaniencaidacseusacncencuedenssatpeusecnoncesacaunce 3 31 Subroutine 59 WM MCP 800D vs scccccccnetnsceccsnasecevccesskesstesaescedecenaueee deca cndedeboudietaccuededencaduateidvededsbecsteseeeeeres 3 32 Subroutine 60 Disk_MGZ_M disk style tool magazine for MilliMg oooococccccnnnocccnncnoncnnnnnncnnnnos 3 00 Subroutines 34 to 36 57 61 and Blin remar 3 34 S brouine 69 AO CCl Sacate eee Use of user alarms in the PLC SUDrQUIINES ios dias PLC sample applications asma aaa ida iaa dada 5 1 PLC sample application TURNING lso ice 5 2 PLC sample application milling oocccoconcnncccnnnnonnnnnononnncnnncnnonnncnnononcnnnnnrnnnnnnnnnnnnnrnnnnnnrnrnnnrnnnnnnnnnos a E A 1 Overview The PLC subroutines consist of three project files e default_turning ptp sample application for turning machines e default_milling ptp sample application for milling machines e default_ManMachPlus_T ptp sample application for Manual Machine Plus With the sample applications you can get a good understanding about how to create or call a PLC subroutine You can
63. nual 16 6FC5397 0OFP40 OBAO 08 2013 Note Before configuring communications in the PLC Programming Tool make sure the connection is already enabled on the control 2 1 Establishing a direct connection with the Ethernet interface You can establish a direct connection between the control system and the PC PG via the Ethernet interface Operating sequence to enable an Ethernet peer to peer connection to the control 1 SYSTEM 2 OKA SHIFT ALARM 3 17 Serv displ gt Service control gt Direct connect PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 Connect the control system with the PC PG using an Ethernet cable Select the desired operating area on the PPU Set up a direct connection on the control system by pressing these three softkeys in succession The following dialog pops up Link set up IP address 169 254 11 22 Subnet mask 255 255 60 6 The IP address and subnet mask shown are fixed values These values cannot be changed Direct You can cancel the Ethernet peer to peer connection once more using the connect softkey 17 Operating sequence to configure communications in the PLC Programming Tool TEN 1 Choose these two menus from the menu bar to open the following communication setting i window Also you can click the communication button a in the navigation bar or click the communication icon 4 Communications in the project tree to display the window
64. ode you can place the PLC at the run mode again with the PLC Programming Tool click the button py PLC Subroutines Manual 24 6FC5397 0OFP40 OBAO 08 2013 To download a machine manufacturer s PLC application with a USB stick perform as follows gt Export 1 Choose these two menus from the menu bar to export the PLC application created with the PLC Programming Tool to a USB stick 2 Insert the USB stick into the USB interface at the front of the PPU SYSTEM 3 Select the desired operating area on the PPU DON SHIFT ALARM Sys 4 Open the USB stick by pressing these two softkeys in succession FE data gt USB 5 Select the pte file and then press this softkey to copy the file p y y Copy Hane Type Length C8680 on PC DIR j 0 HultiLanguage DIR j Duser cycle DIR j E 1 txt A B E GHEDsys te ing 175 61 HB E Helpi txt HE E Help png 21 67 KB E SinumerikArchitectureT ppt 4 98 HB E alc txt H B E alcu_ eng txt 5 75 KB E almc txt 311 B E almc_chs txt 3685 B E arc_product arc 36 66 KB E cov com 314 B E keys bak 416 E cenmanual pdf 1 74 HE Sple am pte 208 22 KB E se 54d B i a 258D 6 O data Press this softkey and then access the NCK PLC data folder by pressing the hardkey 7 Press this softkey Paste TV 8 A warning note appears warning you that the original pte file will be overwritten Press this OK softkey to continue 9 The download has been completed when the
65. op turret motor overload or program test simulation The timing diagram for positioning a tool in the turret using the Hall effect device positioning sensor is shown as follows Clamping time Clamping time Signals Start T1 ioe SiS Start T6 io 00 CW CW CCW CCW position detection signals This subroutine can activate the following alarms e Alarm 700022 Turret motor overload e Alarm 700023 Programmed tool number higher than the max tool number of the turret e Alarm 700024 Wrong setting of the max tool number for the turret e Alarm 700025 No turret positioning signals available e Alarm 700026 Tool positioning time out PLC Subroutines Manual 52 6FC5397 0OFP40 OBAO 08 2013 Local variable definition Table 3 26 Inputs Name Type Description S T_polar BOOL Polar selection for the tool change 0 tool position low active 1 tool position high active BOOL Manual tool change key triggering signal T_01 to T_06 BOOL Tool position sensor low active OVload BOOL Turret motor overload NC Table 3 27 Outputs Name Type Description OOOO No turret positioning signals available Wrong setting of the max tool for the turret Reserved Assigned global variables Programmed tool number equal to the current tool number Relevant PLC machine data A AE 14510 20 Max tool number 4 or 6 14510 21 Turret clamping time 14510 22 Monitoring time for tool searching 14512 17 0 IS Activating the
66. otal of six hold switches and two delay switches are available in this subroutine with the delay duration being configurable The key inputs or outputs of the subroutine can be connected with any physical inputs or outputs The inputs and outputs of all idle switches are respectively ZERO and NULL_b M255 7 Local variable definition Table 3 43 Inputs Name Type Description 222222 Delay 7 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 Ki_7 Ki_8 BOOL Inputs of delay switches 7 and 8 PLC Subroutines Manual 66 6FC5397 OFP40 OBAO 08 2013 Table 3 44 Outputs Name Type Description gt Ko_1 Ko_8 BOOL Output of switch 1 output of switch 8 Assigned global variables K1ist1 K8st1 MB245 State 1 of the hold switch K1st2 K8st2 MB246 State 2 of the hold switch K1on K8on MB247 On state of the hold switch Relevant PLC machine data None Example for calling subroutine 63 ONE TOGGLES 40 200 P_M_CK P_M_Ck2 4 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 700011 DBIG00 DBX13 Notabletolocktoolinexpectedtime 700013 Operation while chuck is not locked 700014 SBR49 GearChg1_Auto 700015 700016 DB1600 DB
67. pu0BBBaa 4 paBBBaaa 5 008098998 5 0980899989 5 0980089989 6 pausa 6 pausa 7 09898989898 7 098088998 8 9000809 8 pasa 9 paBBaBaaa 18 passaaaa 11 passaaaa 12 puBeaaaa 13 puBBaaaa 14 pananaga 15 pasBaaaa PLC Program Edit PLC program list alarm txt 16 31 22 2012705713 Delete all Change respectively to increase decrease the bit of the operand Use the Delete 15 63 15 2013 07 13 softkey to delete all the entered operands Change PLC Subroutines Manual 6FC5397 0OFP40 OBAO 08 2013 You can view the status of a PLC signal By default three signal status lists inputs flags and outputs are displayed in three columns You can change column Edit sequence or assign a new signal status list variables with the pad softkey 11111111 8 paseanaaa 8 paseagaaa 1 11111611 1 puna 1 pue 2 11111111 2 B0BaBaBa 2 geeseaea 3 pana 3 peneana 3 geeeeaea 4 paBaBaaa 4 gaeeeaea 4 geeaeaea 5 pB0909990 5 seeeeaea 5 seeeeaea 6 paBaBaaa 6 peneana 7 poga 7 geeeeaea 8 pa0BaBBaa 8 gasaa8ea gaeseaea PLC edit pad 16 puseBaaa 11 pesas 12 peana 13 pueseBaaa 14 puaBBaaa SS Ref Point IBO R 7 WI MBO pa ul 6800809998 83 35 26 2011 05 02 You can also change the status of a PLC signal with the faba tit ERA 9909898080890 8 pu 8 gaaaaaaa 1001 pues 1 geeeeaaa 1 geeeeaaa 1002 pasase 2 098088998 2 0980889898 1003 paa 3 puBBBaaa 3 puna
68. rary 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 All the interface signals are named with symbols and assigned to different symbol tables 6 Manmach JOG function 3 3 33 O Special memory bit Structure of the subroutines Subroutine No Name Description is is 0 to 19 wa L Reserved for the manufacturer 20 AUX_MCP Auxiliary function 20 AUX_LAMP Lamp control called in the subroutine AUX_MCP 22 AUX_SAFE_DOOR Safe door control called in the subroutine AUX_MCP of a milling application PLC Subroutines Manual 6FC5397 0FP40 0BA0O 08 2013 5 Subroutine No Name Description 222222 23 AUX_CHIP Chip remover control called in the subroutine AUX_MCP of a milling application 31 PLC_ini_USR_INI Reserved for the initialization by the manufacturer this subroutine is automatically called by subroutine 32 Control of feed axis enable and spindle enable 38 39 43 47 transistor 4 6 position sa E Turret3_CODE_T Hydraulic turret control of the turning machine turret type position detection with encodings Turret2_3_ToolDir Evaluate tool direction and calculate tool position called by Turret2_BIN_T Turret3_CODE_T Tail_stock_T Tail stock control for the turning machine Lock_unlock_T Clamp or release control for the turning machine MM_MAIN MM_MCP_808
69. rgency control Shi0 0 EMts STOP EN PLC Subroutines Manual 6FC5397 0FP40 0BAO 08 2013 29 Compare You can compare the project in the PLC Programming Tool with the project on the control by performing the following steps PL gt Compare 1 Choose these two menus from the menu bar Compare Project to PLC Remote Address 172 176 202 200 Remote PLE Type 8080 PPLU1 6 06 00 Blocks to compare W Blocks MAIN SBR INT DB Comparison Results Blocks You can also select the checkbox Data Blocks only actual values to include the actual values of the data blocks W Data Blocks only actual values All i 5P_INI 063303 M SP_ACT 063304 M CTAL_E 063306 PLC Subroutines Manual 6FC5397 0OFP40 OBAO 08 2013 2 Click this button and the comparing begins Wait for a few seconds and then you can view the Begin compare results Comparison Results Blocks Different Number of POUs Data Blocks SPIN DB S903 Difference at address 6 0 0 lt gt 11 Version display The transferred PLC application will be active in the working memory of the control after the system is started up Then you can view the detailed information about the currently active PLC application in the version display through the following steps N 4 06 19 Serv es Version SHIFT A displ In the PLC Progaming Tool right click the OB1 block and choose Properties In the opened OB1 property dialog in t
70. ssioning Manual Installation personnel commissioning engineers and service and maintenance personnel Function Manual Mechanical and electrical designers technical professionals Parameter Manual Mechanical and electrical designers technical professionals PLC Subroutines Manual Mechanical and electrical designers technical professionals and commissioning engineers My Documentation Manager MDM Under the following link you will find information to individually compile your documentation based on the Siemens content ww siemens com mdm Standard scope This manual only describes the functionality of the standard version Extensions or changes made by the machine tool manufacturer are documented by the machine tool manufacturer Technical support Hotline Service and Support e Global support hotline e Chinese Web site 49 0 911 895 7222 ttp www siemens com cn 808D e Support hotline in China e Global Web site 86 4008104288 china ttp support automation siemens com EC Declaration of Conformity ne Declaration of Conformi ne 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 PLC Subroutines Manual 2 6FC5397 OFP40 OBAO 08 2013 Table of contents ie o EE serge ss woe ees ot spree te satan ease ne nepal ee gene ga ee ee A en SECO E EC CE SO O OS 2 PEC Programming PO
71. t axis hardware limit switch NC 1 The hardware limit is used for the input if there is only one hardware limit switch or when the hardware solution is used Table 3 8 Outputs Name Type Description OOOO OVImt BOOL Over distance output active at any hardware limit high active Assigned global variables SP_CMD M138 1 Spindle start command CW or CCW Relevant PLC machine data 14512 18 6 Overtravel employs the hardware solution wo o Overtravel employs the PLC solution 14512 18 7 Each axis has only one hardware limit switch Each axis direction has an hardware limit switch a 1 14512 20 1 Disable by pressing the spindle stop key Disable when detecting the standstill speed PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 41 No Value Description S O 1 When setting bit 1 to 1 make sure that the speed control mode is active Note When performing the axis control related operations on a stand alone controller without any connection to the motor or drive you need to set MD30350 to 1 for each axis which indicates that the axis specific NC PLC interface signals for a simulated axis are output to the PLC otherwise an alarm will be thrown out indicating axis enable missing Example for calling subroutine 40 510 0 AALS_CTL O4NODEF Ovinite M255 3 14 Subroutine 41 MINI_HHU handwheel hand held unit Purpose Subroutine 41 is used to support the customer s handheld units With a handhel
72. tatus should be kept when clamping outputs are zero Local variable definition Table 3 36 Inputs Name Type Description SO Lock release toggle signal External inside clamping key S_velo BOOL Spindle velocity signals 0 spindle velocity is O 1 spindle is running Foot_switch BOOL Foot switch signal Table 3 37 Outputs Name Type Description gt gt gt O Extin_LED BOOL External inside clamping state 0 external clamping 1 inside clamping Assigned global variables Relevant PLC machine data None Example for calling subroutine 56 Network 9 chuck function in turning OME MD HEx_17_1 Lock_unlock_T El Delay Leki _OFQO 6 LckRel_k Lek2 OPFQO0 7 Extin_k Lek_LEDFM_CK4 S_velo Extin_LED FM _CKS Foot swit Err FALAR M18 PLC Subroutines Manual 60 6FC5397 OFP40 OBAO 08 2013 3 30 Subroutine 58 MM_MAIN Purpose To use subroutine 58 you must have licensed the optional Manual Machine Plus function for the SINUMERIK 808D ADVANCED T Turning 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 Local variable definition Table 3 38 Inputs Name Type Description SS 3 3 3535 Table 3 39 Outputs Name gt Type C Description 2222222 Not approaching the reference point on axis X Not approaching the reference point on axis Z Incorrect start in the spindle direction JOG program
73. tween handwheel and hand held unit 0 handwheel 1 hand held unit 14512 18 One time automatic lubrication after the power on Stop signal for an external spindle Bit5 Fixing the direction of a spindle Hardware limit is independent of the PLC application One hardware limit triggered per axis enabled when bit 6 0 14512 19 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 14512 20 Spindle disable mode PLC Subroutines Manual 6FC5397 OFP40 OBAO 08 2013 73 Index D Data management M MCP interface description O Overview P Program organization S Structure of the subroutines Structure of the symbol tables Subroutine 20 Subroutine 21 Subroutine 22 Subroutine 23 Subroutine 31 Subroutine 32 Subroutine 33 Trademarks Subroutine 37 Subroutine 38 Subroutine 39 Subroutine 40 Subroutine 41 Subroutine 42 Subroutine 43 Subroutine 44 Subroutine 45 Subroutine 46 Subroutine 47 subroutine 48 Subroutine 48 Subroutine 49 subroutine 50 Subroutine 51 Subroutine 53 Subroutine 56 subroutine 58 subroutine 59 subroutine 60 subroutine 63 symbols used in the subroutines System resource distribution U user alarms All names identified by are registered trade
Download Pdf Manuals
Related Search
Related Contents
Hama USB 2.0 Hub 1:7, blue/anthracite MINECTO DUO 40WG - NM Bartlett Inc. HP ENVY Sleekbook 4-1055er MC67 with Android OS Regulatory Guide [English] (P/N VSX-859RDS VSX-859RDS-G VSX-839RDS EPO Software User Guide - Schneider Electric France notre dossier. Manual de instalación Copyright © All rights reserved.
Failed to retrieve file