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.
DANGER
indicates that death or severe personal injury will result if proper precautions are not taken.
WARNING
indicates that death or severe personal injury may result if proper precautions are not taken.
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 capable of identifying risks and
avoiding potential hazards when working with these products/systems.
Proper use of Siemens products
Note the following:
WARNING
Siemens products may only be used for the applications described in the catalog and in the relevant technical
documentation. If products and components from other manufacturers are used, these must be recommended
or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and
maintenance are required to ensure that the products operate safely and without any problems. The permissible
ambient conditions must be complied with. The information in the relevant documentation must be observed.
Trademarks
All names identified by ® are registered trademarks 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
GERMANY
Order number: 6FC5397-2EP10-0BA0
Ⓟ 12/2012 Technical data subject to change
The EC Declaration of Conformity for the EMC Directive can be found on the Internet at
http://support.automation.siemens.com
Here, enter the number 15257461 as the search term or contact your local Siemens office.
Licensing provisions
The SINUMERIK 808D software is protected by national and international copyright laws and
agreements. Unauthorized reproduction and distribution of this software or parts thereof is
liable to prosecution. It will be prosecuted both according to criminal and civil law and may
result in severe penalties or claims for compensation.
In the SINUMERIK 808D, open source software is used. The licensing provisions for this
software are included on the Toolbox DVD and are to be observed accordingly.
The PLC subroutines consist of three project files:
● default_turning.ptp (sample application for turning machines)
● default_milling.ptp (sample application for milling machines)
● 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 realize most machine functions by re-organizing the PLC
subroutines or modifying some must networks.
System resource distribution
WARNING
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.
The system resources can be distributed into three parts:
● PLC system
– Inputs
I0.0 to I2.7 (24 inputs of the SINUMERIK 808D)
I3.0 to I8.7 (distributed 48 inputs)
– Outputs
Q0.0 to Q1.7 (16 inputs of the SINUMERIK 808D)
Q2.0 to Q5.7 (distributed 32 outputs)
– Memory
M0.0 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
T0 to T15 (100ms timer)
T16 to T63 (10ms timer)
– Counter
C0 to C63 (64 counters)
● NCK
– PLC machine data: MD14510, MD14512, MD 14514
– MD14510 machine data INT: DB4500.DBW0 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)
● PLC Programming Tool
– Symbol table: SYM1 to SYM32 (32 symbol tables)
– Subroutine: SBR0 to SBR63 (64 subroutines)
Structure of the symbol tables
The PLC subroutine library has been designed with symbol addressing method, which helps
you easily understand the PLC programs. All the addresses in the subroutine library use
symbols for programming. All the interface signals are named with symbols and assigned to
different symbol tables.
Symbol table Table name Descriptions
1 IO_1 Module I/O are defined by the manufacturer
2 IO_2 Distributed I/O are defined by the manufacturer
3, 5, 7, 13 Reserved for the manufacturer
6 MANMACH JOG function
14 ASUP ASUP function
15 PLC_sel_PP PLC selects part programs
16 IS_MCP Signals from/to the MCP
17 IS_HMI Signals from/to the HMI
18 IS_AUX Auxiliary functions from the NCK
19 IS_NCK Signals from/to the NCK
20 IS_CHA Signals from/to the channel
21 IS_AX1 Signals to/from axis 1
22 IS_AX2 Signals to/from axis 2
23 IS_AX3 Signals to/from axis 3
24 IS_AX4 Signals to/from axis 4
27 MD_PLC PLC machine data
28 ALARM User alarms
29 NV_MEM Non-volatile memory
30 SPC_MEM Special memory bit
31 SBR_MEM Global memory used in the sample applications and subroutines
32 RESVD1 Reserved for the sample applications and subroutines
Structure of the subroutines
Subroutine No. Name Description
0 to 19 - Reserved for the manufacturer
20 AUX_MCP Auxiliary function
21 AUX_LAMP Lamp control, called in the subroutine "AUX_MCP".
22 AUX_SAFE_DOOR
38 MCP_Tool_Nr Display tool numbers via the LED of the MCP
39 HANDWHL Handwheel selection via HMI
40 AXIS_CTL Control of feed axis enable and spindle enable
41 MINI_HHU Handwheel hand held unit
42 SPINDLE Spindle function
43 MEAS_JOG Tool measurement in the JOG mode
44 COOLING
45 LUBRICATE Lubrication control (interval and time)
46 PI_SERVICE ASUP (Asynchronous Subroutine Program)
47 PLC_Select_PP PLC selects a subroutine.
48 ServPlan Service plan
49 Gear_Chg1_Auto Automatic gear change of the spindle
50 Gear_Chg2_Virtual Dummy gear change of the spindle
51 Turret1_HED_T
52 Turret2_BIN_T
53 Turret3_CODE_T
54 Turret2_3_ToolDir
55 Tail_stock_T Tail stock control for the turning machine
56 Lock_unlock_T Clamp or release control for the turning machine
58 MM_MAIN Manual machine
59 MM_MCP_808D Spindle signal processing for the manual machine
60 Disk_MGZ_M Disk tool magazine for a milling machine
61, 62 Reserved for the subroutine
63 TOGGLE Six key-operated switches: K1 to K6
Reserved for the initialization by the manufacturer (this
subroutine is automatically called by subroutine 32)
Signals from the MCP and the HMI are sent to NCK
interfaces
Coolant control (Manual Machine key and M code: M07,
M08, M09)
Turret control of the turning machine (turret type: Hall
element transistor, 4/6 position)
Turret control of the turning machine (turret type: position
detection with encodings)
Hydraulic turret control of the turning machine (turret
type: position detection with encodings)
Evaluate tool direction and calculate tool position (called
by Turret2_BIN_T, Turret3_CODE_T)
Two delay switches: K7, K8
MCP interface description
Input/output DB number Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
Input (MCP ->
Input/output DB number Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
DB1000.DBB2 100
(INC)
DB1000.DBB3 Key 32 Key 31 Cycle
DB1000.DBB4 Key 39 Key 38 Key 37 Key 36 RAPID Key 34 Key 33
DB1000.DBB5
DB1000.DBB6
DB1000.DBB7
DB1000.DBB8 Feed override value (in Gray code)
DB1000.DBB9 Spindle override value (in Gray code)
DB1000.DBB10
Output (PPU > MCP),
DB1100
DB1100.DBB0 LED 8 LED 7 LED 6 LED 5 LED 4 LED 3 LED 2 LED 1
DB1100.DBB1 LED
16
DB1100.DBB2 LED
24
DB1100.DBB3 LED 30 LED 29 LED 28 LED 27 LED 26 LED 25
DB1100.DBB4
DB1100.DBB5
DB1100.DBB6
DB1100.DBB7
DB1100.DBB8 7 SEG LED 1
DB1100.DBB9 7SEG LED 2
DB1100.DBB10
DB1100.DBB11
DB1100.DBB12 DP 2 2) DP 1 1)
● 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 data
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.
You can check or perform an error analysis of the user program in two methods:
● The HMI of the SINUMERIK 808D
● The PLC Programming Tool
Testing and monitoring a PLC program with the HMI
There are three ways for program testing and monitoring in the "SYSTEM" operating area:
● "PLC" > "PLC status"
You can input an operand to view its status.
Use the softkey "Operand +" or "Operand -" to increase/decrease the bit of the operand. Use
the "Change" softkey to change the value of the operand and the "Delete all" softkey to
delete all the input operands.
By default, three signal status lists (inputs, flags and outputs) are displayed in three columns.
You can change column sequence or assign a new signal status list (variables) with the "Edit
pad" softkey:
You can also change the status of a PLC signal with the "Change" softkey.
You can view the status of the main program or use the "Program block" softkey to view the
status of a subroutine:
Two windows are available for you to view the program.
Testing and monitoring a PLC program with the PLC Programming Tool
You can also view the status of your PLC program with the PLC Programming Tool:
1. Establish the communication between the SINUMERIK 808D and the PLC Programming
Tool.
For detailed information about the establishment of the communication between the
SINUMERIK 808D and the PLC Programming Tool, refer to section "Establishing a
conn
ection with the RS232 interface (Page 17)"
2. Use the menu
can also first click the status chart symbol
status.
2.6 Establishing a connection with the RS232 interface
● 115.2 kbps.
The active or inactive state is retained even after a power-on (except when starting with the
default data). An active connection is displayed by a symbol in the status bar:
Communication settings in the PLC Programming Tool
To setup the PPI parameters in the PLC Programming Tool, proceed as follows:
1. Display the "Communication Links" dialog with menu command "View >
Communications", or click communication button
communication symbol
2.6 Establishing a connection with the RS232 interface
4. Double click the interface "PLC802(PPI)" or right-click the "Properties" button, and the
property dialog is displayed. Set the baud rate for the transmission rate, which the PLC
Programming Tool will use to communicate:
NOTE: The baud rate you select must be in accordance with what you have set on the
controller side.
5. Open the "Local connection" tab to specify the COM port to which the RS232 (V24) cable
is connected:
6. Click "OK" twice to exit the "Set PG/PC Interface" dialog box.
You can save, copy or over-write the PLC project or the PLC applications in the control
system.
This is possible using:
● the PLC Programming Tool
● a USB stick
A PLC project contains the PLC user program, including all of the important information
(symbols, comments, ...).
You can upload / download the PLC project to the control system with the PLC Programming
Tool. With the PLC Programming Tool, you can also import and export it in ".pte" format.
You can also read the PLC project in ".pte" format from / to the USB stick directly on the
control system.
3/&
3URJUDPPLQJ
7RRO
Download
3/&DSSOLFDWLRQSWH
56FDEOH
'RZQORDG
8SORDG
&RPSDUH
86%VWLFN
3/&DSSOLFDWLRQSWH
6,180(5,.
'
Figure 2-1 PLC applications on the control system
You can write the transferred data into the permanent memory (load memory) of the control
system with the PLC Programming Tool or an USB stick.
To download a PLC application with the PLC Programming Tool, proceed as follows:
1. Establish the communication between the CNC controller and the PLC Programming Tool
with an RS232 cable.
For information about how to establish a communication between the CNC controller and
the PLC Programming Tool, refer to section "Establishing a connection with the RS232
interface (Page 17)".
2. Use the menu
command "File > Download..." or click the download button
3. Click "OK" to proceed directly. You can also select the checkbox "Data Blocks (only
actual values)" to include the actual values of the data blocks, and then click "OK":
4. Either select to download the PLC application when the PLC is in the RUN mode (the
"Download in RUN mode" button) or in the STOP mode (the "Place the PLC in STOP
mode" button):
It is recommended to download when the PLC is in the STOP mode. Downloading when
the PLC is in the RUN mode can cause machine damages or even human injuries.
You can backup a PLC application from the permanent memory of the control system using
the PLC Programming Tool or an USB stick.
To upload a PLC application using the PLC Programming Tool, proceed as follows:
1. Create a new and empty PLC application using the PLC Programming Tool:
2. Establish the communication between the CNC controller and the PLC Programming Tool
with an RS232 cable.
For information about how to establish a communication between the CNC controller and
the PLC Programming Tool, refer to section "Establishing a connection with the RS232
interface (Pa
3. Use the menu command "File > Upload..." or click the upload button to start the
upload, and the upload dialog pops up:
4. Click the "OK" button.
5. An information dialog appears saying "Uploading will replace the contents of the selected
project components and unsaved changes will be lost. Do you wish to continue?":
6. Click "Yes" and the upload will start.
7. The upload has been completed when the message below appears: