0% found this document useful (0 votes)
324 views47 pages

PLC Sinumerik8 840Dsl

The document provides an overview of the structure and organization of the PLC program for controlling a machine tool interface. The PLC program must include startup, cyclic operation, and process alarm blocks. During restart, the NCK and PLC synchronize and verify system and user data integrity. The operating system then starts cyclic operation in OB 1 where the SIEMENS basic program portion must be called. The PLC and NCK constantly exchange sign-of-life signals during operation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
324 views47 pages

PLC Sinumerik8 840Dsl

The document provides an overview of the structure and organization of the PLC program for controlling a machine tool interface. The PLC program must include startup, cyclic operation, and process alarm blocks. During restart, the NCK and PLC synchronize and verify system and user data integrity. The operating system then starts cyclic operation in OB 1 where the SIEMENS basic program portion must be called. The PLC and NCK constantly exchange sign-of-life signals during operation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

Contents Page

Objectives ........................................................................................................................................ 3
Structure of the basic program ......................................................................................................... 4
Overview of Blocks .......................................................................................................................... 5
Interface Overview ........................................................................................................................... 6
Overview of Interface DBs ................................................................................................................ 7
Machine control panel ...................................................................................................................... 8
Interface Signals Machine Control Panel .......................................................................................... 9
Interface Signals Axis/Spindle .......................................................................................................... 10
Interface Signals Hardware .............................................................................................................. 11
New Interface Signals with 840D sl .................................................................................................. 12
Error and Operating Messages (DB2) .............................................................................................. 13
Error and operational messages ....................................................................................................... 14
Alarm Text File for HMI on PCU50 or PG ......................................................................................... 15
MBDDE.INI for Alarm Texts .............................................................................................................. 16
PLC Status with HMI on PG or PCU ................................................................................................. 17
HW Config: Int. PROFIBUS: S7 Subnet ID ....................................................................................... 18
HW Config: IP Address of CP ........................................................................................................... 19
Auxiliary functions ............................................................................................................................ 20
Overview of Auxiliary Functions and Programming ........................................................................... 21
Output to the PLC ............................................................................................................................. 22
Grouping of auxiliary functions ......................................................................................................... 23
Block change behavior ..................................................................................................................... 24
M Decoding DB75 – DB76 ............................................................................................................... 25
M Decoding List DB75 – DB76 ......................................................................................................... 26
Interface Modification Signals ........................................................................................................... 27

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 1 PLC interface
Contents Page
Interface Auxiliary Functions ............................................................................................................ 28
Interface Auxiliary Functions ............................................................................................................ 29
Interface Auxiliary Functions ............................................................................................................ 30
Interface M Commands .................................................................................................................... 31
TCP/IP Setting PG ........................................................................................................................... 32
S7 Online with TCP/IP ...................................................................................................................... 33
"Accessible Nodes": Getting IP adress of NCU ................................................................................. 34
Creating an S7 Project ..................................................................................................................... 35
Saving a PLC Program ..................................................................................................................... 36
SIMATIC Manager Customizing Options .......................................................................................... 37
The Toolbar in the SIMATIC Manager .............................................................................................. 38
Calling the "Module Information" Tool ............................................................................................... 39
Calling the "Monitor/Modify Variables" Tool ...................................................................................... 40
Displaying Reference Data ............................................................................................................... 41
Exercise: Saving the PLC Program .................................................................................................. 42
Exercise: Alarm and Message Texts ................................................................................................. 43
Exercise: Alarm and Message Texts ................................................................................................. 44
Exercise: Grouping M Commands .................................................................................................... 45
Exercise: Grouping H Commands .................................................................................................... 46
Exercise: M Functions with Decoding List ......................................................................................... 47

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 2 PLC interface
Notes

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 3 PLC interface
PLC Program The PLC program is clearly structured.
The following organization blocks must be available:
•Startup, OB 100
•Cyclic operation OB 1
• Process alarm processing OB40
In OB 1, 40, and 100, the respective part of the SIEMENS basic program has to be
called by the user.

Restart In the course of a restart, NCK and PLC are synchronized. The system and user data
blocks are checked for integrity and the most important basic program parameters are
verified for plausibility. In the event of an error, the basic program outputs an error
identifier to the diagnostic buffer and switches the PLC to STOP. After system
initialization, the operating system runs through OB 100 and always starts cyclic
operation at the beginning of OB 1.
The PLC is synchronized with the MMC and NCK during powerup. After a correct boot
procedure and the first complete OB 1 cycle, PLC and NCK constantly exchange sign-
of-life signs. If no sign-of-life signal is received from the NC, the interface is neutralized
and the signal "NCK-CPU ready" in DB10 is set to zero.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 4 PLC interface
Reserved For cyclic signal exchange NC/PLC the SIEMENS basic program requires
Blocks FB/FC/DB and Timer. All non-reserved blocks are available to the user.

DBs The data blocks of channels, axes/spindles and tool management functions that are
not activated may be assigned as desired by the user.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 5 PLC interface
Interface Overview

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 6 PLC interface
NCK/PLC Interface The interface NCK/PLC consists of a data interface and a function interface. The data
interface contains status and control signals, auxiliary functions and G functions.
The basic program creates these data blocks during system boot using the current NC
machine data (number of channels, axes/spindles etc.).

Data Interface The data interface (interface) is realized with data blocks and divided into the following
groups:
• NCK-specific signals
• Mode groupspecific signals
• Channel-specific signals
• Axis/spindle/drive-specific signals

Description Consists of FBs and FCs via which commands are transferred from PLC to
Interface NCK.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 7 PLC interface
FB 1 FB1 is called absolutely in OB100. The addresses for signal query of the 1st machine
control panel are set via two formal parameters in FB1.
• MCP1Out: POINTER Start address output signals MCP 1
• MCP1In: POINTER Start address input signals MCP 1
The default setting is assigned address zero.
• MCPBusType:=B#16#33 Bus type for PROFIBUS control panel,
MCPBusType:=B#16#55 Bus type for Industrial Ethernet control panel.

FC19/25 FC19 or FC25 are called absolutely or conditionally in OB1. It has 5 formal parameters
for transferring MCP signals from process image memory to the respective data
blocks.
BAGNo := B#16#1 //Mode group no. 1
ChanNo := B#16#1 //Channel No.1
SpindlelFNo:= B#16#4 //E.g. 4th axis is the spindle
FeedHold := M22.0 //Feed stop, modal
SpindleHold := M22.1 //Spindle stop, modal

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 8 PLC interface
MCP SINUMERIK 840D sl key signals are saved starting from input byte IB0 and the LEDs
starting from output byte QB0.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 9 PLC interface
Controller enable The position control loop is closed at edge 0-1. Edge transition from 1-0 leads to a
rapid deceleration and the position control loop is opened. The actual value detection
continues and the controller enable of the drive is removed.
The controller enable can also be reset within the control for different faults e.g. on the
position measuring system.
Pulse enable With 1 signal, pulse enable is present for the respective drive. If pulse enable is reset
for a traversing axis, the axis coasts to a standstill.
Position Measuring Via this interface signal, a measuring system is selected for the
System 1/2 position control. The motor measuring system or the direct measuring system can be
selected.
Axis Disable With 1 signal, no setpoints are output to the position controller. This means that no
travel movement takes place, only the display changes. This signal can also be used
for position travel-in and testing part programs.
Follow-up mode The position setpoint is constantly tracking the actual value. The zero speed and
clamping tolerance monitoring is not effective.
Read-in disable The signal "Read-in disable" is only effective in operating modes AUTOMATIC and
MDI. With signal 1, data transfer of the next block in the part program is disabled in the
interpolator.
Feed disable The signal is effective in one channel for all operating modes. With signal state 0, the
axes can be traversed if a travel request is present. When the signal state changes to
1, the axes are decelerated at the contour, the position lag is removed and the position
control remains active.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 10 PLC interface
CPU Ready These signals are found for the individual components under:
• NCK-CPU DB10. DBX104.7
• Drive DB10. DBX108.6
• HMI CPU DB10. DBX108.3 (to OPI) (or ..DBX108.2, to MPI)

Ready Ready signals of other operation components


• HHU DB10. DBX104.2 HT handheld unit
• MCP 1 / 2 DBX104.0 / 104.1 Machine control panel

Temp. alarm They are the signals:


Fan / • NC DB10. DBX109.5 Heatsink temp.
Battery alarm DBX109.6 Air temp. alarm
DBX109.7 Battery alarm
• HMI DB10. DBX103.6 HMI temp. limit
DBX103.4 HMI air monitoring
DBX103.7 HMI battery alarm
• Motor DB30+n. DBX94.0 Temp. prewarning
MoMo DB30+n. DBX94.1 Temp. prewarning
Heatsink

Hard disk • HMI DB10. DBX103.3 HMI hard disk monitoring

SoftWare • NCK DB10. DBX108.7 NC ready


• Drive DB10. DBX108.5 Cyclic operation

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 11 PLC interface
Holding brake The holding brake actuated by the motor module can be opened via signals.
• DB 30+n. DBX20.5 Open holding brake (n= axis number)
Feedback from the brake is
• DB 30+n. DBX92.5 Holding brake opened

Motor Selection and Detailed description of the special feature here is described in chapter Start-up
Parameter Set NC/PLC/SINAMICS Internally in the SINAMICS, the full 5-bit combination
switchover consisting of 2 bits motor selection and 3 bits parameter set switchover
is used to select the Drive Data Set (DDS).
• DB 30+n. DBX21.0 ... 2 Select drive data set
• DB 30+n. DBX21.3 ... 24 Select motor data set
Corresponding feedback signals are
• DB 30+n. DBX93.0 ... 2 Feedback signal from drive data set
• DB 30+n. DBX93.3 ... 24 Feedback signal from motor data set

Special Feature As described in the above mentioned chapter, there are specific set rules for
the SINAMICS parameters, e.g. the motor data set number
• MDS=p186[DDS]
or the encoder data set number
• EDS=p187[DDS]
The reason is that the drive data sets (DDS) with the same 3 less-significant
bits mean the same motor (and therefore encoder).
Therefore, the following must be identical:
• p186[0] = ... = p186[7]; p186[8]= ... =p186[15] etc.
• p187[0] = ... = p187[7]; p187[8]= ... =p187[15] etc.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 12 PLC interface
DB2 It is defined in DB 2 which bit triggers which message/alarm number. Further, the bits
in DB2 can be used for automatic error reaction (enable/disable) for specified channels
and axes.
From the PLC user program, the respective bits are set in DB 2 and the actions
required for display are triggered in the NC/MMC.
With rising edge of the error bit, the display of error and operating messages is
activated.

Operational are automatically deleted with falling edge.


Messages

Error Messages always have to be acknowledged. The error acknowledge key is determined with the
call of FC10.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 13 PLC interface
The definition whether the set bit is processed as error message (with
acknowledgement) or operational message (without acknowledgement), is preset (see
diagram). The definition always refers to a byte in DB 2.
FC10 Error and operational messages are only displayed if the function block FC10 is
configured and called in the PLC user program.
Via FC10 (error and operational message) the signals entered in DB 2 are evaluated
and displayed on the MMC as incoming and outgoing error and operational messages.
The incoming signals (positive edge) are displayed immediately in the case of both
error and operational message. With outgoing signals (negative edge), only
operational messages are immediately deleted. Error messages re only deleted when
you the acknowledge key is activated. Error messages are retained on the MMC until
they are acknowledged by the user even if the error even if the error status no longer
exists.
FC10 has 2 formal parameters:
ToUserIF :=TRUE
The signals for an NC reaction (e.g. feed disable, read-in disable, feed/spindle hold,
etc.) are transferred from DB 2 to the interface in each cycle.
:= FALSE
The signals for an NC reaction are not transferred from DB 2 to the interface. The user
has to program the error reaction.
Quit :=DB19.DBX20.2
Determines with which key the error acknowledgement takes place. In the example,
the key "Acknowledge alarm" is indicated (only possible with SW 5 and later). Bit
DB19.DBX20.2 has to be reset by the user.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 14 PLC interface
Alarm Text File The file with error texts is saved to hard disk under the directory F:\USER.
The alarm text file can be edited in the "Start-up" operating area, softkey "MMC,
softkey "Editor".
The file name consists of Name_Language-ID.com e.g. alarm_gr.com
The name consists of up to 5 characters.
Language IDs of the 5 European standard languages are:
German gr French fr English uk
Italian it Spanish sp
The maximum length of the alarm text is 110 characters for a 2-line display.
Examples of an error text file in English:
510008 0 0 "Feed disable" // Comment
600108 1 0 "Spindle disable"
Error number Display Help ID "Error text"
•The error number corresponds to one bit in DB 2.
• The display bit determines how the alarm is displayed:
- 0 = Display in alarm line
- 1 = Display as alarm box
• The help ID is for online help systems
• The error has to be in brackets, as shown in the example.
Changes to alarm texts only become effective after PCU restart.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 15 PLC interface
MBDDE.INI For the PCU operating system to be able to find the alarm text file on hard disk, a link
has to be entered in MBDDE.INI.
The MBDDE.INI file must be stored in the directory F:\USER\MBDDE.INI.
Links are entered in section [TextFiles], e.g.:
UserPLC=F:\USER\MYPLC_
If the file name is entered without language ID, the ID is automatically added to the file
name, depending on the selected language, and the language-dependent alarm text is
activated. For this process to work, it is necessary to enter an alarm text file for every
desired language.
UserPLC=F:\USER\MYPLC_GR.COM
If the file name is entered in full, the English alarm text file is used for all languages, for
example.
RotationCycle If the current alarms are to be switched in certain intervals in the alarm row, the section
[Alarms] offers the entry RotationCycle.
RotationCycle=3000 The alarm is switched after 3 seconds
Order Order=FIRST The most recent alarm is the first one in the list
Order=LAST The most recent alarm is the last one in the list
MaxNo MaxNo=200 Maximum number of alarms in alarm list

Note With HMI Advanced on PG/PC you have to use the HMI installation path. By default
this path is:
C:\Siemens\Sinumerik\HMI-Advanced

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 16 PLC interface
Display of the The "Diagnostics" menu contains the PLC status function (max. length of the
Interface signals table 68 entries). The status of the interface signals can be monitored and modified via
the "PLC status" softkey.

Softkey: Operand + The preselected operand is incremented by 1 byte or 1 bit etc.

Softkey: Operand - The preselected operand is decremented by 1 byte or 1 bit etc.

Softkey: Default... Default setting for the display format (binary, hex, decimal, floating point)

Softkey: Delete All entries in the table are deleted.

Change softkey Set and reset bit memories, inputs, outputs and data bytes. The set variables are reset
by the PLC user program.
This function requires a password e.g. SUNRISE . The softkey Accept is used for
activating the modified values.

SK File Function The generated table can be saved/loaded on the hard disk. The table is saved in the
DIAGNOSTICS\PLC OPERAND SCREEN directory. The current operand table is
stored in the DIAGNOSTICS\PLC DATA\STATUS directory.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 17 PLC interface
Object Properties To display object properties, double-click on the object or activate the context
PROFIBUS menu
integrated

Characteristics In the dialog box titled


• Properties DP master system
click the button
-> Properties
The screen shown on the right in the picture above appears.

S7 Subnet ID There change the setting of the S7 Subnet ID to the value


Setting • 0046 – 0010

Reason This is currently the default setting in the MMC.INI with external HMI.
It is easier to adapt in the HW Config!

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 18 PLC interface
Object Properties To display object properties, double-click on the object or activate the context menu
CP 840D sl

Characteristics In the dialog box titled


• Properties - CP 840D sl
click the button
-> Properties -> New -> OK
Now select the newly activated interface Ethernet(1).

IP address Change the setting of the IP address there to the value to match Port X120:
Setting • 192 . 168 . 214 . 1

Subnet Mask The matching subnet mask has the value


Settings • 255 . 255 . 255 . 0

Reason The current default setting of the HW Config is suitable for port X127.
However, this service port is not yet active.
Furthermore, these settings are also the default values in the HMI!

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 19 PLC interface
Preassigned Group 1: Auxiliary functions M0, M1, M2, M17 and M30 are
Auxiliary Function assigned to Group 1 as standard.
Assignments Group 2: The M functions M3, M4, M5 and M70 of the master spindle are assigned to
Group 2 as standard.
Group 3: The S functions of the master spindle are assigned to Group 3
as standard.

Preassigned Auxiliary functions have the following behavior without definitions in


Group MD 11110: AUXFU_GROUP_SPEC[n], they have the following properties:
Properties Normal acknowledgment by PLC
Transfer time:
• At end of block for group 1
• Prior to motion for group 2
• During motion for group 3

Implicit Via machine data MD 10713: M_NO_FCT_STOPRE,


Preprocessing Stop 15 M functions can be defined which execute an implicit preprocessing stop.
If an MF function is programmed with MD 10713: M_NO_FCT_STOPRE, interpretation
of the
following part program line is delayed until the block containing the M function has
been executed fully, i.e. acknowledged by the PLC.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 20 PLC interface
Note 1) The type for the values can be selected by the user via MD 22110:
AUXFU_H_TYPE_INT.
2) Due to the limited display possibilities on the operator panels the
values of type REAL are limited to -999999999.9999 to
999999999.9999. Calculations in the NC kernel are performed with full
REAL accuracy.
3) The REAL values offered for MD 22110: AUXFU_H_TYPE_INT= 1 the
suggested REAL values are transferred to the PLC as rounded values. The
PLC program must interpret the value in accordance with the MD setting.
4) If you are using tool management, with software version 5 and higher,
you can control the meaning of the address extension via an MD.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 21 PLC interface
Time Using machine data you can determine for each auxiliary function type
of Transfer when you want the auxiliary function parameters transferred to the PLC.

Machine Data MD 22200: AUXFU_M_SYNC_TYPE


MD 22210: AUXFU_S_SYNC_TYPE
MD 22220: AUXFU_T_SYNC_TYPE
MD 22230: AUXFU_H_SYNC_TYPE
MD 22240: AUXFU_F_SYNC_TYPE
MD 22250: AUXFU_D_SYNC_TYPE

0: Output prior to motion


1: Output during motion
2: Output at end of block
3: No output to PLC

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 22 PLC interface
Grouping Auxiliary functions are grouped to:
• Output the auxiliary functions to the PLC at block search,
• Define the time of output (e.g. sustained) and
• Monitor in the part program that only one auxiliary function is programmed in
a block for each group.

Transfer MD11110 AUXFU_GROUP_SPEC


Characteristics The output characteristics are specified here for the auxiliary functions for each group.
Bit 0=1--> Output duration 1 OB1 pass (standard auxiliary function)
Bit 1=1--> Output duration 1 OB40 pass, alarm-triggered (high-speed auxiliary
function)
Bit 2 Reserved
Bit 3=1--> No output to PLC (only allowed to be set as single bit)
Bit 4 Reserved
Bit 5=1--> Output before the motion
Bit 6=1--> Output during the motion
Bit 7=1--> Output at end of block
The MD must be defined for every existing auxiliary function group.

Example AUXFU_GROUP_SPEC[6]=21H
The signals of auxiliary function group 7 are output in the OB1 cycle before the motion
is initiated.
AUXFU_GROUP_SPEC[9]=82H
The signals of auxiliary function group 10 are output for the duration of OB 40
execution at the end of the block.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 23 PLC interface
Block Change MD 22100: AUXFU_QUICK_BLOCKCHANGE
Delay = 0 with block change delay
= 1 without block change delay

Note:
High-speed acknowledgement can either be set by NC programming
(e.g. M=QU(10) ) or by M grouping with appropriate
configuration of MD11110 AUXFU_GROUP_SPEC.

Examples
N10 G94 G01 X50 M100 MD 22200: AUXFU_M_SYNC_TYPE = 1,
Output M100 during the motion.

MD 22200: AUXFU_M_SYNC_TYPE = 0,
N20 Y5 M100 M200 Output M200 before the motion.

Output as high-speed AUX functions


N30 Y0 M=QU(100) M=QU(200)
N40 X0
No axis motions, immediate output
N50 M100 M200

M17

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 24 PLC interface
With activation of the function M decoding to list via the GP parameter of FB 1
"ListMDecGrp", the basic program can decode up to 256 M functions with address
extension.
When the bit is set in the signal list, the readin disable in the associated NC channel is
set simultaneously by the basic program. The read in disable in the channel is reset
once the user has reset all the bits output by this channel and thus acknowledged
them.
The output of an M function decoded in the list as a high-speed auxiliary function does
not result in a read-in disable.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 25 PLC interface
DB75

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 26 PLC interface
The interface signal of the M functions are all to be found (with few exceptions)
in the channel data blocks (DB21-DB30). The exceptions are signals that are
evaluated specifically for each axis, e.g. M3.
The modification signals are found in bytes 58 to 67. These are set to "1" for one cycle
if an auxiliary function is triggered.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 27 PLC interface
M functions are programmed in the part program in the INTEGER format
(8 decades plus leading sign).

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 28 PLC interface
Programmed T functions are not output to the PLC when tool management is active.
8 decade T Nos. are only available as T function 1.
Programmed D functions with name (e.g. D=EDGE_1) cannot be output to the PLC in
ASCII format.
5 decade D Nos. are only available as D function 1.
The REAL format corresponds to the floating-point representation in STEP 7
(24-bit mantissa and 8-bit exponent). This floating point format maintains a precision of
up to 7 decimal places.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 29 PLC interface
F functions are programmed in the part program in REAL format.
The extended address of the F function contains an identifier with the following
meaning:
0: Path feed,
1 - 31: Machine axis number for feed with positioning axes.
The AUX function data type is dependent on MD 22110: AUXFU_H_TYPE_INT.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 30 PLC interface
M functions marked with * are not decoded in this bit field if a spindle is configured! In
this case these M functions are offered as extended M functions in DB21-30.DBB68
ff. and in the respective axis DB DB31-61.DBB86 ff.
Dynamic M functions (M00 to M99) are set via the basic PLC program
via a cycle to "1".
The PLC operator can create static M functions from the
dynamic M functions.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 31 PLC interface
Alternative You have this possibility with the Windows XP operating system.
Configuration This way it is not necessary to change the network settings each time
for TCP/IP when you want to access the office network or NCU from the PG.

Setting Dialog Proceed as follows to make the settings:


-> Network environment (on desktop) -> right mouse button
(=context menu) -> Features
-> Local Area Connection -> right mouse button -> Features
-> General tab -> Internet Protocol (TCP/IP)
-> Properties button
-> Alternative Configuration tab
Here set the following:

IP address and IP address = 192 . 168 . 214 . 250 (advisable: .250 .. 254)
Subnet mask Subnet mask = 255 . 255 . 255 . 0

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 32 PLC interface
S7 Online You need to modify the access path for S7 online for the subsequent download.
via TCP/IP This is achieved by selecting the following setting:
-> SIMATIC Manager -> Options -> Setting the PG/PC Interface
In the dialog box with this name, select:
• TCP/IP -> ETH-HW
where ETH-HW is the specific Ethernet hardware used.
Example in the screen above: ETH-HW = VIA PCI 10/100 MB Fast Ethernet.

Why Not Currently the HW Config of the CP 840D sl can only be loaded via Ethernet
via PROFIBUS? (see also Start-Up manual for CNC Part 1).

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 33 PLC interface
Accessible Tthis function can be used to display nodes connected to the Ethernet.
Nodes There we can see the IP Adresses of these components like shown above.
Unfortunately, we cannot change the displayed name 'noname_ncu'!

IP Address of NCU The IP address of the NCU on the individual ports is described in chapter 6.
There you can also see how to change the address on port X120 and how to
display the address on port X130.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 34 PLC interface
In order to save the SINUMERIK 840D sl PLC program to a PG with STEP 7, you need
to first create a project.

Creating a project Select the menu option File -> New or click the icon in the toolbar. The "New"
dialog box is opened where you can create a new project or library.
Enter the name of your project in the "Name" box and confirm by clicking the "OK"
button.

Notes 1.The path set in the SIMATIC Manager under Options ->
Settings is displayed in the Storage Location box.

2.STEP 7 V3.2 and higher provides a "New Project" wizard to guide


you through creating a new project. To save the SINUMERIK 840D sl PLC program,
disable the wizard.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 35 PLC interface
After a new project has been created, the PLC program can be saved.

Uploading Station Select the menu option PLC -> Upload Station to PG to save the PLC program
to PG in a SIMATIC project. Blocks as well as the hardware configuration are transferred to
the project.
In the screenform "Select station address", subrack 0 and slot 0 must be selected.

Display Click the button


-> Display
to display nodes in the current network.

Verification Check whether the displayed MAC address matches the MAC address
- MAC Address printed. In the screen above, this would be e.g.
08-00-06-73-73-F8
- IP Address You can also check the IP address.
For example, on port X120 the IP address should be 192.168.214.1
(or one of the addresses 192.168.214.2 ... 192.168.214.9.
- CPU Name The CPU name should be
CP 840D sl.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 36 PLC interface
Procedure SIMATIC Manager -> Options -> Settings

Register • Language: You can select the language you want to use for the SIMATIC
"Language" Manager, menus, dialog boxes, help, etc. Only the languages that have been
installed appear in the list.
• Mnemonics: You can select the mnemonics you want to use for programming
the S7 blocks.

Register Basic settings for editing projects and libraries:


"General" • Storage location for projects is where you specify the directory in which you
want to store your user projects.
• Storage location for libraries is where you specify the directory in which you
want to store your user libraries.
• Further options for inserting objects, opening projects and for window
layout will be dealt with later.
• Deactivated system messages
By pressing the button "Activate" you can reactivate all
system messages that were switched-off in a window when the option
"Always display this message…." was chosen.

"View" Tab This is where you specify what is to appear in the online display.

"Columns" Tab This is where you specify which columns are to be displayed when the Detail
view is switched-on (see "Help").

Register This is where you specify how to archive the PLC programs (e.g. path,
"Archiving". *.zip or *.arj etc.).

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 37 PLC interface
SITRAIN Training for NC-84SL-SIP
Automation and Industrial Solutions Page 38 PLC interface
Overview The CPU information supports you in system diagnosis without having to do any
programming, and makes it possible to quickly detect errors, locate them and eliminate
them.
The information that you need for troubleshooting is supplied by the function: PLC ->
Module information. You can access this function from the SIMATIC Manager or from
other tools (e.g. STL/LAD/FBD Editor).

Module Information You will find additional information in the individual tabs:
General: Among other things, the module description, hardware and firmware versions
Diagnostic Buffer: It contains all diagnostic events in the order they occurred. All
events are listed in plain text and in the order they occurred in the display.
Memory: Size and usage of the EPROM load memory, RAM load memory and the
work memory.
Cycle Time: Displays the monitoring time selected, the shortest, the longest and the
current cycle time
Time System: Displays the real-time clock and the integrated run-time meter
Performance Data: Displays the integrated system blocks and those organization
blocks that are available as well as address areas (I,Q,M,T,C,L)
Communication: Displays the performance data of the communication interfaces and
the connection overview
Stacks: Information on the contents of the I Stack, B Stack and L Stack. For this, the
CPU must be in the STOP state or have reached a breakpoint.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 39 PLC interface
Application The test function "Monitor/Modify Variables" can be started from the SIMATIC
Manager or from the LAD/STL/FBD Editor. It is used to monitor and / or modify
variables in a format that you choose.

Structure of the The variables you choose are entered in a variable table (VAT).
Variable Table With the exception of block-local, temporary variables, you can monitor and/or modify
all variables or addresses. The columns of the variable table that are displayed can be
selected using the menu View and have the following meanings:
• Address: absolute address of the variable.
• Symbol: symbolic name of the variable
• Symbol comment comment on the variable displayed
• Display format: a data format that you can choose per mouse click (e.g.
binary, decimal...), in which the contents of the variable is displayed
• Status value: value of the variable in the selected status format
• Control value: value that is to be assigned to the variable

Saving the An entered variable table can be saved via Table -> Save or
Variable Table Table -> Save as. You can give the variable table any name you choose and it is
inserted as the symbolic name in the symbol table.
Variable tables that are saved can be reused for monitoring and modifying, making it
unnecessary to reenter the variables to be monitored.

Note To check the input and output wiring (regardless of the user program), you can also
call the Monitor/Modify Variables tool directly from the HW Config tool.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 40 PLC interface
Application For extensive programs, it is particularly necessary in troubleshooting to have an
overview of where which address is scanned or assigned, which inputs and outputs
are actually used, or how the entire user program with regards to the call hierarchy is
generally structured.
The "Reference Data" tool gives you an overview of the structure of the user program
as well as the addresses used. The reference data is generated from the user program
saved offline.
For functional errors which can be traced back to logical program errors for example
(e.g. double assignment), you will find the "Program Status" tool together with the
"Reference Data" tool useful.
If, for example, a logic operation is not fulfilled because a memory bit is not set, you
can use the "Reference data" to determine where this memory bit is assigned.

Reference Data You can trigger the generating and displaying of reference data in the SIMATIC
...Generate Manager (when the "Blocks" folder is selected offline) or in the
...Display LAD/STL/FBD Editor via Options -> Reference data -> Display or
...Filter Filter and display. The reference data consists of various lists (see Settings) that are
displayed as filtered data (individually), (regardless of whether the item Display or
Filter and display was selected in the Options menu). When you select Display
reference data you can choose in the Settings dialog box which list is to be displayed
first. Then you can choose any of the different lists.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 41 PLC interface
Exercise: Saving the PLC Program

Creating an Create a new S7 project. Use a project name


S7 Project of your choice.

Ethernet cable Establish a connection between PG (Ethernet interface) and


840D sl (Ethernet interface X120 or X127).

Saving the PLC Use the function PLC -> Upload station to PG,
Program to save the PLC program on the PG.
A dialog box titled "Select station address" is displayed.
Click button
-> Display
and confirm with
-> OK

Reference Data Use the "Reference data" function to determine in which block data bit
DB31.DBX21.7 was programmed. Which input signals are required for activating
the marker?
Check the status of the enables via the status display of the PCU 50
(Menu "Diagnostics", softkey "PLC Status").

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 42 PLC interface
Exercise: Alarm and Message Texts

Editing Alarm Texts Enter an alarm text file. The file should contain at least one error message and one
operational message (e.g. 700000 and 700063). One display should be in the
alarm line and one in the message box.
For editing, use the menu "Start-up", softkey “HMI" and
softkey "Editor". Position the cursor on the "USER" directory and press the INPUT
key.
Press softkey "New..." to create the alarm text file. Then enter a file name, e.g.

Then enter your texts, save the file, and close the editor.

Editing MBDDE.INI Again, select the directory "USER" in the editor and create a file MBDDE.INI. If
there is already a MBDDE.INI, open it via the INPUT key and correct the link so
that it corresponds to your alarm text file.

UserPLC=F:\USER\MYPLC_

Attention! After a change is made to an INI file, the PCU50 has to be restarted. INI files
are only read during boot.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 43 PLC interface
Callling FC 10 Open the project with the saved PLC program via STEP 7.
At the end of OB1, add a network and call FC10.
Use the error acknowledgement key for acknowledging the error.

Calling Alarms Use the free simulator inputs (e.g. IB76, 77, 80, 81) in order to display error and
operational messages. Insert a new network in OB1.
In the example, the bits for error numbers 700000 and 700063 are used.

Loading Blocks Load the changed OB to the SINUMERIK via the icon

Status/Control Use the two networks in order to familiarize yourself with the status functions of
STEP 7.
Test the block status by creating an online connection via "Accessible nodes".
Use the functions "Control variable" and "Set trigger points" in order to activate the
error text independently of simulator inputs.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 44 PLC interface
Exercise: Grouping M Functions

Assign the 4 M commands M50...M53 to Group 8.


Output to the PLC is to take place at high speed and before the block motion.
To check the part programming, switch on the outputs on the simulator with the M
commands.
M50 deselect the outputs (initial setting) O33.0
M51 select O33.1
M52 select O33.2
M53 select O33.3

Machine Data MD11100 = Number of auxiliary functions 4


MD11110[7]= Specification of transfer (high-speed, before block motion)
MD22000[0]= Auxiliary function group 8
MD22010[0]= Type (M command)
MD22020[0]= Extension (zero)
MD22030[0]= M command value (M50)
MD22000[1]= Auxiliary function group 8
MD22010[1]= Type (M command)
MD22020[1]= Extension (zero)
MD22030[1]= M command value (M51)
MD22000[2]= Auxiliary function group 8
MD22010[2]= Type (M command)
MD22020[2]= Extension (zero)
MD22030[2]= M command value (M52)
MD22000[3]= Auxiliary function group 8
MD22010[3]= Type (M command)
MD22020[3]= Extension (zero)
MD22030[3]= M command value (M53)

interface M50...53 DB21.DBX200.2...200.5

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 45 PLC interface
Exercise: Grouping AUX (H) Functions

Assign two AUX commands to groups 9 and 10 to output the AUX commands
to the PLC.
Group 9 H0 = 234.2 Extended address 0
Group 10 H1 = 91.2 Extended address 1

Machine Data MD11100 = 6 4 M commands + 2 AUX commands


MD22110 = 0 Output REAL values
MD22230 = 0 Output prior to motion
MD22000[4]= Auxiliary function group 9
MD22010[4]= Type (AUX command)
MD22020[4]= Extension (zero)
MD22030[4]= Value (-1)
MD22000[5]= Auxiliary function group 10
MD22010[5]= Type (AUX command)
MD22020[5]= Extension (one)
MD22030[5]= Value (-1)

interface DB21.DBX64.0 Modification signal 1st AUX function


DB21.DBD142 Value of AUX function 1

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 46 PLC interface
Exercise: M Functions with Decoding List

In your PLC program, decode the M commands with a decoding list (DB75/76).
M400...M415 No output to simulator
M3=20...27 QB32
M7=50...57 QB33
FB1 ListMDecGrp:=3
DB75 The file mdeclist.stl for creating DB75 can be found in the source files of the basic
PLC program.

DB 76 Evaluation of the M commands as bit information. DB76 is automatically generated


according to the settings in DB75.

SITRAIN Training for NC-84SL-SIP


Automation and Industrial Solutions Page 47 PLC interface

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy