-
Preface, Contents
User Information
Product Overview1
Installing and Removing theFM 350-1 2
Wiring the FM 350-1 3Assigning Parameters to theFM 350-1 4
Programming the FM 350-1 5Programming in M7 with theCounter
Function Library 6
Starting Up the FM 350-1 7
Reference InformationOperating Modes, Settings,Parameters and
Commands
8Encoder Signals and Their Evaluation
9
DB Assignments10
M7 Reference Counter FunctionLibrary
11
Faults and Diagnostics12
Appendices
Technical SpecificationsA
Spare PartsB
ReferencesC
Glossary, Index
Edition 01/2003A5E00073040-02
FM 350-1 Function Module
Manual
This manual is part of the documentationpackage with the order
number:
6ES7350-1AH00-8BG0
SIMATIC
-
Index-2FM 350-1 Function Module
07/2000
!Dangerindicates that death, severe personal injury or
substantial property damage will result if proper precau-tions are
not taken.
!Warningindicates that death, severe personal injury or
substantial property damage can result if proper precau-tions are
not taken.
!Cautionindicates that minor personal injury or property damage
can result if proper precautions are not taken.
Notedraws your attention to particularly important information
on the product, handling the product, or to aparticular part of the
documentation.
Qualified PersonnelOnly qualified personnel should be allowed to
install and work on this equipment. Qualified personsare defined as
persons who are authorized to commission, to ground, and to tag
circuits, equipment,and systems in accordance with established
safety practices and standards.
Correct UsageNote the following:
!WarningThis device and its components may only be used for the
applications described in the catalog or thetechnical descriptions,
and only in connection with devices or components from other
manufacturerswhich have been approved or recommended by
Siemens.
This product can only function correctly and safely if it is
transported, stored, set up, and installed cor-rectly, and operated
and maintained as recommended.
TrademarksSIMATIC, SIMATIC HMI and SIMATIC NET are registered
trademarks of SIEMENS AG.Some of other designations used in these
documents are also registered trademarks; the owners rightsmay be
violated if they are used by third parties for their own
purposes.
Safety GuidelinesThis manual contains notices which you should
observe to ensure your own personal safety, aswell as to protect
the product and connected equipment. These notices are highlighted
in themanual by a warning triangle and are marked as follows
according to the level of danger:
We have checked the contents of this manual for agreement
withthe hardware and software described. Since deviations cannot
beprecluded entirely, we cannot guarantee full agreement.
However,the data in this manual are reviewed regularly and any
necessarycorrections included in subsequent editions. Suggestions
for im-provement are welcomed.
Disclaimer of LiabilityCopyright Siemens AG 2000-2002 All rights
reservedThe reproduction, transmission or use of this document or
itscontents is not permitted without express written
authority.Offenders will be liable for damages. All rights,
including rightscreated by patent grant or registration of a
utility model or design,are reserved.Siemens AGBereich Automation
and DrivesGeschaeftsgebiet Industrial Automation SystemsPostfach
4848, D- 90327 Nuernberg
Siemens AG 2000-2002Technical data subject to change.
Siemens Aktiengesellschaft A5E00073040-02
-
iiiFM 350-1 Function ModuleA5E00073040-02
Preface
Purpose of the ManualThis manual gives you a complete overview
of FM 350-1 function module. It helpsyou 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
thoseresponsible for configuring, commissioning, and servicing
automation systems.
Required Basic KnowledgeYou require a general knowledge in the
field of automation engineering to be ableto understand this
manual.
In addition, you should know how to use computers or devices
with similarfunctions (e.g programming devices) under Windows
95/98/2000 or NT operatingsystems.
Where is this Manual valid?The present manual contains the
description of function module FM 350-1applicable at the time the
manual was published. We reserve the right to describechanges of FM
350-1 functionality in a Product Information Leaflet.
The Contents of theMan al
... Apply to the FM 350-1Manual.... MLFB Release
Without latch without measuring operatingmodeswithout isochrone
mode
6ES7 350-1AH00-0AE06ES7 350-1AH01-0AE0 43
21 =
without measuring operatingmodeswithout isochrone mode
6ES7 350-1AH02-0AE0
4321 =
6ES7 350-1AH03-0AE0
4321 =
-
Preface
ivFM 350-1 Function Module
A5E00073040-02
Changes compared to the previous versionFM 350-1 features the
following enhancements: Frequency measurement Rotation speed
measurement Period measurement Isochrone mode in a modular slave
(ET 200M) System modification during operation using CiR /3/ More
latch edges Hysteresis for counting modes Firmware update
Certification Underwriters Laboratories, Inc.: UL 508
registered
(Industrial Control Equipment) Canadian Standards Association:
CSA C22.2 number 142,
(Process Control Equipment) Factory Mutual Research: Approval
Standard Class Number 3611.
CE LabelingSIMATIC S7-300 products fulfil the requirements and
protection guidelines of thefollowing EU directives: EC Directive
73/23/EEC Low-voltage directive EC Directive 89/336/EWG EMC
directive
CTick MarkSIMATIC products S7-300 are compliant with
requirements of the AS/NZS 2064 (Australian) standard.
StandardsSIMATIC S7-300 products fulfil the requirements and
criteria of IEC 61131-2.
Place of this Documentation in the Information EnvironmentThis
manual is acomponent of the documentation package
6ES7350-1AH00-8BG0.
-
Preface
vFM 350-1 Function ModuleA5E00073040-02
Recycling and DisposalFM 350-1 is recycleable due to its
non-toxic materials. Please contact a companycertified in the
disposal of electronic scrap for environmentally safe recycling
anddisposal of your old device.
Further SupportIf you have any technical questions, please get
in touch with your Siemensrepresentative or agent
responsible.http://www.siemens.com/automation/partner
Training CentersSiemens offers a number of training courses to
familiarize you with the SIMATIC S7automation system. Please
contact your regional training center or our centraltraining center
in D 90327 Nuremberg, Germany for details:Telephone: +49 (911)
895-3200.Internet: http://www.sitrain.com
-
Preface
viFM 350-1 Function Module
A5E00073040-02
A&D Technical SupportWorldwide, available 24 hours a
day:
Johnson City
Nuernberg
Beijing
Technical Support
Worldwide (Nuernberg)Technical Support
24 hours a day, 365 days a yearPhone: +49 (0) 180 5050-222Fax:
+49 (0) 180 5050-223E-Mail: adsupport@
siemens.comGMT: +1:00Europe / Africa
(Nuernberg)Authorization
Local time: Mon.-Fri. 7:00 to 17:00Phone: +49 (0) 180
5050222Fax: +49 (0) 180 5050-223E-Mail: adautorisierung@
siemens.comGMT: +1:00
United States (Johnson City)Technical Support
andAuthorizationLocal time: Mon.-Fri. 8:00 to 17:00Phone: +1 (0)
423 262 2522Fax: +1 (0) 423 262 2289E-Mail: simatic.hotline@
sea.siemens.comGMT: 5:00
Asia / Australia (Beijing)Technical Support
andAuthorizationLocal time: Mon.-Fri. 8:30 to 17:30Phone: +86 10 64
75 75 75Fax: +86 10 64 74 74 74E-Mail: adsupport.asia@
siemens.comGMT: +8:00
The languages of the SIMATIC Hotlines and the authorization
hotline are generally German and English.
-
Preface
viiFM 350-1 Function ModuleA5E00073040-02
Service & Support on the InternetIn addition to our
documentation, we offer our Know-how online on the internet at:
http://www.siemens.com/automation/service&support
where you will find the following: The newsletter, which
constantly provides you with up-to-date information on
your products. The right documents via our Search function in
Service & Support. A forum, where users and experts from all
over the world exchange their
experiences. Your local representative for Automation &
Drives via our representatives
database. Information on field service, repairs, spare parts and
more under Services.
-
Preface
viiiFM 350-1 Function Module
A5E00073040-02
-
ixFM 350-1 Function ModuleA5E00073040-02
Contents
1 Product Overview 1-1. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1 What Can the FM 350-1 Do? 1-2. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 1.2 Application Areas of
the FM 350-1 1-5. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . 1.3 FM 350-1 Hardware 1-7. . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.4 FM 350-1 Software 1-10. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
2 Installing and Removing the FM 350-1 2-1. . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . 2.1 Preparing the
Installation 2-2. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 2.2 Installing and Removing the FM
350-1 2-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
3 Wiring the FM 350-1 3-1. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1 Terminal Assignments of the Front Connector 3-2. . . . . . . .
. . . . . . . . . . . . . . . . 3.2 Wiring the Front Connector 3-7.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . 3.3 Module Status After Switching On 3-10. . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
4 Assigning Parameters to the FM 350-1 4-1. . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Installing
and Calling Parameter Assignment Screen Forms 4-2. . . . . . . . .
. .
5 Programming the FM 350-1 5-1. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1 The
CNT_CTL1 Function (FC 2) 5-3. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 5.2 The CNT_CTL2 Function (FC 3)
5-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . 5.3 The DIAG_INF Function (FC 1) 5-11. . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . 5.4 Application
Example 5-12. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 5.5 Technical Data for the
Blocks 5-15. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . 5.6 Programming the FM 350-1 without FCs 5-16.
. . . . . . . . . . . . . . . . . . . . . . . . . . . 5.6.1 Control
and Check-back Interface for the Count Modes 5-16. . . . . . . . .
. . . . . . 5.6.2 Control and Check-back Interface for the Measure
Modes 5-24. . . . . . . . . . . . . 5.6.3 Using the Interface with
the Complete Acknowledgement Principle 5-31. . . . . 5.6.4 Restart
Coordination 5-35. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 5.7 Reaction to CPU STOP
and CPU STOP-RUN 5-36. . . . . . . . . . . . . . . . . . . . . .
.
-
Contents
xFM 350-1 Function Module
A5E00073040-02
6 Programming in M7 with the Counter Function Library 6-1. . . .
. . . . . . . . . . . . . . . . . 6.1 Overview 6-2. . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 6.2 Basic Program Structure 6-4. . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . 6.3 Initializing and Parameterizing the Counter Channel 6-5. .
. . . . . . . . . . . . . . . . 6.4 Transferring the Load Value and
Comparison Values 6-8. . . . . . . . . . . . . . . . . 6.5 Control
of the Digital Inputs and Outputs 6-9. . . . . . . . . . . . . . .
. . . . . . . . . . . . . 6.6 Starting and Stopping the Counter
Channel 6-10. . . . . . . . . . . . . . . . . . . . . . . . . 6.7
Reading the Counter Value and the Load Value,
Scanning and Resetting the Status 6-12. . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 6.8 Processing Interrupts
6-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 6.9 Processing Error Messages 6-14. . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
7 Starting Up the FM 350-1 7-1. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1
Mechanical Installation Checklist 7-2. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 7.2 Parameter Assignment
Checklist 7-4. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . .
8 Operating Modes, Parameters and Commands 8-1. . . . . . . . .
. . . . . . . . . . . . . . . . . . . 8.1 Basic Information on
Calling Operating Modes, Settings and Commands 8-28.2 Isochrone
Mode 8-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 8.3 Count Modes 8-4. . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 8.3.1 What are the Count Modes? 8-4. . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . 8.3.2 Definitions 8-5. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.3.3 Continuous Counting 8-8. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 8.3.4 Single
Counting 8-10. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . 8.3.5 Periodic
Counting 8-15. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 8.3.6 Count Range 8-20. .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 8.3.7 Command: Open and Close Gate
8-21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . 8.3.8 Behavior of the Digital Outputs 8-27. . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 8.3.9 Command:
Set Counter 8-38. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 8.3.10 Command: Latch/Retrigger
8-44. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . 8.3.11 Command: Latch 8-46. . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . 8.3.12 Command: Measure the Times Between two Edges 8-48. . . .
. . . . . . . . . . . . . . 8.4 Measure Modes 8-49. . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . 8.4.1 What are the Measure Modes? 8-49. . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 8.4.2
Definitions 8-50. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.4.3
Frequency Measurement 8-55. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 8.4.4 RPM Measurement
8-57. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 8.4.5 Continuous Periodic Measurement
8-59. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. 8.4.6 Command: Open and Close Gate 8-62. . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 8.4.7 Behavior of the
Digital Outputs 8-66. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 8.5 Initiating a Process Interrupt 8-69.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . .
-
Contents
xiFM 350-1 Function ModuleA5E00073040-02
9 Encoder Signals and Their Evaluation 9-1. . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . 9.1 Overview 9-2.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 9.2 5 V Differential
Signals 9-3. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 9.3 24 V Signals 9-5. . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . 9.4 Pulse Evaluation 9-7. . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . .
10 DB Assignments 10-1. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. 11 M7 Reference Counter Function Library 11-1. . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
11.1 M7CntDisableOut 11-2. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2
M7CntDisableSet 11-3. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . 11.3 M7CntEnableOut
11-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 11.4 M7CntEnableSet 11-5. . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . 11.5 M7CntInit 11-7. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . 11.6 M7CntLoadAndStart 11-9. . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11.7 M7CntLoadComp 11-11. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 11.8
M7CntLoadDirect 11-13. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . 11.9
M7CntLoadPrep 11-15. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . 11.10 M7CntPar
11-17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . 11.11 M7CntRead
11-19. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . 11.12 M7CntReadDiag
11-21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 11.13 M7CntReadLoadValue 11-22.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . 11.14 M7CntReadParError 11-23. . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . 11.15 M7CntReadStatus 11-24. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.16
M7CntResetStatus 11-26. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . 11.17 M7CntStart
11-27. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . 11.18 M7CntStop
11-28. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . 11.19
M7CntStopAndRead 11-30. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . 11.20 M7CNT_DIAGINFO
11-31. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 11.21 M7CNT_PARAM 11-33. . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . 11.22 M7CNT_STATUS 11-36. . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11.23 Error Codes 11-37. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
-
Contents
xiiFM 350-1 Function Module
A5E00073040-02
12 Faults and Diagnostics 12-1. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12.1 Fault Indication via the Group Error LED 12-2. . . . . . . . .
. . . . . . . . . . . . . . . . . . . 12.2 Initiation of
Diagnostics Interrupts 12-3. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 12.3 Data Errors 12-7. . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . 12.4 Operator Errors 12-9. . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . .
A Technical Specifications A-1. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B
Spare Parts B-1. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. C References C-1. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . .
Glossary Glossary-1. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. Index Index-1. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . .
-
Contents
xiiiFM 350-1 Function ModuleA5E00073040-02
Figures1-1 Example for Using an FM 350-1 in the S7-300 1-6. . .
. . . . . . . . . . . . . . . . . . . . 1-2 FM 350-1 Module View
1-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . 1-3 SIMATIC S7-300 configuration with an FM
350-1 1-10. . . . . . . . . . . . . . . . . . . . . 2-1 Installing
the Coding Connector 2-4. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 3-1 Front Connector of the FM 350-1
3-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . 3-2 Details Regarding the Connection of an Incremental 5V
Encoder 3-7. . . . . . . 3-3 Details Regarding the Connection of an
Incremental 24V Encoder 3-8. . . . . . 3-4 FM 350-1 with Shielded
Cables and the Shield Support 3-9. . . . . . . . . . . . . . . 5-1
Exchange of Data between the User Program and FM 350-1 with FCs
5-2. . 5-2 Complete acknowledgement principle 5-31. . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . 5-3 Transfer of values
5-32. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 5-4 Resetting the status bits 5-34.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . 5-5 Restart sequence 5-35. . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-1 Continuous counting with gate control 8-8. . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 8-2 Single counting without
main counting direction; Cancel gate function 8-10. . . 8-3 Single
counting without main counting direction; Cancel gate function
8-11. . . 8-4 Single counting with main counting direction
down;
Cancel gate function 8-12. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 8-5 Single
Counting with Load Value and gate control 8-13. . . . . . . . . . .
. . . . . . . . . 8-6 Periodic counting without main counting
direction 8-15. . . . . . . . . . . . . . . . . . . . 8-7 Periodic
counting with main counting direction up 8-16. . . . . . . . . . .
. . . . . . . . . 8-8 Periodic counting with main counting
direction down 8-17. . . . . . . . . . . . . . . . . . 8-9 Periodic
Counting with Load Value and gate control 8-18. . . . . . . . . . .
. . . . . . . 8-10 Level-Controlled Opening and Closing of the
Hardware Gate 8-21. . . . . . . . . . 8-11 Edge-Controlled Opening
and Closing of the Hardware Gate 8-22. . . . . . . . . . 8-12
Opening and Closing of the Software Gate 8-23. . . . . . . . . . .
. . . . . . . . . . . . . . . 8-13 Continuous counting, down,
Cancel gate function 8-24. . . . . . . . . . . . . . . . . . . .
8-14 Continuous counting, down, Interrupt gate function 8-24. . . .
. . . . . . . . . . . . . . . 8-15 Starting and stopping the
counting operation
with the SW gate (SW_GATE) 8-25. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 8-16 Starting and stopping
the counting process
with the HW gate (HW_GATE) 8-25. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 8-17 At the start of the
counting process, V2 > V1 8-31. . . . . . . . . . . . . . . . .
. . . . . . . . 8-18 At the start of the counting process, V1 >
V2 8-32. . . . . . . . . . . . . . . . . . . . . . . . . 8-19
Reactions of an output for a pulse duration 0 ms 8-33. . . . . . .
. . . . . . . . . . . . . . 8-20 Example showing the effect of
hysteresis 8-36. . . . . . . . . . . . . . . . . . . . . . . . . .
. . 8-21 Example in response to a change of direction at the
comparison value 8-36. . 8-22 Example showing the effect of
hysteresis 8-37. . . . . . . . . . . . . . . . . . . . . . . . . .
. . 8-23 Single Setting with DI Set 8-40. . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 8-24 Multiple
Setting with DI Set 8-41. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 8-25 Single Setting of the
Counter with the Zero Mark 8-42. . . . . . . . . . . . . . . . . .
. . . 8-26 Multiple Setting of the Counter with the Zero Mark 8-43.
. . . . . . . . . . . . . . . . . . . 8-27 Latch/Retrigger when
load value = 0 and a positive edge at Start DI 8-45. . . . 8-28
Latch when load value = 0 and a positive edge at Start DI 8-47. . .
. . . . . . . . . . 8-29 Measuring principle 8-50. . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . 8-30 Principle of continuous measurement
(example of a frequency measurement) 8-52. . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 8-31 Limit value monitoring in
Measure modes 8-53. . . . . . . . . . . . . . . . . . . . . . . . .
. . 8-32 Frequency measurement with gate function 8-55. . . . . . .
. . . . . . . . . . . . . . . . . . 8-33 RPM measurement with gate
function 8-57. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . 8-34 Periodic measurement of the gate function 8-59. . . . .
. . . . . . . . . . . . . . . . . . . . .
-
Contents
xivFM 350-1 Function Module
A5E00073040-02
8-35 Level-controlled opening and closing of the HW gate 8-62. .
. . . . . . . . . . . . . . . 8-36 Edge-controlled opening and
closing of the HW gate 8-63. . . . . . . . . . . . . . . . . 8-37
Level-controlled opening and closing of the SW gate 8-64. . . . . .
. . . . . . . . . . . 8-38 Starting and stopping the counting
process
with the SW gate (SW_GATE) 8-65. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 8-39 Starting and stopping
the counting process
with the HW gate (HW_GATE) 8-65. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 9-1 Signals of the
Incremental 5 V encoder 9-3. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . 9-2 Signals of a 24 V Pulse Encoder with
Direction Level 9-5. . . . . . . . . . . . . . . . . 9-3 Single
Evaluation 9-7. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 9-4 Double Evaluation
9-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 9-5 Quadruple Evaluation 9-8. . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . .
-
Contents
xvFM 350-1 Function ModuleA5E00073040-02
Tables1-1 Input Filters 1-3. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-1 Front Connector Assignments 3-3. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 3-2 Input Filters for 24
V Encoder Signals 3-5. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . 3-3 Input Filters for Digital Inputs 3-6. . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1
Parameters for transferring values in the DB (Count modes) 5-8. . .
. . . . . . . 5-2 Parameters for transferring values in the DB
(Measure modes) 5-9. . . . . . . . 5-3 DIAG_INF function parameters
5-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . 5-4 Symbols in Example 5-13. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5
Control interface for Count modes (outputs) 5-17. . . . . . . . . .
. . . . . . . . . . . . . . . 5-6 Explanation of the control bits
for the Count modes 5-19. . . . . . . . . . . . . . . . . . 5-7
Check-back interface for Count modes (inputs) 5-20. . . . . . . . .
. . . . . . . . . . . . . 5-8 Explanation of the check-back bits
for the Count modes 5-22. . . . . . . . . . . . . . 5-9 Control
interface for Measure modes (outputs) 5-24. . . . . . . . . . . . .
. . . . . . . . . 5-10 Explanation of the control bits for the
Measure modes 5-26. . . . . . . . . . . . . . . . 5-11 Check-back
interface for Measure modes (inputs) 5-27. . . . . . . . . . . . .
. . . . . . 5-12 Explanation of the check-back bits for the Measure
modes 5-29. . . . . . . . . . . . 5-13 Data record DS 2 5-34. . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . 8-1 The FM 350-1 Count modes 8-4. . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
Starting count 8-6. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 8-3 The FM
350-1 commands 8-7. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 8-4 Output DO0 8-30. . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . 8-5 Output DO1 8-30. . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . 8-6 Marginal conditions for the behavior of the digital
outputs 8-34. . . . . . . . . . . . . 8-7 Effect of the hysteresis
8-35. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . 8-8 The FM 350-1 Measure modes 8-49. . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-9
Starting count 8-53. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 8-10 The FM
350-1 commands 8-54. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 8-11 Calculating the update time
8-55. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . 8-12 Calculating the update time 8-57. . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-13
Calculating the update time 8-59. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 8-14 Behavior of digital
output DO0 8-67. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . 8-15 Output DO0 8-68. . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . 8-16 Output DO1 8-68. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. 8-17 Assignment of the bits of the variable OB40_POINT_ADDR 8-70.
. . . . . . . . . . 9-1 Encoders for the FM 350-1 9-2. . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-2 Count Direction in Dependence on the Input Parameterization
9-6. . . . . . . . . 9-3 Input Filters 9-6. . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . 10-1 DB Assignments 10-1. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-1 Detailed Specifications of the Parameterization Data 11-34. .
. . . . . . . . . . . . . . . 11-2 Operator Errors 11-37. . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . 11-3 Counter Function Errors 11-38. . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-4 Parameterization Errors 11-39. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 12-1
Assignments of Diagnostics Data Set DS0 12-4. . . . . . . . . . . .
. . . . . . . . . . . . . . 12-2 Assignments of the Bits of Bytes 4
to 11 of Diagnostics Data Set 12-5. . . . . . . 12-3 Data Error
Numbers and their Meanings 12-7. . . . . . . . . . . . . . . . . .
. . . . . . . . . . 12-4 Numbers of the Operator Errors and their
Meaning 12-9. . . . . . . . . . . . . . . . . . . B-1 Accessories
and Spare Parts B-1. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . .
-
Contents
xviFM 350-1 Function Module
A5E00073040-02
-
1-1FM 350-1 Function ModuleA5E00073040-02
Product Overview
Chapter OverviewThis chapter gives you an overview of the FM
350-1 function module. You will learn what the FM 350-1 can do. You
will become familiar with the application areas of the FM 350-1
through
examples. You will learn how the FM 350-1 is linked into the
S7-300/M7-300
programmable controller and you will become familiar with the
most importantcomponents of the FM 350-1.
Section Description Page1.1 What Can the FM 350-1 Do? 1-21.2
Application Areas of the FM 350-1 1-51.3 FM 350-1 Hardware 1-7
1.4 FM 350-1 Software 1-10
1
-
Product Overview
1-2FM 350-1 Function Module
A5E00073040-02
1.1 What Can the FM 350-1 Do?
What Can the FM 350-1 Do?The FM 350-1 function module is a
high-speed counter module for use in theS7-300/M7-300 programmable
controller. There is one counter on the module thatcan operate in
the following ranges: 0 to 4,294,967,295 (0 to 232 1) or
2,147,483,648 to + 2,147,483,647 (231 to 231 1).The maximum input
frequency of the counter signals is up to 500 kHz dependingon the
encoder signal.You can use the FM 350-1 for the following tasks:
Continuous counting Single counting Periodic counting Frequency
measurement Rotational speed measurement Period measurementYou can
start and stop each mode either via the user program (software
gate) orvia external signals (hardware gate).
Comparison ValuesYou can store two comparison values on the
module assigned to the two relevantoutputs on the module. If the
counter status reaches one of the two comparisonvalues, the
relevant output can be set to initiate control actions direct in
theprocess.
Load ValueYou can specify a value on the FM 350-1 from which it
should begin counting. Thisvalue is called the load value. Any
value within the count limits can be set for theload value.
Process InterruptsThe FM 350-1 can trigger a process interrupt
in the CPU if the comparison valuesare reached, or in the case of
overflow, underflow and/or in the case of zero passof a
counter.
-
Product Overview
1-3FM 350-1 Function ModuleA5E00073040-02
Diagnostics InterruptsThe FM 350-1 can trigger a diagnostics
interrupt if any of the following occur: Fault in external
auxiliary voltage Fault in 5.2 VDC encoder supply Module not
parameterized or errors in parameterization Watchdog triggered RAM
defective Process interrupt lost Fault in signal A, B or N
Pulse Duration
You can specify a pulse duration for the digital outputs of the
FM 350-1. The pulseduration specifies how long the relevant digital
output is to be set. You can specifya value between 0 and 500 ms
for the pulse duration. This value applies for bothoutputs. You can
adapt the FM 350-1 to existing actuators by specifying a
pulseduration.
Which Signals can the FM 350-1 Register?The FM 350-1 can
register the signals from the following sources: Incremental 5 V
encoders Incremental 24 V encoders 24 V pulse encoders with
direction level 24 V initiators without direction level for
example, light barrier or BERO Internal 1 MHz time base
Input FilterFor the purpose of suppressing interference, you can
parameterize input filters (RCelements) with a uniform filter time
for the 24 V inputs A*, B* and N* and for thedigital inputs. The
following two input filters are available:
Table 1-1 Input Filters
Features Input Filter 1(Default)
Input Filter 2
Typical input delay 1 s 15 sMaximum counting frequency 200 kHz
20 kHzMinimum pulse width of the count signals 2.5 s 25 s
Central OperationYou can apply the FM 350-1 in S7-300 and M7-300
systems centrally.
-
Product Overview
1-4FM 350-1 Function Module
A5E00073040-02
Distributed OperationYou can use the FM 350-1 via IM 153-1, IM
153-2 and IM 153-3 distributed inET 200M. Examples of application
are:
ET 200M with single backplane bus ET 200M with active backplane
bus ET 200M as moduled clocked mode slave ET 200M in one-sided mode
in an H system ET 200M in interconnected mode in an H system
Firmware UpdateFor upgrades and bugfixes it is possible with the
help of STEP 7 HW Config (as ofV 5.2) to download firmware updates
to the operating system memory of FM 350-1.
NoticeStarting the firmware updates deletes the old FM 350-1
firmware.If the firmware update is interupted or terminated by any
means, the FM 350-1 willno longer be available.Please start the
firmware update again and wait until it is successfully
completed.
CiRThe FM 350-1 is CiR-compatible, i. e. via configuration
modification at RUN of theCPU you can change the FM
350-1parameters. Parameter changes resets theFM 350-1 and is
essentially a reconfiguration.FM 350-1 allows parameter changes
during operation of the user program (seechapter 4).
Isochrone ModeDepending on your STEP 7 V 5.2 configuration, you
can work with the FM 350-1either in non-isochrone or isochrone
mode.
-
Product Overview
1-5FM 350-1 Function ModuleA5E00073040-02
1.2 Application Areas of the FM 350-1
Where Can You Use the FM 350-1?The main application area of the
FM 350-1 is where signals with high frequenciesare counted and
high-speed responses have to be triggered to predefined
counterstatuses.
Examples include:
Packaging plants Sorting plants Dosing or proportioning
plants.
-
Product Overview
1-6FM 350-1 Function Module
A5E00073040-02
Example for the Use of an FM 350-1In this example, a carton must
be filled with a specific number of parts. Onecounter of the FM
350-1 counts the parts and controls the motor for transportingthe
parts and the motor for transporting the carton.If the carton is in
the correct position, conveyor belt A is stopped via the
lightbarrier, the count is started and the motor for conveyor belt
B is switched on. Whenthe carton contains the programmed number of
parts, the FM 350-1 stops themotor for conveyor belt B and switches
on the motor for conveyor belt A forremoval of the carton. The
count can start again when the next carton reaches thelight
barrier.
Gate
MotorMotor
Lightbarrier
FM 350-1
Belt A
Belt B
Figure 1-1 Example for Using an FM 350-1 in the S7-300
-
Product Overview
1-7FM 350-1 Function ModuleA5E00073040-02
1.3 FM 350-1 Hardware
View of ModuleFigure 1-2 shows the FM 350-1 module with a front
connector and the expansionbus with the front panel closed.
Labeling strips
Expansion busSIMATIC interface
Version
Coding connector
Diagnosticsand status LEDs
Order number
Front connector with front connectorcoding
Type plate
Figure 1-2 FM 350-1 Module View
Front ConnectorThe FM 350-1 offers the following connection
possibilities via the front connector: 5 V or 24 V encoder signals
Encoder supply Digital input signals for starting, stopping and
setting the counter Digital output signals Q0 and Q1 Auxiliary
voltage 1L+ for generating the encoder supply voltages Load voltage
2L+ for supplying the digital outputsThe front connector must be
ordered separately (see Appendix B).
-
Product Overview
1-8FM 350-1 Function Module
A5E00073040-02
Front Connector CodingWhen you press the front connector from
the wiring position to the operatingposition, the front connector
coding engages. Thereafter, this front connector canonly be
attached to an FM 350-1 module.
Coding ConnectorThe coding connector is used to set the FM 350-1
to the encoder signals used. Thefollowing settings are
possible:
Coding Connector at Setting... ...Corresponds to the Following
Encoder SignalsA 5 V differential signals (state as supplied)D 24 V
signals
The coding connector is located on the left side of the FM
350-1.
Labeling StripsEnclosed with the module is a labeling strip on
which you can write your relevantsignal names.The pin assignments
are printed on the inside of the front panel.
Order Number and VersionThe order number and the version of the
FM 350-1 are given at the bottom of thefront panel.
Firmware VersionThe firmware version indicates the version at
the time of delivery. It can be updatedwith a firmware update.
Expansion BusCommunications within one tier of the S7-300/M7-300
takes place over theexpansion bus. The expansion bus is supplied
with the FM 350-1.
-
Product Overview
1-9FM 350-1 Function ModuleA5E00073040-02
Status and Diagnostics LEDsThe FM 350-1 has eight LEDs that can
be used both for diagnostics and forindicating the status of the FM
350-1 and its digital inputs and outputs.The following table lists
the LEDs with their labeling, color and function.
Label Color FunctionSF Red Group errorCR Green Counter running;
status of the least significant bit of the counterDIR Green
Direction of count; LED lights up, if the counter is counting
downI0 Green Status of DI StartI1 Green Status of DI StopI2 Green
Status of DI SetQ0 Green Status of output DO0Q1 Green Status of
output DO1
-
Product Overview
1-10FM 350-1 Function Module
A5E00073040-02
1.4 FM 350-1 Software
Configuration PackageTo integrate the FM 350-1 into the S7-300,
use the configuration package on thesupplied CD . This
contains:
Parameter assignment software with parameter dialogs Software
for the CPU (blocks) Documentation
The software for integrating the FM 350-1 into the M7-300 is
described inChapters 6 and 11.
Figure 1-3 shows an S7-300 configuration with an FM 350-1 and
several signalmodules.
CPUwith user programand FCs of theFM 350-1 FM 350-1
PC/PG with STEP 7
Configuration packagewith parameter dialogs,blocks and
manual
Figure 1-3 SIMATIC S7-300 configuration with an FM 350-1
Parameter Assignment Screen FormsThe FM 350-1 is adapted to the
task in hand via parameters. These parameter arestored in an SDB
and transferred to the module from the CPU.
You can specify the parameters via parameter assignment screen
forms. Theseparameter assignment screen forms are installed on your
programming device andcalled up within STEP 7.
-
Product Overview
1-11FM 350-1 Function ModuleA5E00073040-02
Software for the S7-300 CPUThe software for the CPU consists of
the FC CNT_CTL1 function called in the userprogram of the CPU. This
FC enables communication between the CPU and theFM 350-1. There is
also the FC DIAG_INF function for the FM 350-1, with whichyou can
transfer diagnostics information into the DB of the FC
CNT_CTL1.
-
Product Overview
1-12FM 350-1 Function Module
A5E00073040-02
-
Installing and Removing the FM 350-1
2-1FM 350-1 Function ModuleA5E00073040-02
Installing and Removing the FM 350-1
This Chapter...This chapter contains information on installing
and removing the FM 350-1. You will learn what you must look out
for when installing. You will get notes and
hints on configuring, arranging and installing an FM 350-1. You
will learn, step-by-step, how to install and remove an FM
350-1.
Chapter Overview
Section Description Page2.1 Preparing the Installation 2-22.2
Installing and Removing the FM 350-1 2-3
2
-
Installing and Removing the FM 350-1
2-2FM 350-1 Function Module
A5E00073040-02
2.1 Preparing the Installation
Important Safety RulesThere are important rules you must observe
for integrating an S7-300 with anFM 350-1 into a plant or a system.
These rules and regulations are explained inmanual /1/.
Vertical or Horizontal ArrangementHorizontal arrangement is
preferable. For vertical arrangement, you must observethe
restricted ambient temperatures (max. 40 C).
Defining the SlotsThe 350-1 function module can be installed
like a signal module in any of slots 4 to 11.
Mechanical ConfigurationManual /1/ describes the possibilities
open to you for mechanical installation andhow to proceed when
configuring. The following gives only a few supplementarynotes.
1. A maximum of eight SMs or FMs are permissible per rack.2. The
maximum number is restricted by the width of the modules or the
length of
your mounting rail. The FM 350-1 requires an installation width
of 40 mm.3. The maximum number is restricted by the total current
consumptions of all
modules to the right of the CPU from the 5 V backplane bus
supply. The currentconsumption of the FM 350-1 is 160 mA.
4. The maximum number is restricted by the memory required by
the CPUsoftware for communications with the FM 350-1.
-
Installing and Removing the FM 350-1
2-3FM 350-1 Function ModuleA5E00073040-02
2.2 Installing and Removing the FM 350-1
Rules
No special protection measures (ESD guidelines) are required for
installing anFM 350-1.
Tools RequiredYou require a 4.5 mm flat-bladed screwdriver for
installing and removing theFM 350-1.
Setting the Signal Type (Coding Key)Before mounting an FM 350-1
on the mounting rail, you must place the coding keyin the correct
position. The following table assigns the position of the coding
key tothe signal type used. (refer also to /1/)
Position of the Coding Connector Signal TypeA 5 V differential
signalsD 24 V signals
-
Installing and Removing the FM 350-1
2-4FM 350-1 Function Module
A5E00073040-02
The letter of the coding connector must point to the arrow.
Figure 2-1 Installing the Coding Connector
-
Installing and Removing the FM 350-1
2-5FM 350-1 Function ModuleA5E00073040-02
Installation ProcedureHow to mount the FM 350-1 on the mounting
rail:1. Switch the CPU to the STOP state.2. The FM 350-1 is
supplied with an expansion bus. Plug this into the bus
connector of the module to the left of the FM 350-1. (The bus
connector islocated on the back and you may have to loosen the
neighboring module.)
3. Hang the FM 350-1 onto the rail and swing it down.4. Tighten
the screw on the FM 350-1 (tightening torque approximately
0.8 to 1.1 Nm).If further modules are to be installed to the
right of the FM 350-1, first connectthe expansion bus of the next
module to the right-hand backplane busconnector of the FM 350-1.If
the FM 350-1 is the last module in the rack, do not connect an
expansionbus!
5. Label the FM 350-1 with its slot number. Use the number wheel
supplied withthe CPU for this purpose.Manual /1/ describes the
numbering scheme you must use and how to connectthe slot
numbers.
6. Install the shield attachment.
Procedure for Removal/Replacement of ModulesHow to remove the FM
350-1:
1. Switch off the auxiliary voltage and the load voltage at the
front connector.2. Switch the CPU to the STOP state.3. Open the
front panel. If necessary, remove the labeling strip.4. Release the
front connector and pull it out.5. Loosen the fixing screw on the
module.6. Swing the module out of the mounting rail and unhook
it.7. Install the new module if applicable.
Further Notes
Manual /1/ contains further notes on installing and removing
modules.
-
Installing and Removing the FM 350-1
2-6FM 350-1 Function Module
A5E00073040-02
-
Wiring the FM 350-1
3-1FM 350-1 Function ModuleA5E00073040-02
Wiring the FM 350-1
Chapter OverviewThis chapter contains the following information
on wiring the FM 350-1: Terminal assignments of the front
connector. The function of the connections. Notes on selecting
cables. The steps you must execute when wiring the front connector.
The status of the module after wiring and switching on the power
supply.
Section Description Page3.1 Terminal Assignments of the Front
Connector 3-23.2 Wiring the Front Connector 3-73.3 Module Status
After Switching On 3-10
3
-
Wiring the FM 350-1
3-2FM 350-1 Function Module
A5E00073040-02
3.1 Terminal Assignments of the Front Connector
Front ConnectorYou connect the count signals, the digital inputs
and outputs, the encoder supplyand the auxiliary voltage and load
voltage via the 20-pin front connector.Figure 3-1 shows the front
of the module, the front connector and the inside of thefront panel
with the pin assignments.
DIR
Q1
Q0
I2
I1
I0
1
2
34
5
6
7
8
90
1
2
3
4
56
7
8
9
0
1
1
1
1
1
1
1
1
1
1
2
1
2
3
4
5
6
7
8
9
10
1 L +
1MDC 5,2 VSUPPLYDC 24 VA A*
A
B B*
BN N*
N
20
1918
17
15
14
13
11
2 L+
1M
Front connector
2M
CR
350-1AH03-0AE0
COUNTER MODULE
Front of the module Inside of the front panel
SF
FM 350-1
Figure 3-1 Front Connector of the FM 350-1
-
Wiring the FM 350-1
3-3FM 350-1 Function ModuleA5E00073040-02
Front Connector Assignments
Table 3-1 Front Connector Assignments
Conection Name Input/Output
Function
Auxiliary voltage1 1L+ INP 24 V auxiliary voltage2 1M INP
Auxiliary voltage ground
5 V encoderRS 422,
symmetric
24 V encoder,asymmetric
24 V pulsegenerator withdirection level
24 V initiator
3 1M OUTP Encoder supply ground4 5.2VDC OUTP 5.2 V encoder
supply5 24VDC OUTP 24 V encoder supply6 A A* INP Encoder signal
AEncoder signal A*
7 A INP Encoder signalA
8 B B* INP Encoder signalB
Encoder signalB*
Directionsignal
9 B INP Encoder signalB
10 N N* INP Encoder signalN
Encoder signalN*
11 N INP Encoder signalN
12
Digital inputs and digital outputs13 I0 INP Digital input DI
Start14 I1 INP Digital input DI Stop15 I2 INP Digital input DI
Set16
17 Q0 OUTP Digital output DO018 Q1 OUTP Digital output DO1
Load voltage19 2L+ INP 24 V load voltage20 2M INP Load voltage
ground for the digital inputs and outputs
-
Wiring the FM 350-1
3-4FM 350-1 Function Module
A5E00073040-02
NoteThe circuits for the counter inputs (encoder supply, encoder
signals) arenon-isolated to the ground of the CPU, that is,
terminal 2 (1M) must have alow-resistance connection to CPU
ground.If you supply the encoders externally, you must also connect
the ground of thisexternal voltage with the ground of the CPU.
Auxiliary Voltage 1L+, 1MConnect a direct voltage of 24 V to the
1L+ and 1M terminals for the voltage supplyof the 5 V and 24 V
encoders.
An integral diode protects the module from reverse polarity of
the auxiliary voltage.The module monitors the connection of the
auxiliary voltage.
5.2 VDC Encoder SupplyThe module generates a voltage of 5.2 V
from the auxiliary voltage 1L+/1M at amaximum current of 300 mA
that is available at the 5.2 VDC connection for
theshort-circuit-proof supply of a 5 V encoder. The encoder supply
is checked forshort-circuit.
24 VDC Encoder SupplyFor the 24 V voltage supply of an encoder,
the voltage 1L+/1M is made availableand short-circuit proof at the
24 VDC output. The encoder supply is monitored
forshort-circuit.
5 V Encoder Signals A/A, B/B, N and NYou can connect incremental
encoders with 5 V differential signals to the frontconnector in
accordance with RS 422, that is, incremental encoders with
thedifferential signals, A/A, B/B, N and N.The signals A/A, B/B, N
and N are connected via the terminals so labeled.The signals N and
N are only connected if you want to set the counter to the zeromark
of the encoder.
The inputs are not electrically isolated from the bus of the
S7-300 (refer to the noteon this page).
-
Wiring the FM 350-1
3-5FM 350-1 Function ModuleA5E00073040-02
24 V Encoder Signals A*, B* and N*24 V signals are represented
by the letters A*, B* and N*.You can connect three different
encoder types to each counter:
Incremental encoders with 24 V signals:The signals A*, B* and N*
are connected via the terminals so labeled.
Pulse encoders without direction level:The signal is connected
to terminal A*.
Pulse encoders with direction level:The count signal is
connected to terminal A*. The direction level is connected
toterminal B*.
The inputs are not galvanically isolated from the S7-300 bus
(see note onpage 3-3).
Input Filter for 24 V Encoder SignalsFor the purpose of
suppressing interference, you can parameterize input filters
(RCelements) with a uniform filter time for the 24 V inputs A*, B*
and N. The followinginput filters are available:
Table 3-2 Input Filters for 24 V Encoder Signals
Features Input Filter 1(Default)
Input Filter 2
Typical input delay 1 s 15 sMaximum counting frequency 200 kHz
20 kHzMinimum pulse width of the count signals 2.5 s 25 s
Digital Inputs DI Start, DI Stop and DI SetYou can use digital
inputs DI Start and DI Stop for the gate control of the
counter.Gate control can be both level-controlled and
edge-controlled (refer to Chapter 8).Digital input DI Set is used
to set the counter to the load value.The digital inputs are
operated with a nominal voltage of 24 V.The digital inputs are
galvanically isolated from the bus of the S7-300 and thecounter
inputs.
-
Wiring the FM 350-1
3-6FM 350-1 Function Module
A5E00073040-02
Input Filter for Digital InputsFor the purpose of suppressing
interference, you can parameterize input filters(RC elements) with
a uniform filter time for digital inputs I0, I1 and I2. The
followingtwo input filters are available.
Table 3-3 Input Filters for Digital Inputs
Features Input Filter 1(Default)
Input Filter 2
Typical input delay 1 s 15 sMaximum frequency of the input
signals 200 kHz 20 kHzMinimum pulse width of the input signals 2.5
s 25 s
Digital Outputs DO0 and DO1The FM 350-1 features two digital
outputs, DO0 and DO1, for directly triggeringcontrol processes.
The digital outputs are supplied with the 2L+ load voltage.The
digital outputs are galvanically isolated from the S7-300 bus and
the counterinputs.
The digital outputs are source outputs and can be loaded with a
load current of0.5 A. They are protected from overload and
short-circuit.
NoteRelays and contactors can be connected direct without
external circuitry.
The time characteristics of the digital outputs depend on the
parameterization andare explained in more detail in Chapter 8.
Load Voltage 2L+/ 2MFor supplying digital outputs DO0 and DO1, a
load voltage of 24 V must besupplied to the module via terminals
2L+ and 2M.
An integral diode protects the module from polarity reversal of
the load voltage.The load voltage 2L+/2M is not monitored by the FM
350-1.
-
Wiring the FM 350-1
3-7FM 350-1 Function ModuleA5E00073040-02
3.2 Wiring the Front Connector
CablesThere are some rules for you to observe when selecting
cables: The cables for digital inputs DI Start, DI Stop and DI Set
must be shielded. The cable for the counter signals must be
shielded. You must apply the shields of the counter signal cables
both at the pulse
encoder and in the immediate vicinity of the module via the
shield attachment,for example.
The cables A/A, B/B and N/N of the incremental 5 V encoder must
be twisted inpairs.
Shield onshield support
Shield onhousing
A
B
N5.2VDC1 M
6
7
89
10
Front connector
11
34
NB
A
Twisted cables
Figure 3-2 Details Regarding the Connection of an Incremental 5V
Encoder
Terminal 2 (1M) of the front connector must have a
low-resistance connection tothe ground of the CPU. If you supply
the encoder with an external voltage, youmust also connect the
ground of this external voltage with the ground of the CPU.
-
Wiring the FM 350-1
3-8FM 350-1 Function Module
A5E00073040-02
Shield onshield support
Shield onhousing
A *
B *
N *
24VDC
1 M
6
8
10
5
3
Front connector
Figure 3-3 Details Regarding the Connection of an Incremental
24V Encoder
Use flexible cables with cross-sections of 0.25 to 1.5 mm.
NoteIf the encoders are supplied via the module, the cable
cross-section must be largeenough to carry the required voltage to
the encoder despite voltage drops over thecable. This applies
especially in the case of incremental 5 V encoders.
A wire end ferrule is not required. If you use wire end ferrules
then use onlythose without insulation collar in accordance with DIN
46228 Form A, shortversion!
-
Wiring the FM 350-1
3-9FM 350-1 Function ModuleA5E00073040-02
Wiring StepsProceed as follows when wiring the front
connector:
! WarningThere is a danger of personal injury.If you wire the
front connector of the FM 350-1 when the power is switched on,
youare in danger of injury from electric shock.Wire the FM 350-1
only when the power is switched off!
1. Open the front panel and place the front connector in the
wiring position.2. Strip the conductors (length 6 mm).3. Are you
using wire end ferrules?
If so: Press-fit the wire end ferrules onto the conductors.4.
Feed the enclosed strain relief clamp into the front connector.5.
If the wires leave the module at the bottom, begin wiring at the
bottom,
otherwise begin at the top. Also tighten unassigned terminals
(tightening torque0.6 to 0.8 Nm).
6. Tighten the strain relief clamp for the cable chain.7. Push
the front connector into the operating position.8. Apply the cable
shields to the shield attachment or to the shield bar.9. Label the
terminals on the labeling strip.
Figure 3-4 FM 350-1 with Shielded Cables and the Shield
Support
-
Wiring the FM 350-1
3-10FM 350-1 Function Module
A5E00073040-02
3.3 Module Status After Switching On
Default SettingThe state in which the module is after the power
supply is turned on whenparameters are still not being transmitted:
No gate in other words, gate open Counter inputs with default
setting for 5 V differential signals, track B not
inverted; single evaluation (see 9-4); Count limit 32 bits
Counter status zero Counter setting with input DI Set (and zero
mark) inhibited Input delay for digital inputs I0, I1 and I2:
typically 1 s
(max. frequency: 200 kHz, minimum pulse width: 2.5 s) Input
delay for 24 V counter inputs: typically 1 s
(max. frequency: 200 kHz, minimum pulse width: 2.5 s) Outputs
DO0 and DO1 disabled Pulse duration = 0 No process interrupts set
Operating mode Continuous count set Status signals are updated
-
Assigning Parameters to the FM 350-1
4-1FM 350-1 Function ModuleA5E00073040-02
Assigning Parameters to the FM 350-1
Chapter OverviewIn this chapter, you will learn how to install
and start parameter assignment screenforms.
The parameter assignment screen forms have an integral help
function thatsupports you in parameterizing and starting up the FM
350-1.
Section Description Page4.1 Installing and Calling Parameter
Assignment Screen Forms 4-2
4
-
Assigning Parameters to the FM 350-1
4-2FM 350-1 Function Module
A5E00073040-02
4.1 Installing and Calling Parameter Assignment ScreenForms
Marginal ConditionsThe following conditions apply for
transferring parameter assignment data to theCPU:
STEP 7 (version 5.0) is correctly installed on your PG.The
following instructions refer specifically to STEP 7 (version
5.2)
The programming device must be correctly connected to the CPU
The CPU must be in STOP
NoteYou must not plug in or remove any S7-300 modules during
data exchange overthe MPI!
Installing the Parameter Assignment ScreensThe whole
configuration package is located on the enclosed CD. To install
theconfiguration package, perform the following steps:1. Uninstall
your present configuration package, if any.2. Insert the CD into
the CD drive on your PG or PC.3. In Windows 95/Windows NT/Windows
98, open the dialog box for installing
software by double-clicking on the Software icon on the Control
Panel.4. In the dialog box, select the CD drive and, in the
directory called
FMx50-1\Disk1, select the Setup.exe file and start the
installation operation.5. Follow the successive instructions
displayed by the installation program.
Result: The components of the configuration package are
installed in thefollowing directories:
SIEMENS\STEP7\S7LIBS\FMx50LIB: FCs, UDTs SIEMENS\STEP7\S7FCOUNT:
configuration software, Readme, online Help SIEMENS\STEP7\EXAMPLES:
Examples SIEMENS\STEP7\S7MANUAL\S7FCOUNT: Getting Started,
manuals
NoteIf you selected a directory other than SIEMENS\STEP7 when
you installedSTEP 7, that directory will be entered.
-
Assigning Parameters to the FM 350-1
4-3FM 350-1 Function ModuleA5E00073040-02
Calling the Parameter Assignment ScreensTo call the parameter
assignment screens of the FM 350-1, perform the followingsteps:
1. Place the order number on a vacant slot.2. Double-click on
the order number.3. Acknowledge with OK any dialog box which may
appear and prompt you to
save the configuration.
-
Assigning Parameters to the FM 350-1
4-4FM 350-1 Function Module
A5E00073040-02
-
5-1FM 350-1 Function ModuleA5E00073040-02
Programming the FM 350-1
Chapter OverviewThis chapter contains all the information
necessary for programming the FM 350-1in the S7-300. For linking
the FM 350-1 into a user program, you are provided withSTEP 7
blocks that make handling the desired functions easy for you.This
chapter describes these blocks.
Block Number Block Name MeaningFC 2 CNT_CTL1 Controlling of the
FM 350-1FC 3 CNT_CTL2 Controlling of the FM 350-1 (only in
isochrone
mode)FC 1 DIAG_INF Read diagnostics data set 1 from the FM
350-1
Use of the blocks is illustrated in an example program. The
example programshows block calls and contains the necessary data
block.
You can also operate the FM 350-1 without FCs, in which case you
control andmonitor the FM 350-1 via the control and check-back
interface.
Section Description Page5.1 The CNT_CTL1 Function (FC 2) 5-35.2
The CNT_CTL2 Function (FC 3) 5-105.3 The DIAG_INF Function (FC 1)
5-115.4 Application Example 5-125.5 Technical Data for the Blocks
5-15
5.6 Programming the FM 350-1 without FCs 5-165.6.1 Control and
Check-back Interface for the Count Modes 5-165.6.2 Control and
Check-back Interface for the Measure Modes 5-245.6.3 Using the
Interface with the Complete Acknowledgement Principle 5-315.6.4
Restart Coordination 5-355.7 Reaction to CPU STOP and CPU STOP-RUN
5-36
5
-
Programming the FM 350-1
5-2FM 350-1 Function Module
A5E00073040-02
Exchange of Data between the User Program and FM 350-1 with
FCsThe figure below illustrates the exchange of data
User program in the CPU
FM 350-1Data
DBx
Program
FC2
Instructions
.
.
.
.
Feedback Interface
Control Interface
Figure 5-1 Exchange of Data between the User Program and FM
350-1 with FCs
Accessing the Control and Check-back Interface with STEP 7
ProgrammingYou can access the FM 350-1 control and feedback
interface from the userprogram either using standard FCs or with
load and transfer commands. Mixedoperation is not permitted.
Standard FC Load and transfercommands
Control interface Write with CNT_CTL1or CNT_CTL2
Transfer command, e.g. T PAD
Feedback interface Read with CNT_CTL1or CNT_CTL2
Load command, e.g. L PED
-
Programming the FM 350-1
5-3FM 350-1 Function ModuleA5E00073040-02
5.1 The CNT_CTL1 Function (FC 2)
RequirementThe data required for the CNT_CTL1 function is stored
in a DB on the CPU. TheCNT_CTL1 function transfers data cyclically
from this DB to the FM and fetchesdata from the FM.
You create the DB under STEP 7 as a data block with assigned
user-specific datatype. Select UDT 2 as the source file. UDT 2 was
copied to the block library called FMx50LIB when the FCs were
installed. You must not modify UDT 2. Copy UDT 2together with the
FCs into your project. Before programming the FM 350-1,
thefollowing valid data must be assigned to the DB of the CNT_CTL1
function: Module address
You set the module address (base address of the FM 350-1) when
configuringyour hardware.You can enter the address automatically in
the DB by selecting the module inHW Config, and then selecting a
data block from the Properties dialog byclicking on the Mod Addr
button.
Channel addressThe channel address is the same as the module
address in pointer format.
User data lengthThe user data length is 16.
You can save these data by means of a parameter assignment
screen (refer to theleaflet Getting Started with Commissioning) or
by means of the user program inthe DB.
-
Programming the FM 350-1
5-4FM 350-1 Function Module
A5E00073040-02
ExampleYou will find below an example of how to implement the
transfer of the moduleaddress, the channel address and the user
data length in OB100.The symbol table contains the following
assignments for this example:
CNT_CHAN1 DB 1 DB with the counter data
Program the transfer as follows in STL:
STL Explanation
L 512 // Module address = 512T CNT_CHAN1.MOD_ADR // Transfer of
module addressL P# 512.0 // Module address in pointer formatT
CNT_CHAN1.CH_ADR // Transfer of the channel addressL 16 // User
data length = 16T CNT_CHAN1.U_D_LGTH // Transfer of the user data
length
CallThe CNT_CTL1 function can be called either cyclically or in
a time-controlled orisochrone interrupt OB. You cannot call the
CNT_CTL1 function in anevent-controlled interrupt program.The
CNT_CTL1 function call in the STL and LAD notations is given
below.
STL notation
LAD notation
CALL CNT_CTL1 (
DB_NO := ,
CNT_CTL1
SW_GATE := ,
EN ENO
GATE_STP := ,
DB_NO OT_ERR
OT_ERR_A := ,
SW_GATE
SET_DO0 := ,
GATE_STP
SET_DO1 := ,
OT_ERR_A
OT_ERR := ,
SET_DO0
L_DIRECT := ,
SET_DO1
L_PREPAR := ,
L_DIRECT
T_CMP_V1 := ,
L_PREPAR
T_CMP_V2 := ,
T_CMP_V1
C_DOPARA := ,
T_CMP_V2
RES_SYNC := ,
C_DOPARA
RES_ZERO := )
RES_SYNC
RES_ZERO
-
Programming the FM 350-1
5-5FM 350-1 Function ModuleA5E00073040-02
CNT_CTL1 Function Parameters
Name DeclarationType
DataType
Meaning The User... TheBlock...
DB_NO INPUT INT Number of the data block withthe counter
data
enters this scans this
SW_GATE INPUT BOOL Counter control bit SW gate(start/stop)
sets andresets this
scans this
GATE_STP INPUT BOOL Counter control bit Gate stop sets andresets
this
scans this
OT_ERR_A INPUT BOOL Acknowledge operator error sets andresets
this
scans this
SET_DO0 INPUT BOOL Set/Reset DO0 sets andresets this
scans this
SET_DO1 INPUT BOOL Set/Reset DO1 sets andresets this
scans this
OT_ERR OUTPUT BOOL Operator error occurred scans this sets
andresets this
L_DIRECT 2) IN-OUT BOOL Count:Initiation bit for direct
andpreparatory loading of a counter
sets thisscans andresets this
Measure: Must NOT be set
-
resets this
L_PREPAR 2) IN-OUT BOOL Count:Initiation bit for
preparatoryloading of a counter
sets this scans andresets this
Measure:Transmission of the lower limit
resets this
T_CMP_V1 2) IN-OUT BOOL Count:Initiation bit for transferring
thecomparison value 1
sets this scans andresets this
Measure:Transmission of the upper limit
resets this
T_CMP_V2 2) IN-OUT BOOL Count:Initiation bit for transferring
thecomparison value 2
sets this scans andresets this
Measure:Update time
resets this
C_DOPARA IN-OUT BOOL Initiation bit for parameterchange
sets this scans andresets this
RES_SYNC IN-OUT BOOL Delete Synchronization statusbit
sets this scans andresets this
RES_ZERO IN-OUT BOOL Delete Zero pass status bit sets this scans
andresets this
1) This parameter must not be set at the same time as the
L_DIRECT, L_PREPAR, T_CMP_V1 or T_CMP_V2parameter.
2) This parameter must not be set at the same time as the
C_DOPARA parameter.
-
Programming the FM 350-1
5-6FM 350-1 Function Module
A5E00073040-02
Editing JobsYou make a job request for the FM 350-1 via the
relevant FC parametersL_DIRECT, L_PREPAR, T_CMP_V1, T_CMP_V2,
C_DOPARA, RES_SYNC,RES_ZERO, and OT_ERR_A.
You must enter the appropriate values for the job (load value,
comparison values,lower limit, upper limit, update time) before you
call the FC in the DB.A set in/out parameter (L_DIRECT, L_PREPAR,
T_CMP_V1, T_CMP_V2,C_DOPARA, RES_SYNC and RES_ZERO) is deleted
again by the CNT_CTL1function after completion of the job. You can
see from this that processing of the jobhas been completed by the
FM 350-1. If necessary, you can incorporate thisinformation in your
user program.
Transferring ValuesDepending on the operating mode, you can
transfer values by setting this functionparameter.
Operating mode Function parameterCount L_DIRECT, L_PREPAR,
T_CMP_V1, T_CMP_V2, C_DOPARAMeasure L_PREPAR, T_CMP_V1, T_CMP_V2,
C_DOPARA
You can transfer several values at the same time:
In ... you can transfer at the same timeCount mode Load
value
Comparison value 1 Comparison value 2
(DB parameter LOAD_VAL)(DB parameter CMP_V1)(DB parameter
CMP_V2)
Measure mode Lower limit Upper limit Update time
(DB parameter LOAD_VAL)(DB parameter CMP_V1)(DB parameter
CMP_V2)
If a value is incorrect, you must first acknowledge this
operator error withOT_ERR_A before the FM 350-1 can accept any
further values. You should thencorrect the value rejected with the
operator error and transfer it again.
NoteIf you use the function parameter L_DIRECT, L_PREPAR,
T_CMP_V1 orT_CMP_V2 to load the value LOAD_VAL, CMP_V1 or CMP_V2,
you cannotchange the parameter assignments at the same time using
function parameterC_DOPARA.This would lead to an OT_ERR operator
error that you would have to acknowledgewith OT_ERR_A.
-
Programming the FM 350-1
5-7FM 350-1 Function ModuleA5E00073040-02
Time Required to Transfer ValuesThe time required to transfer
values is shown in the table below:
Use of the FM 350-1 Time requiredCentralized At least 4 OB 1
cyclesDecentralized (non-isochrone mode) At least 5 PROFIBUS DP
cyclesDecentralized (isochrone mode) Transfer of just one value 5
PROFIBUS DP cycles If the transfer of several values is
initiated at the same time the valuesbelow reach FM 350-1 the
1st value: 5 PROFIBUS DP cycles after initiation the 2nd value: 6
PROFIBUS DP cycles after initiation the 3rd value: 7 PROFIBUS DP
cycles after initiation
Parameters for Transferring Values in the DB (Count Modes)Table
5-1 shows the range of the DB in which you transfer the
LOAD_VAL,CMP_V1 and CMP_V2 parameters.
The LOAD_VAL parameter (bytes 14 to 17) has two meanings: If you
set function parameter L_DIRECT or L_PREPAR, LOAD_VAL is
interpreted as a load value. If you set function parameter
C_DOPARA, you can use byte 14 to define the
behavior of outputs DO0 and DO1. Bytes 15 and 16 are interpreted
ashysteresis and pulse duration.
-
Programming the FM 350-1
5-8FM 350-1 Function Module
A5E00073040-02
Table 5-1 Parameters for transferring values in the DB (Count
modes) DB address Parameter Meaning14.0 LOAD_VAL Load value; direct
and preparatory loading with function parameter:
L_DIRECTLoad value; preparatory loading with function
parameter:L_PREPAR
14.0 LOAD_VAL The behavior of outputs DO0 and DO1, hysteresis
and pulse duration, aredefined using function
parameter:C_DOPARA
Bit 3 Bit 2 Bit 1 Bit 0 Behavior of output DO0x 0 0 0 Inactivex
0 0 1 Active from comparison value to overflowx 0 1 0 Active from
comparison value to underflowx 0 1 1 Active on reaching the
comparison value for
pulse duration (up/down)x 1 0 0 Active on reaching the
comparison value for
pulse duration (up)x 1 0 1 Active on reaching the comparison
value for
pulse duration (down)x = irrelevant
Bit 7 Bit 6 Bit 5 Bit 4 Behavior of output DO1x 0 0 0 Inactivex
0 0 1 Active from comparison value to overflowx 0 1 0 Active from
comparison value to underflowx 0 1 1 Active on reaching the
comparison value for
pulse duration (up/down)x 1 0 0 Active on reaching the
comparison value for
pulse duration (up)x 1 0 1 Active on reaching the comparison
value for
pulse duration (down)x 1 1 0 Switch to comparison value
x = irrelevant
15.0 Hysteresis (value range 0...255)16.0 Pulse duration (value
range 0..250)17.0 Reserved = 018.0 CMP_V1 Comparison value 1; load
with function parameter:
T_CMP_V122.0 CMP_V2 Comparison value 2; load with function
parameter:
T_CMP_V2
-
Programming the FM 350-1
5-9FM 350-1 Function ModuleA5E00073040-02
Parameters for Transferring Values in the DB (Measure
Modes)Table 5-2 shows the range of the DB in which you transfer the
LOAD_VAL,CMP_V1 and CMP_V2 parameters.
The LOAD_VAL parameter (bytes 14 to 17) has two meanings: If you
set function parameter L_PREPAR, LOAD_VAL is interpreted as a
lower
limit
If you set function parameter C_DOPARA, byte 14 is used to
define thebehavior of output DO0.
You must not set the L_DIRECT parameter for a Measure mode.
Table 5-2 Parameters for transferring values in the DB (Measure
modes) DB address Parameter Meaning14.0 LOAD_VAL Lower limit; load
with function parameter: L_PREPAR14.0 LOAD_VAL Behavior of DO0;
define with function parameter: C_DOPARA
Bits 2 to 7 Bit 1 Bit 0 Behavior of output DO0irrelevant 0 0 No
comparisonirrelevant 0 1 Exceeds limitsirrelevant 1 0 Under lower
limitirrelevant 1 1 Above upper limit
15.0 Reserved = 016.0 Reserved = 017.0 Reserved = 018.0 CMP_V1
Upper limit 1; Load with function parameter: T_CMP_V120.0 CMP_V2
Update time; Load with function parameter: T_CMP_V2
Restart CharacteristicsAs soon as the CNT_CTL1 function detects
a restart (CPU restart or FM restart),any pending job is deferred
and the restart is acknowledged first. Any job alreadyinitiated by
you is continued only after the restart has been completed and will
notbe lost.
Error MessagesIf an operator error occurs in the case of an FC
call, this is reported in the OT_ERRparameter. The error
information can then be read out in DB1 (OT_ERR_Bvariable). With
the help of the OT_ERR_A parameter, you can then
acknowledgeoperator errors. No new operator error will be reported
until you haveacknowledged the previous one.
-
Programming the FM 350-1
5-10FM 350-1 Function Module
A5E00073040-02
5.2 The CNT_CTL2 Function (FC 3)
FunctionalityThe CNT_CTL2 function essentially has the same
functionality as the CNT_CTL1function (see section 5.1). The
differences compared to the CNT_CTL1 functionare explained
below.
Possible UsesThe CNT_CTL2 function only works in an isochrone
OB.
If you call the CNT_CTL2 function in a non-isochrone OB, you
will generateoperator error no. 91. You will then not be able to
exchange data with theFM 350-1.
Mode of OperationThe CNT_CTL2 function is particularly suitable
for applications in which you wantto send the same job (e.g. Load
comparison value) to the FM 350-1 several timesin quick succession.
While the CNT_CTL1 function is ideally used to initiate a newjob in
every fifth PROFIBUS DP cycle, with the CNT_CTL2 function, this
occurs inevery second PROFIBUS DP cycle.
The block is ready for a job when the relevant initiation bit is
set to 0. Completion ofa job is not displayed separately.If a
communication problem or a data or operator error occurs, it cannot
beassigned to a particular job, so the block will stop processing
the job and willgenerate an operator error no. 90, which can be
acknowledged. Once you haveacknowledged the error by setting the
OT_ERR_A parameter, any outstanding jobswill be (further)
processed.Acknowledgement of an operator error is deemed to be
successful if the OT_ERRparameter is reset. You should therefore
leave the OT_ERR_A parameter set toguarantee acknowledgement. There
is no point in initiating further jobs until theacknowledgement is
successful.
NoteIn isochrone mode, you cannot start several value transfers
at the same time usingthe CNT_CTL2 function.
-
Programming the FM 350-1
5-11FM 350-1 Function ModuleA5E00073040-02
5.3 The DIAG_INF Function (FC 1)
FunctionalityThe DIAG_INF function reads data set DS1 from the
FM 350-1 and makes itavailable to you in the DB of the CNT_CTL1
function. The transfer works asfollows:
If the initiation parameter is set (IN_DIAG = TRUE), DS1 is read
out from theFM 350-1.
DS1 is entered in the DB of the CNT_CTL1 function from DW 54.
DS1 istransferred with the help of the SFC RDSYSST.
The return code of the SFC (RET_VAL) is copied to the RET_VAL
parameter ofthe DIAG_INF function .
As soon as the function has been executed, the IN_DIAG
initiation parameter isreset and the transfer is reported to be
complete.
Manual /2/ contains a full description of the SFC RDSYSST.
CallThe DIAG_INF function can be called in the cycle and in the
interrupt program.There is no point in calling it in the
time-controlled program.The DIAG_INF function call is given in the
STL and LAD notations below.
STL notation
LAD notation
CALL DIAG_INF(
DB_NO := ,
DIAG_INF
RET_VAL := ,
EN ENO
IN_DIAG := );
DB_NO RET_VAL
IN_DIAG
DIAG_INF Function Parameters
Table 5-3 DIAG_INF function parameters
Name DeclarationType
Data Type Meaning The User... The Block...
DB_NO INPUT INT Number of the CNT_CTL1function data block
enters this scans this
RET_VAL OUTPUT INT Return code of the SFC 51 scans this enters
thisIN_DIAG IN-OUT BOOL Initiation bit read diagnostics
data set DS1sets andscans this
resets this
-
Programming the FM 350-1
5-12FM 350-1 Function Module
A5E00073040-02
5.4 Application Example
IntroductionThe example below shows how the CNT_CTL1 function
can be used for thefunctions Transfer load value to FM 350-1 and
Start counter. These functions arerepresentative of all functions
here.
STL ExplanationL #1000; // Enter load value inT
CNT_CHAN1.LOAD_VAL; // the DB 1 (double integer).
A INITIATE;S LOAD_DIRECT; // DIRECT input parameterR
INITIATE;
CALL CNT_CTL1, ( // FC call with the DB 1DB_NO :=1 // Channel
1SW_GATE :=SW_GATE // Control software gateGATE_STP :=GATE_STP //
Stop gateOT_ERR_A :=CON_OT_ERR, // Acknowledge operator
errorSET_DO0 :=SET_DO0, // SET outpour DO0SET_DO :=SET_DO1, // SET
output DO1OT_ERR :=OTT_ERR, // Operator error occurredL_DIRECT
:=L_DIRECT, // Load new counter valueL_PREPAR :=L_PREPAR, //
Prepare new counter valueT_CMP_V1 :=T_CMP_V1, // Load new
comparison value 1T_CMP_V2 :=T_CMP_V2, // Load new comparison value
2C_DOPARA :=C_DOPARA, // Initiate parameter changeRES_SYNC
:=RES_SYNC, // Delete synchronization status bitRES_ZERO
:=RES_ZERO); // Delete zero pass status bit
AN OT_ERR; // If no error has occurred,JC CONT; // CONTinue
// *** Error evaluation START ***L CNT_CHAN1.OT_ERR_B; // Read
and display additionalT OUTPUT; // information.SET // Generate RLO
1S CON_OT_ERR // Acknowledge error... // Further error responseJU
END; // ***Error evaluation END ***
CONT: .. // Continue with normal executionAN L_DIRECT; // Load
direct function is readyS SW_GATE; // Open software gate;
END:
-
Programming the FM 350-1
5-13FM 350-1 Function ModuleA5E00073040-02
Description of the SymbolsTable 5-4 lists the symbols used in
the example. You define your own symbolassignments in the S7 Symbol
Table.
Table 5-4 Symbols in Example
Symbols Absolute(Example)
Comment
CNT_CHAN1 DB 1 Data block for CNT_CTL1
functionCNT_CHAN1.LOAD_VAL DB1.DBD14 Counter value specification in
DB 1 (double word)TRIGGER M 10.0 Trigger memory marker formed as a
result of the
technological requirementSW_GATE M 20.0 Start counterGATE_STP M
20.1 Close counter gateOT_ERR_A M 20.2 Acknowledge operator
errorSET_DO0 M 20.3 Set output DO0SET_DO1 M 20.4 Set output
DO1OT_ERR M 20.5 Operator error occurredL_DIRECT M 20.6 Direct and
preparatory loading of counter valueL_PREPAR M 20.7 Load value of
counter in preparationT_CMP_V1 M 21.0 Load comparison value
1T_CMP_V2 M 21.1 Load comparison value 2C_DOPARA M 21.2 Initiate
parameter changeRES_SYNC M 21.3 Reset synchronization status
bitRES_ZERO M 21.4 Reset zero pass, overflow, underflow and
comparator
or end of measurement status bitCNT_CHAN1.OT_ERR_B DB1.DBB40.0
Operator error information in DB 1
-
Programming the FM 350-1
5-14FM 350-1 Function Module
A5E00073040-02
Description of the ProcedureRequirement
The value to be transferred must have been entered in DB 1.
Load value is transferred and started
The load value of the channel is transferred to the FM 350-1 by
means of the FCcall.
There are two parameters available for transferring the load
value to the FM 350-1.When calling the CNT_CTL1 function, the
parameter selected is either L_DIRECTor L_PREPAR.
Parameter L_DIRECT defines that the load value is transferred
directly and inpreparation to the counter (you set the trigger bit
L_DIRECT=1 in your userprogram).Parameter L_PREPAR defines that the
load value is only loaded in preparation(you have to set the
trigger bit L_PREPAR=1 in your user program).The load value loaded
in preparation is then applied at the next cause that sets
thecounter.
The FC must therefore be called until the FC has reset the
selected trigger bit(L_DIRECT or L_PREPAR). The in/out parameter
remains set during the transfer.With regard to the exchange of data
with the FM, the CNT_CTL1 function does notissue an error
message.If the trigger bit you set has been reset by the CNT_CTL1
function, the FM 350-1has applied the load value. The read load
value stored in DB 1 is updated by theCNT_CTL1 function (applicable
only if you are working without the latch setting).It takes at
least four FC calls to transfer the load value.
-
Programming the FM 350-1
5-15FM 350-1 Function ModuleA5E00073040-02
5.5 Technical Data for the Blocks
Technical data CNT_CTRLfunction
CNT_CTL1function
CNT_CTL2function
DIAG_INFfunction
Block number FC 0 FC 2 FC 3 FC 1Version 3.0 3.0 3.0 3.0
Size in RAM 456 bytes 796 bytes 1426 bytes 246 bytesSize in load
memory 538 bytes 950 bytes 1578 bytes 326 bytesSize in data area 70
bytes long data block that is specified when the FC is called.Size
in local data area 4 bytes 46 bytes 46 bytes 38 bytesSystem
function called SFC 6
(RD_INFO)SFC 6(RD_INFO)
SFC 51RDSYSST
Processing time in theCPU 316-2 DP(FM 350-1 centralized)
0.98 ms 1.25 ms 2.12 ms 3.19 ms
Processing time in theCPU 316-2 DP(FM 350-1decentralized)
0.78 ms 1.06 ms 1.99 ms 0.87 ms
Processing time in theCPU 416-2 DP(FM 350-1decentralized)
30 s 70 s 92 s 134 s
Isochrone mode no yes yes yesNon-isochrone mode yes yes no
yes
-
Programming the FM 350-1
5-16FM 350-1 Function Module
A5E00073040-02
5.6 Programming the FM 350-1 without FCs
If you want to operate the FM 350-1 without FCs, you can control
and monitor theFM 350-1 directly via the control and check-back
interface (working data interface).The working data interface
starts at the modules starting address and is 16 byteslong.Load
commands allow you to read the check-back interface.
Transfer commands are used to write to the control
interface.
Mixed use of load / transfer commands and programming with FCs
is notpermitted.
5.6.1 Control and Check-back Interface for the Count Modes
Control Interface for Count ModesThe LOAD_VAL parameter (bytes 0
to 3) has two meanings: If you set the L_DIRECT or L_PREPAR bit,
LOAD_VAL is interpreted as a load
value.
If you set the C_DOPARA bit, you can use byte 0 to define the
behavior ofoutputs DO0 and DO1. Bytes 1 and 2 are interpreted as
hysteresis and pulseduration.
-
Programming the FM 350-1
5-17FM 350-1 Function ModuleA5E00073040-02
Table 5-5 Control interface for Count modes (outputs) Offset
from
startingaddress
Parameter Meaning
Bytes 0 to 3 LOAD_VAL Load value; direct and preparatory loading
with bit: L_DIRECTLoad value; preparatory loading with bit:
L_PREPAR
Byte 0 LOAD_VAL The behavior of outputs DO0 and DO1, hysteresis
and pulse duration, are defined using bit: C_DOPARA
Bit 3 Bit 2 Bit 1 Bit 0 Behavior of output DO0x 0 0 0
Inactive
x 0 0 1 Active from comparison value tooverflow
x 0 1 0 Active from comparison value tounderflow
x 0 1 1 Active on reaching the comparisonvalue for pulse
duration (up/down)
x 1 0 0 Active on reaching the comparisonvalue for pulse
duration (up)
x 1 0 1 Active on reaching the comparisonvalue for pulse
duration (down)
x = irrelevant
Bit 7 Bit 6 Bit 5 Bit 4 Behavior of output DO1x 0 0 0
Inactive
x 0 0 1 Active from comparison value tooverflow
x 0 1 0 Active from comparison value tounderflow
x 0 1 1 Active on reaching the comparisonvalue for pulse
duration (up/down)
x 1 0 0 Active on reaching the comparisonvalue for pulse
duration (up)
x 1 0 1 Active on reaching the comparisonvalue for pulse
duration (down)
x 1 1 0 Switch to comparison valuex = irrelevant
Byte 1 Hysteresis (value range 0...255)Byte 2 Pulse duration
(value range 0..250)Byte 3 Reserved = 0Bytes 4 to 7 CMP_V1
Comparison value 1; load with bit: T_CMP_V1
-
Programming the FM 350-1
5-18FM 350-1 Function Module
A5E00073040-02
Table 5-5 Control interface for Count modes (outputs),
continuedOffset from
startingaddress
MeaningParameter
Bytes 8 to 11 CMP_V2 Comparison value 2; load with bit:
T_CMP_V2Byte 12
NEUSTQ
OT_ERR_A
Bit 7: Reserved = 0Bit 6: Restart acknowledgementBit 5: Reserved
= 0Bit 4: Reserved = 0Bit 3: Operator error acknowledgementBit 2:
Reserved = 0Bit 1: Reserved = 0Bit 0: Reserved = 0
Byte 13
SW_GATEGATE_STPENSET_DNENSET_UP
Bit 7: Reserved = 0Bit 6: Reserved = 0Bit 5: Reserved = 0Bit 4:
Reserved = 0Bit 3: SW gate control bitBit 2: General gate stopBit
1: Enable synchronization downBit 0: Enable synchronization up
Byte 14
SET_DO1SET_DO0CTRL_DO1CTRL_DO0
Bit 7: Reserved = 0Bit 6: Reserved = 0Bit 5: Reserved = 0Bit 4:
Reserved = 0Bit 3: Control bit DO1Bit 2: Control bit DO0Bit 1:
Enable DO1Bit 0: Enable DO0
Byte 15 C_DOPARA 1)
RES_ZERO
RES_SYNCT_CMP_V2 2)
T_CMP_V1 2)
L_PREPAR 2)
L_DIRECT 2)
Bit 7: Reserved = 0Bit 6: Change function of DO0/DO1, hysteresis
or pulse durationBit 5: Reset status bits for zero pass, overflow,
underflow
and comparatorBit 4: Reset status bit for synchronizationBit 3:
Load comparison value 2Bit 2: Load comparison value 1Bit 1:
Preparatory loading of counterBit 0: Direct and preparatory loading
of counter
1) You must not set this bit at the same time as bit 0, 1, 2 or
3 of byte 15.2) You must not set this bit at the same time as bit 6
of byte 15.
-
Programming the FM 350-1
5-19FM 350-1 Function ModuleA5E00073040-02
Explanation of the Control Bits for the Count Modes
Table 5-6 Explanation of the control bits for the Count
modes
Control bits Explanation
C_DOPARA Mod