Siemens Simatic S7-300 Manual de usuario

FM 352 electronic cam controller
_
_________________
_
_
_________________
_
_
______
_
___________
_
_________________
_
_
_________________
_
_
_________________
_
_
_________________
_
_
_________________
_
_
_________________
_
_
_________________
_
_
_________________
_
_
_________________
_
_
_________________
_
_
_________________
_
_
_________________
_
_
________________
_
_
_
_________________
_
SIMATIC
S7-300
FM 352 electronic cam controller
Operating Instructions
05/2011
A5E01071724-03
Preface
1
Product overview
2
Cam control basics
3
Installing and removing the
FM 352
4
Wiring the FM 352
5
Installing the software
6
Programming the FM 352
7
Commissioning the FM 352
8
Machine and cam data
9
Settings
10
Encoders
11
Diagnostics
12
Examples
13
Technical data
A
Connection Diagrams
B
Data blocks / error lists
C
Programming without
SFB 52 and SFB 53
D

Legal information
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.
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
with a safety alert symbol, indicates that minor personal injury can result if proper precautions are not taken.
CAUTION
without a safety alert symbol, indicates that property damage can result if proper precautions are not taken.
NOTICE
indicates that an unintended result or situation can occur if the relevant information is not taken into account.
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
A5E01071724-03
Ⓟ 06/2011
Copyright © Siemens AG 2011.
Technical data subject to change

FM 352 electronic cam controller
Operating Instructions, 05/2011, A5E01071724-03 3
Table of contents
1 Preface ...................................................................................................................................................... 7
2 Product overview ..................................................................................................................................... 11
2.1 The FM 352..................................................................................................................................11
2.2 Fields of application of FM 352....................................................................................................12
2.3 Configuration of an electronic cam control with FM 352..............................................................13
3 Cam control basics .................................................................................................................................. 15
3.1 Properties of the cam types .........................................................................................................15
3.2 Tracks and track result.................................................................................................................18
3.2.1 Standard tracks............................................................................................................................18
3.2.2 Special tracks...............................................................................................................................20
3.3 Hysteresis ....................................................................................................................................22
3.4 Dynamic adjustment ....................................................................................................................24
3.5 Interfaces of the cam controller....................................................................................................25
4 Installing and removing the FM 352......................................................................................................... 27
5 Wiring the FM 352 ................................................................................................................................... 29
5.1 Before you start wiring .................................................................................................................29
5.2 Description of the encoder interface ............................................................................................30
5.3 Connecting the encoder...............................................................................................................31
5.4 Terminal assignment of the front connector ................................................................................32
5.5 Wiring the front connector............................................................................................................34
6 Installing the software.............................................................................................................................. 37
7 Programming the FM 352 ........................................................................................................................ 39
7.1 Basics of Programming an FM 352 .............................................................................................40
7.2 FC CAM_INIT (FC 0) ...................................................................................................................42
7.3 FB CAM_CTRL (FB 1) .................................................................................................................43
7.4 FB CAM_DIAG (FB 2)..................................................................................................................47
7.5 Data blocks ..................................................................................................................................49
7.5.1 Templates for data blocks............................................................................................................49
7.5.2 Channel DB..................................................................................................................................49
7.5.3 Diagnostic DB ..............................................................................................................................50
7.5.4 Parameter DB ..............................................................................................................................51

Table of contents
FM 352 electronic cam controller
4 Operating Instructions, 05/2011, A5E01071724-03
7.6 Interrupts ..................................................................................................................................... 52
7.7 Evaluation of a hardware interrupt .............................................................................................. 53
7.8 Evaluating a diagnostics interrupt ............................................................................................... 54
7.9 Technical data............................................................................................................................. 55
7.10 High-speed access to module data............................................................................................. 56
7.11 Parameter transmission paths .................................................................................................... 58
8 Commissioning the FM 352 ..................................................................................................................... 61
9 Machine and cam data ............................................................................................................................ 67
9.1 Machine and cam data................................................................................................................ 67
9.2 Writing and enabling machine data............................................................................................. 68
9.3 Read machine data..................................................................................................................... 70
9.4 Writing cam data ......................................................................................................................... 71
9.5 Reading cam data ....................................................................................................................... 72
9.6 Physical units system.................................................................................................................. 73
9.7 Machine data of the axis ............................................................................................................. 75
9.8 Determining the correct absolute encoder adjustment ............................................................... 82
9.9 Example: Adjusting the absolute encoder................................................................................... 84
9.10 Machine data of the encoder ...................................................................................................... 86
9.11 Resolution ................................................................................................................................... 91
9.12 Quantity framework and track data ............................................................................................. 94
9.13 Interrupt enable........................................................................................................................... 96
9.14 Cam data..................................................................................................................................... 97
10 Settings.................................................................................................................................................. 103
10.1 Influence of settings on the switching characteristics of time-based cams .............................. 103
10.2 Set Actual Value/Set Actual Value on-the-fly/Cancel Set Actual Value.................................... 104
10.3 Set zero offset ........................................................................................................................... 107
10.4 Set reference point.................................................................................................................... 110
10.5 Change cam edges................................................................................................................... 112
10.6 Perform "Fast Cam Parameter Change"................................................................................... 114
10.7 Executing "Length measurement and edge detection"............................................................. 116
10.8 Retrigger reference point .......................................................................................................... 120
10.9 Disabling software limit switches .............................................................................................. 124

Table of contents
FM 352 electronic cam controller
Operating Instructions, 05/2011, A5E01071724-03 5
10.10 Simulating ..................................................................................................................................126
10.11 Read "count values of counter cam tracks" ...............................................................................128
10.12 Read "position and track data"...................................................................................................130
10.13 Read encoder data ....................................................................................................................131
10.14 Read cam and track data...........................................................................................................132
10.15 Setting control signals for the cam controller.............................................................................133
10.16 Querying checkback signals for the cam controller ...................................................................134
10.17 Setting the return signals for diagnostics...................................................................................135
11 Encoders ............................................................................................................................................... 137
11.1 Incremental encoders ................................................................................................................137
11.2 Proximity switches .....................................................................................................................140
11.3 Absolute encoder .......................................................................................................................141
12 Diagnostics............................................................................................................................................ 145
12.1 Possibilities for error evaluation.................................................................................................145
12.2 Meaning of the error LEDs.........................................................................................................146
12.3 Diagnostic interrupts ..................................................................................................................147
12.3.1 Enable diagnostic interrupts.......................................................................................................147
12.3.2 Reaction of FM 352 to errors with diagnostics interrupt ............................................................148
13 Examples............................................................................................................................................... 151
13.1 Introduction ................................................................................................................................151
13.2 Requirements.............................................................................................................................152
13.3 Preparing the examples .............................................................................................................153
13.4 Displaying the code of the examples .........................................................................................153
13.5 Testing the example...................................................................................................................154
13.6 Reusing an example project ......................................................................................................154
13.7 Sample program 1 "Getting Started"..........................................................................................155
13.8 Sample Program 2 "Commissioning".........................................................................................156
13.9 Sample program 3 "One Module" ..............................................................................................157
13.10 Sample program 4 "Interrupts"...................................................................................................160
13.11 Sample program 5 "MultiModules".............................................................................................162

Table of contents
FM 352 electronic cam controller
6 Operating Instructions, 05/2011, A5E01071724-03
A Technical data ....................................................................................................................................... 165
A.1 General technical data .............................................................................................................. 165
A.2 Technical data........................................................................................................................... 166
B Connection Diagrams ............................................................................................................................ 169
B.1 Encoder types ........................................................................................................................... 169
B.2 Connection Diagram for Incremental Encoder Siemens 6FX 2001-2 (Up=5V; RS 422).......... 170
B.3 Connection Diagram for Incremental Encoder Siemens 6FX 2001-2 (Up=24V; RS 422)........ 172
B.4 Wiring Diagram of the Incremental Encoder Siemens 6FX 2001-4 (Up = 24 V; HTL) ............. 174
B.5 Connection Diagram for Absolute Encoder Siemens 6FX 2001-5 (Up=24V; SSI) ................... 176
C Data blocks / error lists .......................................................................................................................... 177
C.1 Content of the channel DB........................................................................................................ 177
C.2 Content of the parameter DB .................................................................................................... 185
C.3 Data and Structure of the Diagnostic DB .................................................................................. 187
C.4 Error classes ............................................................................................................................. 190
D Programming without SFB 52 and SFB 53 ............................................................................................ 199
D.1 Overview of the Programming without SFB 52 and SFB 53 section ........................................ 199
D.2 Basics of Programming an FM 352........................................................................................... 200
D.3 FC CAM_INIT (FC 0)................................................................................................................. 201
D.4 FC CAM_CTRL (FC 1).............................................................................................................. 202
D.5 FC CAM_DIAG (FC 2)............................................................................................................... 206
D.6 Data blocks ............................................................................................................................... 208
D.6.1 Templates for data blocks......................................................................................................... 208
D.6.2 Channel DB............................................................................................................................... 208
D.6.3 Diagnostics DB.......................................................................................................................... 209
D.6.4 Parameter DB ........................................................................................................................... 210
D.7 Interrupts ................................................................................................................................... 211
D.8 Evaluation of a hardware interrupt ............................................................................................ 212
D.9 Evaluating a diagnostics interrupt ............................................................................................. 213
D.10 Technical specifications ............................................................................................................ 214
D.11 Fast access to module data ...................................................................................................... 215
D.12 Parameter transfer routes ......................................................................................................... 217
Index...................................................................................................................................................... 219

FM 352 electronic cam controller
Operating Instructions, 05/2011, A5E01071724-03 7
Preface 1
Purpose of the manual
This manual gives you a complete overview of the FM 352 function module. It helps you
during installation and commissioning. The procedures involved in installation, wiring,
parameter assignment, and programming are described.
This manual is intended for the programmers of STEP 7 programs and for those responsible
for configuring, commissioning, and servicing automation systems.
Basic knowledge required
This manual presumes general knowledge in the field of automation engineering.
In addition, you should know how to use computers or devices with similar functions (e.g.,
programming devices) under the Microsoft® Windows® operating systems and have a
knowledge of STEP 7 programming.
Scope of the manual
This manual contains the description of the FM 352 electronic cam controller as valid at the
time it was published. We reserve the right to publish modifications of FM 352 functionality in
a separate Product Information.
The manual with the number in the footer applies to the FM 352 with order number
EWA 4NEB 720 6004–01 6ES7 352-1AH00-0AE0
EWA 4NEB 720 6004–01 a 6ES7 352-1AH01-0AE0
C79000–G7000–C352–03 6ES7 352-1AH01-0AE0
A5E01071724-01 6ES7 352-1AH01-0AE0
A5E01071724-02 6ES7 352-1AH02-0AE0
A5E01071719-03 6ES7 352-1AH02-0AE0
Content of this manual
This manual describes the hardware and software of the FM 352 electronic cam controller.
It comprises the following sections:
● Fundamentals part (Chapters 1 to 8)
● Reference part (Chapters 9 to 13)
● Appendices (A, B, C, and D)
● Index

Preface
FM 352 electronic cam controller
8 Operating Instructions, 05/2011, A5E01071724-03
Standards
The SIMATIC S7-300 product series is compliant with IEC 61131-2.
Recycling and disposal
The FM 352 is low in contaminants and can therefore be recycled. For ecologically
compatible recycling and disposal of your old device, contact a certificated disposal service
for electronic scrap.
Additional support
If you have any further questions about the use of products described in this manual and do
not find the right answers here, contact your local Siemens representative
(http://www.siemens.com/automation/partner):
A guide to the technical documentation for the various products and systems is available on
the Internet:
● SIMATIC Guide manuals (http://www.siemens.com/simatic-tech-doku-portal)
The online catalog and online ordering systems are also available on the Internet:
● A&D Mall (http://www.siemens.com/automation/mall)
Training center
To help you get started with automation technology and systems, we offer a variety of
courses. Contact your regional Training Center or the central Training Center in D-90327
Nuremberg, Germany.
● Internet: SITRAIN homepage (http://www.sitrain.com)