Counter module FM 450-1
___________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________
SIMATIC
S7-400
Counter module FM 450-1
Manual
02/2014
A5E03648739
-02
Preface
Product Overview
1
This is how the FM 450-1
counts
2
Installation and Removal
3
Wiring
4
Parameter assignment
5
Program
6
Commissioning
7
Modes, settings, parameters
and commands
8
Encoder signals and their
evaluation
9
Assignment of the DB
10
Errors and diagnostics
11
Technical Data
12
Spare parts
13
References
14
Siemens AG
Industry Sector
Postfach 48 48
90026 NÜRNBERG
GERMANY
A5E03648739-02
03/2014 Subject to change
Copyright © Siemens AG 2014.
All rights reserved
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
indicates that minor personal injury can result if proper precautions are not taken.
NOTICE
indicates that property damage can result if proper precautions are not taken.
If more than one degree of danger is present, the warning notice representing the highest degree of danger will
be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to
property damage.
Qualified Personnel
The product/system described in this documentation may be operated only by
personnel qualified
for the specific
task in accordance with the relevant documentation, in particular its warning notices and safety instructions.
Qualified personnel are those who, based on their training and experience, are capable of identifying risks and
avoiding potential hazards when working with these products/systems.
Proper use of Siemens products
Note the following:
WARNING
Siemens products may only be used for the applications described in the catalog and in the relevant technical
documentation. If products and components from other manufacturers are used, these must be recommended
or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and
maint
enance 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.
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 3
Preface
Purpose of this manual
This manual describes all steps required to use the FM 450-1 function module efficiently. It
supports you in installing and commissioning the module. The procedures for installing and
removing, wiring, assigning parameters, and programming are explained.
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 requires general knowledge of automation engineering.
You also require knowledge of the use of computers or PC-type equipment (such as
programming devices) based on a Windows 95/98/2000 or NT operating system as well as
STEP 7 programming skills.
Scope of this manual
The present manual contains the description of the FM 450-1 valid at the time the manual is
published. We reserve the right to describe changes to the functions of the FM 450-1 in the
form of product information.
Standards
The S7-400 automation system meets the requirements and criteria of IEC 61131-2.
Recycling and disposal
Owing to the fact that its equipment is low in contaminants, the FM 450-1 can be recycled.
For environmentally compliant recycling and disposal of your discarded device, please
contact a company certified for the disposal of electronic waste.
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)
Preface
Counter module FM 450-1
4 Manual, 02/2014, A5E03648739-02
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)
Technical Support
You can access technical support for all A&D projects via the following:
Online support request form: (http://www.siemens.com/automation/support-request)
Service & Support on the Internet
In addition to our documentation, we offer a comprehensive online knowledge base on the
Internet at:
Industry Automation and Drive Technologies - Homepage
(http://www.siemens.com/automation/service&support)
There you will find the following information, for example:
The newsletter that provides up-to-date information on your products.
The documents you need via our Search function in Service & Support.
A forum for global information exchange by users and specialists.
Your local partner for Automation and Drives.
Information about on-site service, repairs, and spare parts. Much more can be found
under "Services".
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 5
Table of contents
Preface ................................................................................................................................................... 3
1 Product Overview .................................................................................................................................... 9
1.1 Chapter overview ........................................................................................................................... 9
1.2 Properties ..................................................................................................................................... 10
1.3 Fields of applications of the FM 450-1 ......................................................................................... 12
1.4 The FM 450-1 hardware .............................................................................................................. 13
1.5 The FM 450-1 software ................................................................................................................ 16
2 This is how the FM 450-1 counts ........................................................................................................... 19
2.1 Basics ........................................................................................................................................... 19
2.2 Gate functions .............................................................................................................................. 22
3 Installation and Removal ....................................................................................................................... 23
3.1 Chapter overview ......................................................................................................................... 23
3.2 Preparing for Mounting ................................................................................................................ 24
3.3 Installing the FM 450-1 ................................................................................................................ 25
3.4 Removal of the FM 450-1 ............................................................................................................ 26
4 Wiring ................................................................................................................................................... 27
4.1 Chapter overview ......................................................................................................................... 27
4.2 Terminal assignment of the front connector ................................................................................ 28
4.3 Wiring Front Connectors .............................................................................................................. 35
4.4 Module status after power is switched on .................................................................................... 39
5 Parameter assignment .......................................................................................................................... 41
5.1 Chapter overview ......................................................................................................................... 41
5.2 Installing and calling parameter assignment screen forms .......................................................... 42
6 Program ................................................................................................................................................ 45
6.1 Chapter overview ......................................................................................................................... 45
6.2 The FC CNT_CTRL function ........................................................................................................ 46
6.3 The FC DIAG_INF function .......................................................................................................... 50
6.4 Example application ..................................................................................................................... 51
6.5 Technical specifications of the blocks .......................................................................................... 53
Table of contents
Counter module FM 450-1
6 Manual, 02/2014, A5E03648739-02
7 Commissioning ..................................................................................................................................... 55
7.1 Chapter overview ........................................................................................................................ 55
7.2 Working steps during mechanical installation ............................................................................. 56
7.3 Working steps for parameter assignment ................................................................................... 59
8 Modes, settings, parameters and commands ........................................................................................ 65
8.1 Chapter overview ........................................................................................................................ 65
8.2 Overview of modes, settings and commands ............................................................................. 66
8.3 Basics on calling modes, settings and commands ..................................................................... 68
8.4 Infinite counting ........................................................................................................................... 69
8.5 Single counting ............................................................................................................................ 71
8.6 Periodic counting ......................................................................................................................... 73
8.7 Count range ................................................................................................................................ 75
8.8 Setting: Behavior of the digital outputs ....................................................................................... 76
8.9 Setting: Pulse duration ................................................................................................................ 79
8.10 Command: Open and close gate ................................................................................................ 80
8.11 Command: Set counter ............................................................................................................... 83
8.12 Initiating a process interrupt ........................................................................................................ 90
9 Encoder signals and their evaluation ..................................................................................................... 93
9.1 Chapter overview ........................................................................................................................ 93
9.2 Encoders which can be connected ............................................................................................. 94
9.3 5-V differential signals ................................................................................................................. 95
9.4 24-V signals ................................................................................................................................ 97
9.5 Signal evaluation ....................................................................................................................... 100
10 Assignment of the DB .......................................................................................................................... 103
10.1 Assignment of the DB ............................................................................................................... 103
11 Errors and diagnostics ......................................................................................................................... 107
11.1 Chapter overview ...................................................................................................................... 107
11.2 Faults indicated via the diagnostics LEDs ................................................................................ 108
11.3 Initiation of diagnostics interrupts .............................................................................................. 109
11.4 Data error .................................................................................................................................. 112
11.5 Operator error ........................................................................................................................... 113
12 Technical Data ..................................................................................................................................... 115
12.1 General technical specifications ............................................................................................... 115
12.2 Technical Data .......................................................................................................................... 116
Table of contents
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 7
13 Spare parts ......................................................................................................................................... 119
14 References ......................................................................................................................................... 121
Glossary ............................................................................................................................................. 123
Index................................................................................................................................................... 127
Table of contents
Counter module FM 450-1
8 Manual, 02/2014, A5E03648739-02
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 9
Product Overview
1
1.1
Chapter overview
Section overview
This section provides you with an overview of the FM 450-1 function module.
It informs you of what the FM 450-1 can do.
Examples demonstrate some of the possible applications of the FM 450-1.
You will learn how the FM 450-1 is integrated into the S7-400 automation system, and
familiarize yourself with the vital components of FM 450-1.
Product Overview
1.5 The FM 450-1 software
Counter module FM 450-1
10 Manual, 02/2014, A5E03648739-02
1.2
Properties
Properties
The FM 450-1 is a fast counter module to be used in the S7-400 automation system. There
are two counters on the module which can work in the following counting ranges as required:
0 to 4 294 967 295 (0 to 232 - 1)
- 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 depending on the
encoder signal.
The FM 450-1 can be used for the following counting tasks:
Continuous counting
Single counting
Periodic counting
You can start and stop the count either via the user program (software gate) or via external
signals (hardware gate).
Comparison values
You can store two comparison values per counter on the module; they are assigned to the
two corresponding outputs on the module. If the counter status reaches one of the
comparison values, then the output assigned to it can be set so that it triggers control
operations directly in the process.
Load value
You can determine an initial value (load value) for each counter on the FM 450-1 The
counter is set at the initial value if a software or hardware-related signal to the module comes
up.
Hardware interrupts
When comparison values are reached, for overflow, underflow and/or for zero crossing of a
counter, the FM 450-1 can trigger a Hardware interrupt.
Product Overview
1.5 The FM 450-1 software
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 11
Diagnostic interrupt
When the following events occur, the FM 450-1 can trigger a diagnostic interrupt:
External auxiliary voltage faulty
Encoder 5.2 VDC supply faulty
Module not assigned parameters or errors in parameter assignment
Watchdog timeout
RAM defective
Hardware interrupt lost
Fault in signal A, B, or N of the 5 V encoder
Pulse duration
You can determine a pulse duration for the digital outputs of the FM 450-1. The pulse
duration is used to specify how long the corresponding digital output is to be set. You can
specify a value between 0 and 500 ms for the pulse duration. This value applies to both
outputs. By prescribing a pulse duration you can adapt the FM 450-1 to existing actors.
Which signals can the FM 450-1 count?
The FM 450-1 can count signals that are generated by the following encoders:
Incremental 5-V encoders
Incremental 24-V encoders
24-V pulse encoders with direction level
24-V initiators without direction level
e.g., light barrier or BERO
Input filter
For the purpose of suppressing interference, you can assign input filters (RC elements) with
a uniform filter time for the 24 V inputs A*, B*, and N* and for the digital inputs. The following
two input filters are available:
Table 1- 1 Input filter
Characteristics
Input filter 1
(default)
Input filter 2
Typical input delay
1 μs
15 μs
Maximum count frequency
200 kHz
20 kHz
Minimum pulse width of the count signals
2.5 μs
25 μs
Product Overview
1.5 The FM 450-1 software
Counter module FM 450-1
12 Manual, 02/2014, A5E03648739-02
1.3
Fields of applications of the FM 450-1
You can use the FM 450-1 as follows:
The main field of application of the FM 450-1 is where it is necessary to count signals with
high frequencies and fast reactions must be triggered when a prescribed counter reading is
reached.
Examples are:
Packaging plants,
sorting plants,
dosing plants
Example application for an FM450-1
Here a specific number of parts is to be filled into a box. An FM 450-1 counter assumes the
job of counting the parts and controlling the two motors for transporting the parts and the
box.
If the box is in the right position, belt A is stopped via the light barrier, the counting process is
started and the motor for belt B switched on. If the programmed number of parts are in the
box, the FM 450-1 stops the motor for belt B and switches on the motor for belt A so that the
box can be transported away. The counting process can start again when the next box
reaches the light barrier
Figure 1-1 Example application for an FM450-400 in the S7-400
Product Overview
1.5 The FM 450-1 software
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 13
1.4
The FM 450-1 hardware
View of module
The illustration shows the FM 450-1 module with front connector plugged in.
Figure 1-2 Illustration of the FM 450-1
Order number and version
The full order number of the FM 450-1 is shown on the rating plate.
The abbreviated order number and the version of the FM 450-1 are marked on the top end of
the front of the module.
Product Overview
1.5 The FM 450-1 software
Counter module FM 450-1
14 Manual, 02/2014, A5E03648739-02
Diagnostic and status LEDs
The FM 450-1 has 16 LEDs. The LEDs are for diagnostic purposes and indicate the state of
the FM 450-1 and its digital inputs and outputs. The following table lists labeling, color and
function of the LED displays.
Table 1- 2 Labeling, color and function of the LEDs
Labeling
Color
Function
INTF
Red
Internal error
EXTF
Red
External error
CH1 CR
CH2 CR
Green Counter in operation; status of the lowest value bit of counter 1 (CH 1) or
counter 2 (CH2)
CH1 DIR
CH2 DIR
Green Count direction; LED illuminated if counter 1 (CH1) or counter 2 (CH2) is
counting backwards.
CH1 IN 0
CH2 IN 0
Green Status of input 1I0 of counter 1 and/or 2I0 of counter 2
CH1 IN 1
CH2 IN 1
Green Status of input 1I1 of counter 1 and/or 2I1 of counter 2
CH1 IN 2
CH2 IN 2
Green Status of input 1I2 of counter 1 and/or 2I2 of counter 2
CH1 OUT 0
CH2 OUT 0
Green Status of output 1Q0 of counter 1 and/or 2Q0 of counter 2
CH1 OUT 1
CH2 OUT 1
Green Status of output 1Q1 of counter 1 and/or 2Q1 of counter 2
Front connectors
The front connector has the following terminals:
5-V or 24-V encoder signals for counters 1 and 2
Encoder supply
Digital input signals to start, stop and set counters 1 and 2
Digital output signals Q0 and Q1 for counters 1 and 2
Auxiliary voltage 1L+ to generate the encoder supply voltages
Load voltage 2L+ to supply the digital outputs
The front connector can be ordered separately (see chapter "Spare parts (Page 119)").
Product Overview
1.5 The FM 450-1 software
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 15
Front connector coding
If you hook in the front connector, the front connector coding engages. Thereafter this front
connector can only be attached to an FM 450-1 module.
Labeling strips
A plate block with four labeling strips is included with the module. These strips can be
labeled individually with the corresponding signal names.
Product Overview
1.5 The FM 450-1 software
Counter module FM 450-1
16 Manual, 02/2014, A5E03648739-02
1.5
The FM 450-1 software
Software packages of the FM 450-1
You will require the software package on the supplied CD to integrate the FM 450-1 into the
S7-400. It includes:
Parameterization software with parameterization interfaces
Software for the CPU (blocks)
Documentation
parameter assignment screen forms
The FM 450-1 is adapted to the respective task via parameters. These parameters are
stored in an SDB and transferred to the module by the CPU.
The parameters can be determined via the parameter assignment screen forms. These
parameter assignment screen forms are installed on your programming device and opened
in STEP 7.
Product Overview
1.5 The FM 450-1 software
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 17
Software for the S7-400-CPU
The software for the CPU consists of the FC CNT_CTRL function, which is invoked in the
CPU user program. This FC enables communication between the CPU and the FM 450-1. In
addition, there is also the FC DIAG_INF for the FM 450-1 with which you can transmit
diagnostic data into the DB of FC CNT_CTRL.
This figure shows an S7-400 layout with an FM 450-1 and several signal modules.
Figure 1-3 Layout of a SIMATIC S7-400 with an FM 450-1
Product Overview
1.5 The FM 450-1 software
Counter module FM 450-1
18 Manual, 02/2014, A5E03648739-02
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 19
This is how the FM 450-1 counts
2
2.1
Basics
What is counting?
Counting refers to the recording and totaling of events. In the case of the FM 450-1 function
module encoder signals are captured and evaluated accordingly.
Count range, count limits
The FM 450-1 can count both forwards and backwards. When you select the count range,
you determine the limits between which the FM 450-1 can count.
Count range
Low count limit
High count limit
Count range 1:
0 to +32 bit
0 +4 294 967 295
Count range 2:
-31 to +31 bit
-2 147 483 648 +2 147 483 647
Load value
You can lay down an initial value for each of the two FM 450-1 counters from which the
counting is to begin. This initial value is the load value. You can specify any value within the
count limits for the load value.
Comparison values
You can use two digital outputs on the module for each counter in order to trigger reactions
in a process at a certain counter reading, independently of the CPU. You store two
comparison values for each counter on the FM 450-1. If the counter reading reaches one of
the two comparison values, the digital output assigned belonging to the comparison value is
set and/or a Hardware interrupt is generated.
Operating modes
You can count rectangular pulses in three different ways with the FM 450-1:
Continuous counting, with or without gate function
Single counting with hardware or software gate
Periodic counting with hardware or software gate
The differences manifest themselves in the way the FM 450-1 behaves when a counter
reaches a count limit.
This is how the FM 450-1 counts
2.2 Gate functions
Counter module FM 450-1
20 Manual, 02/2014, A5E03648739-02
Continuous counting
If when counting in the up direction a counter has reached the high count limit and a further
count pulse comes, then the counter jumps to the low count limit and begins to total the
count pulses; thus, it counts continuously.
Figure 2-1 Continuous counting in the up direction
If when counting in the down direction a counter has reached the low count limit and a
further count pulse comes, then it jumps to the high count limit and then goes on counting
down from there.
Single counting
For single counting the counter starts from the load value. If when counting up a counter has
reached the high count limit and a further count pulse comes, then the counter jumps to the
low count limit and comes to a halt even if further count pulses come.
Figure 2-2 Single counting in the up direction
If when counting down a counter has reached the low count limit and a further count pulse
comes, then the counter jumps to the high count limit and comes to a halt even if further
count pulses come.
This is how the FM 450-1 counts
2.1 Basics
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 21
Periodic counting
For periodic counting the respective counter starts from the load value. If when counting up
the counter reaches the high count limit and further count pulses come, then the counter
jumps to the load value and starts totalizing the count pulses.
Figure 2-3 Periodic counting in the up direction
If when counting down a counter has reached the low count limit and a further count pulse
comes, then the counter jumps to the load value and then continues counting down from
there.
This is how the FM 450-1 counts
2.2 Gate functions
Counter module FM 450-1
22 Manual, 02/2014, A5E03648739-02
2.2
Gate functions
Counting with gate functions
Many applications require that the counting process should be started or stopped at a
specifically defined point in time, depending on other events. In the case of the FM 450-1
starting and stopping the counting process like this take place via a gate function. If the gate
is opened, count pulses can reach a counter and the counting process is started. If the gate
is closed, count pulses can no longer reach the counter and the counting process is stopped.
Software gate and hardware gate
The module possesses two gate functions for each counter:
A software gate (SW gate) which is controlled via the user program in the CPU.
A hardware gate (HW gate) that is controlled via the 1I0 and 1I1 (counter 1) and/or 2I0
and 2I1 (counter 2) digital inputs on the module. When assigning parameters for the FM
450-1 you determine if the operation of the hardware gate is to be level controlled or edge
controlled.
Example
When the gate signal is set, the gate is opened and the count pulses are counted. If the gate
signal is taken away, the gate is closed and the count pulses are no longer picked up by the
counter. The counter status remains constant.
The figure shows a gate opening and closing and the pulses being counted:
Figure 2-4 Opening and closing a gate
Ending counting process with the gate stop function
You can end the counting process when counting with the SW gate and when counting with
the HW gate with the respective gate stop function. For this purpose you set the GATE_STP
input parameter of the FC CNT_CTRL.
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 23
Installation and Removal
3
3.1
Chapter overview
Overview
In this chapter you will find information on the installation and removal of the FM 450-1
You will find out what you have to pay attention to during installation. You will obtain
information on project planning and on the design of an FM 450-1
Step by step you will be shown how to install and remove the FM 450-1.
Installation and Removal
3.4 Removal of the FM 450-1
Counter module FM 450-1
24 Manual, 02/2014, A5E03648739-02
3.2
Preparing for Mounting
Important safety rules
There are important rules to be observed when integrating an S7-400 with an FM 450-1 into
a plant or a system.
These rules and regulations are explained in manual /1/.
Defining the slots
The FM 450-1 function module can be installed like a signal module in any central device or
extension device.
Designing the mechanical structure
Manual /1/ provides you with information on how the mechanical structure can be designed
and how to proceed.
Define start address
The start address of the FM 450-1 is required for the purpose of communication between the
CPU and the FM 450-1. The start address is entered into the DB of the FC CNT_CTRL (refer
to chapter "Program (Page 45)" and chapter "Assignment of the DB (Page 103)"). The entry
is either made with the program editor or out of the user program.
You specify the start address for the module under STEP 7.
Installation and Removal
3.3 Installing the FM 450-1
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 25
3.3
Installing the FM 450-1
Rules
No special protective measures (EGB guidelines) are required for installing the FM 450-1.
Tools required
You require a 4.5 mm screwdriver to install the FM 450-1.
Installation procedure
Proceed as follows to install an FM 450-1
1. Hook the FM 450-1 in at the top and rotate it down.
2. Screw the FM 450-1 tight (torque approx. 0.8 to 1.1 Nm).
3. Label the FM 450-1 with its slot number. For this purpose use the number wheel enclosed
with the rack.
The system according to which you must perform then numbering and the procedure for
defining the slot number are described in manual /1/.
Further information
Further information on the installation and removal of modules is to be found in manual /1/.
Installation and Removal
3.4 Removal of the FM 450-1
Counter module FM 450-1
26 Manual, 02/2014, A5E03648739-02
3.4
Removal of the FM 450-1
Rules
No special protective measures (EGB guidelines) are required for removing the FM 450-1.
Tools required
You require a 4.5 mm screwdriver to remove the FM 450-1.
Procedure for removal
Proceed as follows to remove an FM 450-1
1. Release the front connector and pull it out.
2. Undo the module fixing screw.
3. Rotate the module out of the rack and unhook it.
4. If necessary, install a new module.
Further information
Further information on the installation and removal of modules is to be found in manual /1/.
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 27
Wiring
4
4.1
Chapter overview
Chapter overview
In this chapter you will find information on wiring the FM 450-1
Terminal assignment of the front connector.
Terminal functions.
Notes on the selection of cables.
Procedure when wiring the front connector.
State of module after it has been wired and the power supply is switched on.
Wiring
4.4 Module status after power is switched on
Counter module FM 450-1
28 Manual, 02/2014, A5E03648739-02
4.2
Terminal assignment of the front connector
Front connectors
You connect the following to the 48-pin front connector:
count signals,
digital inputs
digital outputs
encoder power supply
auxiliary voltage and load voltage.
The following illustration shows the front side of the front connector, the strip with the
terminal assignment printed on and the labeling strips.
Wiring
4.4 Module status after power is switched on
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 29
Figure 4-1 Front connector of the FM 450-1
Wiring
4.4 Module status after power is switched on
Counter module FM 450-1
30 Manual, 02/2014, A5E03648739-02
Assignment of front connector
Table 4- 1 Assignment of front connector
Terminal
Name
Inputs/
outputs
Function
5 V encoder RS
422, symmetrical
24 V encoder,
asymmetric
24-V pulse
encoder with
direction level
24 V initiator
1
-
2
-
3
1L+
ON
24 V auxiliary voltage supply for encoders
4
1M
ON
Auxiliary voltage ground to supply encoders
Counter 1
5
1 A
ON
Encoder signal A
-
6
1 /A
ON
Encoder signal /A
-
7
1 B
ON
Encoder signal B
-
8
1 /B
ON
Encoder signal /B
-
9
1 N
ON
Encoder signal N
-
10
1 /N
ON
Encoder signal /N
-
11
1 A*
ON
-
Encoder signal A*
12
1 B*
ON
-
Encoder signal B*
Directional signal
-
13
1 N*
ON
-
Encoder signal N*
-
14
1M
OFF
Ground for encoder power supply
15 5.2 VDC OFF 5.2 V encoder
power supply
-
16
24 VDC
OFF
-
24 V encoder power supply
Counter 2
17
2 A
ON
Encoder signal A
-
18
2 /A
ON
Encoder signal /A
-
19
2 B
ON
Encoder signal B
-
20
2 /B
ON
Encoder signal /B
-
21
2 N
ON
Encoder signal N
-
22
2 /N
ON
Encoder signal /N
-
23
2 A*
ON
-
Encoder signal A*
24
2 B*
ON
-
Encoder signal B*, directional signal
25
2 N*
ON
-
Encoder signal N*
26
1M
OFF
Ground for encoder power supply
27 5,2 VDC OFF 5,2 V encoder
power supply
-
28
24 VDC
OFF
-
24 V encoder power supply
Wiring
4.4 Module status after power is switched on
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 31
Terminal
Name
Inputs/
outputs
Function
5 V encoder RS
422, symmetrical
24 V encoder,
asymmetric
24-V pulse
encoder with
direction level
24 V initiator
Counter 1
29
1I0
ON
Digital input 1I0
30
1I1
ON
Digital input 1I1
31
1I2
ON
Digital input 1I2 (set counter)
32
-
33
1Q0
OFF
Digital output 1Q0
34
1Q1
OFF
Digital output 1Q1
35
-
36
-
37
-
38
-
39
-
40
-
Counter 2
41
2I0
ON
Digital input 2I0
42
2I1
ON
Digital input 2I1
43
2I2
ON
Digital input 2I2 (set counter)
44 -
45
2Q0
OFF
Digital output 2Q0
46
2Q1
OFF
Digital output 2Q1
47
2L+
ON
24 V load voltage for the digital inputs and outputs
48
2M
ON
Load voltage ground for digital inputs and outputs
Note
The circuits for the counter inputs (encoder power supply,
encoder signals) are isolated
electrically toward the ground of the CPU. Hence you must connect terminal 4 (1M) to the
ground of the CPU with a low impedance!
If you supply the encoders with external voltage, you must also connect the mass of this
externa
l voltage supply to the ground of the CPU.
Auxiliary voltage 1L+, 1M
To supply the 5 V and 24 V encoders with voltage, connect a 24 DC V to the 1L + and 1M
terminals.
An integrated diode protects the module from reversing the polarity of the auxiliary voltage.
The module monitors whether the auxiliary voltage is connected.
Wiring
4.4 Module status after power is switched on
Counter module FM 450-1
32 Manual, 02/2014, A5E03648739-02
5.2 VDC encoder power supply
The module generates a 5.2 VDC voltage from the 1L+/1M auxiliary voltage at a maximum
current of 300mA per count channel; this voltage is available on the respective "DC5.2V"
terminal to supply a 5 V encoder with short circuit-proof voltage.
24 VDC encoder power supply
1l+/1M voltage is provided on output "24 VDC" to supply an encoder with short circuit-proof
24-V voltage. The encoder power supply is short-circuit checked.
5 V encoder signals A and /A, B and /B, N and /N
You can connect incremental encoders with 5 V differential signals in compliance with
RS422, i.e. incremental encoders with the differential signals A and /A, B and /B, N and /N.
The A and /A, B and /B, N and /N signals are connected via the correspondingly labeled
terminals
The signals N and /N are only to be connected if you wish to set the counter to the zero mark
of the encoder.
The inputs are not electrically isolated from the S7-400 bus.
24-V encoder signals A*, B* and N*
24 V signals are identified with the letters A*, B* and N*.
You can connect three different types of encoders to each counter:
Incremental encoders with 24- V signals:
The signals A*, B* and N* are connected via the correspondingly labeled pins.
Pulse encoders without directional level:
The signal is connected to terminal A*
Pulse encoders with directional level:
The count signal is connected to the terminal A*. The directional level is connected to
terminal B*.
The inputs are not electrically isolated toward the S7-400 bus.
Wiring
4.4 Module status after power is switched on
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 33
Input filter for 24 V encoder signals
To suppress faults you can assign parameters to the input filters (RC elements) with a
uniform filtering time for the 24 V inputs A*, B* and N*. The following two input filters are
available for each counter:
Table 4- 2 Input filter for 24 V encoder signals
Features
Input filter 1
(default setting)
Input filter 2
Typical input delay
1 μs
15 μs
Maximum count frequency
200 kHz
20 kHz
Minimum pulse width of the count signals
2.5 μs
25 μs
Digital inputs
You can use the digital inputs 1I0 and 1I1 for the gate control of counter°1.
You can use the digital inputs 2I0 and 2I1 for the gate control of counter°2.
The gates can be operated both in the level-controlled and edge-controlled modes (see
chapter "Modes, settings, parameters and commands (Page 65)").
The 1I2 digital input is for setting counter 1 to the load value.
The 2I2 digital input is for setting counter 2 to the load value.
The digital inputs are operated with a 24 V nominal voltage.
The digital inputs are electrically isolated from bus and count inputs.
Input filters for digital inputs
To suppress faults you can assign parameters to the input filters (RC elements) with a
uniform filtering time for the digital inputs 1I0, 1I1 and 1I2 or 2I0, 2I1 and 2I2. The following
two input filters are available:
Table 4- 3 Input filters for digital inputs
Characteristics
Input filter 1
(default setting)
Input filter 2
Typical input delay
1 μs
15 μs
Maximum frequency of the input signals
200 kHz
20 kHz
Minimum pulse width of input signals
2.5 μs
25 μs
Wiring
4.4 Module status after power is switched on
Counter module FM 450-1
34 Manual, 02/2014, A5E03648739-02
Digital outputs
For the purpose of directly initiating control processes, the FM 450-1 has the digital outputs
1Q0 and 1Q1 (for counter 1) or 2Q0 and 2Q1 (for counter 2) that are supplied via the load
voltage 2L+.
The digital inputs are potentially isolated from the S7-400 bus and count inputs.
The digital outputs are P switches and can carry a load current of 0.5 A. They are protected
against overload and short circuit.
Note
The direct connection of relays and cutouts can be executed without external wiring
The time-related behavior of the digital outputs depends on the parameter assignment and is
described in greater detail in the chapter "Setting: Behavior of the digital outputs (Page 76)".
2L+ /2M load voltage
To ensure the power supply of the digital outputs 1Q0 and 1Q1 or 2Q1 and 2Q2 you have to
connect a load voltage of 24 V to the module terminals 2L+ and 2M.
An integrated diode protects the module from reversing the polarity of the load voltage.
The 2L+ / 2M load voltage is not monitored by the FM 450-1.
Wiring
4.4 Module status after power is switched on
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 35
4.3
Wiring Front Connectors
Cables
There are a few rules you must observe when selecting the cables:
The cables for the digital inputs must be shielded.
The cables for the count signals must be shielded.
You must apply the shields to the count signal cables both on the pulse encoder and in
close proximity to the module, e.g. via the shield application element.
Cables A and /A, B and /B, N and /N of the incremental 5-V encoder must be twisted in
pairs.
The following figure shows details relating to the connection of incremental 5-V encoders.
Wiring
4.4 Module status after power is switched on
Counter module FM 450-1
36 Manual, 02/2014, A5E03648739-02
Figure 4-2 Connecting incremental 5 V encoders
Terminal 4 (1M) of the front connector must be connected with the ground of the CPU with a
low impedance. If you supply the encoder with external voltage, you must also connect the
ground of this external voltage supply to the ground of the CPU.
The following figure shows details relating to the connection of incremental 24 V encoders.
Wiring
4.4 Module status after power is switched on
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 37
Figure 4-3 Incremental 24 V encoder connection
Use flexible cables with cross sections of 0.25 to 1.5 mm 2.
Note
If the
encoder is supplied via the module, the cable cross section must be selected large
enough for sufficient voltage to be applied to the encoder via the cable in spite of a drop
in voltage. This applies in particular in the case of incremental 5 V encoders.
A wire end ferrule is not required. If you use wire end ferrules, they must be of the type
without insulating collars in compliance with DIN 46228 Form A, short type!
Wiring
4.4 Module status after power is switched on
Counter module FM 450-1
38 Manual, 02/2014, A5E03648739-02
Wiring steps
Proceed as follows when wiring the front connector:
WARNING
Injury to persons can occur.
If you wire the FM 450-1 front connector when the power is switched on, you may injure
yourself owing to an electric shock.
Always switch off power before you wire the FM 450-1!
1. Pull the cover off the front connector.
2. Insulate the cables (length 6 mm).
3. Do you use wire end ferrules?
If so: Press-fit the wire end ferrules with the the conductors.
4. Load the enclosed strain relief clamp into the front connector
5. Start wiring from the bottom. If you have a front connector with screw-type contacts also
screw unassigned terminals (torque 0.6 to 0.8 Nm).
6. Tighten the strain relief for the cable chain.
7. Close the front connector.
8. Label the terminals on the enclosed labeling strip.
A detailed description of the wiring of a front connector is to be found in manual /1/.
Wiring
4.4 Module status after power is switched on
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 39
4.4
Module status after power is switched on
Characteristics
After the power supply has been switched on and before any data have been transmitted,
the module status is as follows:
Counter inputs with default setting for 5 V differential signals, track B not inverted; single
evaluation (refer to the section "Signal evaluation (Page 100)")
0 to +32 bit counting range
Counter status zero
Counter setting with digital input 1I2 or 2I2 (and zero mark) disabled
Input delay for the digital inputs: typically 1 μs
(max. frequency: 200 kHz, minimum pulse width: 2.5 μs)
Input delay for 24-V count inputs: typically 1 μs
(max. frequency: 200 kHz, minimum pulse width: 2.5 μs)
Outputs 1Q0 and 1Q1 or 2Q0 and 2Q1 switched off
Pulse duration = 0
No Hardware interrupts set
"Continuous counting" mode set
Gate function switched off (i.e. gate open)
Status messages are updated
This setting corresponds to the default setting of the module.
RESET status
This module status (default setting) is also called RESET status.
Wiring
4.4 Module status after power is switched on
Counter module FM 450-1
40 Manual, 02/2014, A5E03648739-02
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 41
Parameter assignment
5
5.1
Chapter overview
Chapter overview
In this chapter you will learn how to install and start parameter assignment screen forms.
The parameter assignment screen forms have an integrated help function to support you
with parameter assignment and commissioning of the FM 450-1.
Parameter assignment
5.2 Installing and calling parameter assignment screen forms
Counter module FM 450-1
42 Manual, 02/2014, A5E03648739-02
5.2
Installing and calling parameter assignment screen forms
Marginal conditions
The following conditions apply to the transfer of parameter assignment data to the CPU:
STEP 7 must be correctly installed on your programming device.
The programming device must be correctly connected to the CPU.
The CPU must be in STOP
Note
During data communication via the MPI you must not pull out or plug in any S7
-400
modules!
Installing the Parameterization Interfaces
To install the configuration package:
1. Place the supplied CD in the CD drive of your programming device or PC.
2. Start the program "Setup.exe".
3. Follow the operating instructions provided by the installation program.
Important information can be found in the readme file.
Result
The components of the configuration package are installed in the following directories:
SIEMENS\STEP7\S7LIBS\FMx501LIB:
FCs, UDTs
SIEMENS\STEP7\S7FCOUNT:
Configuration software, Readme, Online Help
SIEMENS\STEP7\EXAMPLES:
Examples
SIEMENS\STEP7\S7MANUAL\S7FCOUNT:
Getting Started, Manuals
Installing parameter assignment screen forms
Call the SETUP.EXE program on the backup copy of your installation diskette. This installs
both the parameter assignment screen forms and the FC CNT_CTRL and the FC DIAG_INF
on your programming device. The FCs are added to the standard library in the "FM_CNT_L"
catalog. Follow the instructions displayed in the SETUP menu on the display.
Example Program
A comprehensive example program is inserted into the "Examples" sub catalog in the STEP
7 catalog in the FM_ZAEHL project during installation.
Parameter assignment
5.2 Installing and calling parameter assignment screen forms
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 43
Reading the readme file
Important up-to-date information about the provided software can be found in a readme file.
You can read this file with the WORDPAD editor in Windows.
Calling parameter assignment screen forms
The parameter assignment screen forms are displayed automatically after successful
installation, if you assign the FM 450-1 parameters within the hardware configuration
Calling the integrated help
There is an integrated online help for the parameter assignment screen forms that you can
call in any phase of parameter assignment either with the F1 key or with the Help button.
Parameter assignment
5.2 Installing and calling parameter assignment screen forms
Counter module FM 450-1
44 Manual, 02/2014, A5E03648739-02
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 45
Program
6
6.1
Chapter overview
Chapter overview
In this chapter you can find all the information you require to program the FM 450-1 in the
S7-400. Two STEP 7 blocks are provided for integrating the FM 450-1 into a user program
and make handling the desired functions as easy as possible for you.
This chapter describes these blocks.
Block number
Block name
Meaning
FC 0
CNT_CTRL
Controlling the FM 450-1 counters
FC 1
DIAG_INF
Read diagnostic data set of the FM 450-1
In addition, an example program demonstrates how to use the blocks. The example program
shows how to call the blocks and contains the necessary data block.
Program
6.5 Technical specifications of the blocks
Counter module FM 450-1
46 Manual, 02/2014, A5E03648739-02
6.2
The FC CNT_CTRL function
Functionality
The data required for the FC CNT_CTRL are stored in a DB on the CPU. The
FC CNT_CTRL transfers data cyclically from this DB to the FM and fetches data from the
FM.
Requirement
You have created a DB under STEP 7 as a data block with assigned user-specific data
type.
For this purpose select the UDT 1 as the source. The UDT 1 was copied into the block
library for the counter (FM_CNT) when the FCs were installed. You must not modify the
UDT 1. Copy the UDT 1 into your project together with the FCs.
The following valid data must be assigned to the DB required for the FC CNT_CTRL:
Module address
Set the module address (basic address of the FM 450-1) when you configure your
hardware.
The module address must be entered in the MOD_ADR parameter in the DB.
To enter the module address, the following methods can be used:
Recommended procedure
Make the assignment of the module address to the DB in the user program so that the
assignment of the module address occurs when user program is called in OB 100 (see
example below).
Alternative procedure
You can have the module address entered automatically when you select the module
in HW Config, open the "Properties" dialog box with the menu command
Edit > Object
Properties
, and select the DB using the "Mod Addr" button there. However, in this
case, the values entered in the DB (including the module addresses) will be reset to
their initial values when a consistency check (menu command
Edit > Check Block
Consistency
opens the "Check Block Consistency" dialog box) is performed followed
by compilation (menu command
Program > Compile All
in the "Check Block
Consistency" dialog box).
If a consistency check is performed without compilation, the values are not changed.
The menu command
Edit > Compile All
is only required within a consistency check
when the project has been edited with STEP 7 V5.0 Service Pack 2 or earlier.
Channel address
The channel address of count channel 1 is the same as the module address in pointer
format. The channel address of count channel 2 is the same as the module address +
32 in pointer format.
User data length
The user data length is 32.
Program
6.5 Technical specifications of the blocks
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 47
Example
The following contains an example of how you can implement the transfer of the module
address, the channel address, and the length of the user data to the DB in OB 100. The
symbol table contains the following assignments for this example:
FM450_DB_K1
DB 10
DB with the counter data for channel 1
FM450_DB_K2
DB 11
DB with the counter data for channel 2
You program the transfer in STL as follows:
STL
Channel 1
L 512
// Module address = 512
T FM450_DB_K1.MOD_ADR
// Transfer of module address
L P# 512.0
// Module address in pointer format
T FM450_DB_K1.CH_ADR
// Transfer of the channel address for channel 1
L 32
// User data interface length = 32
T FM450_DB_K1.U_D_LGTH
// Transfer of the user data interface length
Channel 2
L 512
// Module address = 512
T FM450_DB_K2.MOD_ADR
// Transfer of module address
L P# 544.0
// Module address + 32 in pointer format
T FM450_DB_K2.CH_ADR
// Transfer of the channel address for channel 2
L 32
// User data interface length = 32
T FM450_DB_K2.U_D_LGTH
// Transfer of the user data interface length
Program
6.5 Technical specifications of the blocks
Counter module FM 450-1
48 Manual, 02/2014, A5E03648739-02
Call
The FC CNT_CTRL can be called once per counter either cyclically or in a time-controlled
program. Calling in the interrupt program is not permissible.
Calling the FC CNT_CTRL in the STL and LAD representations is rendered below.
Figure 6-1 Calling the FC CNt_CTRL
Parameters of the FC CNT_CTRL
Name
Declaration type
Data type
Meaning
The user...
The block...
DB_NO INPUT BLOCK_DB Number of the data block
with the counter data
enters this queries this
SW_GATE INPUT BOOL "SW gate (start/stop)"
counter control bit
sets and resets
this
queries this
GATE_STP INPUT BOOL "Stop gate" counter control
bit
sets and resets
this
queries this
OT_ERR_A INPUT BOOL Acknowledge operator error sets and resets
this
queries this
OT_ERR OUTPUT BOOL Operator error occurred queries this sets and resets
this
L_DIRECT IN-OUT BOOL Trigger bit for "direct
loading" of a counter
sets queries and
resets this
L_PREPAR IN-OUT BOOL Trigger bit for "preparatory
loading" of a counter
sets queries and
resets this
T_CMP_V1 IN-OUT BOOL Transfer trigger bit for
"comparison value 1"
sets queries and
resets this
T_CMP_V2 IN-OUT BOOL Transfer trigger bit for
"comparison value 2"
sets queries and
resets this
Program
6.5 Technical specifications of the blocks
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 49
Name
Declaration type
Data type
Meaning
The user...
The block...
RES_SYNC IN-OUT BOOL Delete "synchronization"
status bit
sets queries and
resets this
RES_ZERO IN-OUT BOOL Reset status bits for zero
crossing, overflow,
underflow and comparator or
measurement end
sets queries and
resets this
Processing jobs
You initiate a job for the FM 450-1 by means of the L_DIRECT, L_PREPAR, T_CMP_V1,
T_CMP_V2, RES_SYNC, RES_ZERO, OT_ERR_A and GATE_STP FC parameters.
Depending on the job you must enter the load value or a comparison value into the instance
DB prior to the calling the FC.
A set in/out parameter (L_DIRECT, L_PREPAR, T_CMP_V1, T_CMP_V2, RES_SYNC and
RES_ZERO) is deleted again by the FC CNT_CTRL after the job has been completed. This
enables you to recognize that the job has been completely executed by the FM 450-1 and, if
necessary, to evaluate this information in the user program.
Startup characteristics
As soon as the FC CNT_CTRL identifies a startup (CPU or FM startup), a pending job is
deferred and the startup is acknowledged. Any job you have already initiated is carried out
once the startup is finished and is therefore not lost.
Error Messages
If an operator error occurred when the FC is called, it is reported in the OT_ERR parameter.
You can read the error information in the DB 1 (variable OT_ERR_B). Thereafter you can
acknowledge the operator error with the OT_ERR_A parameter. No new operator error will
be reported until you have acknowledged the previous one.
Program
6.5 Technical specifications of the blocks
Counter module FM 450-1
50 Manual, 02/2014, A5E03648739-02
6.3
The FC DIAG_INF function
Functionality
The FC DIAG_INF reads data record DS1 from the FM 450-1 and makes it available to you
in the DB of the FC CNT_CTRL. Transfer proceeds as follows:
If initiation parameter (IN_DIAG=TRUE) the DS1 is read out from the FM°450-1.
The DS1 is entered into the DB of the FB CNT_CTRL from DW 54 with the aid of the
SFC RD_REC.
The return code of the SFC (RET_VAL) is copied onto the RET_VAL parameter of the
FC DIAG_INF.
As soon as the function has been performed, the initiation parameter IN_DIAG is reset
and hence the transfer is reported as completed.
A full description of the SFC RD_REC is to be found in manual°/2/.
Call
The FC DIAG_INF can be called in the cycle and in the interrupt program. However, it is not
expedient to call it in the time-controlled program.
Calling the FC DIAG_INF in the STL and LAD representations is rendered below.
Figure 6-2 Calling the FC DIAG_INF
Parameters of the FC°DIAG_INF
Name
Declaration type
Data type
Meaning
The user...
The block...
DB_NO INPUT INT Number of the data block of
the FC CNT_CTRL
enters this queries this
RET_VAL
OUTPUT
INT
Return code of the SFC 59
queries this
enters this
IN_DIAG IN-OUT BOOL Initiation bit reads
diagnostics record DS 1
sets and scans
this
resets this
Program
6.5 Technical specifications of the blocks
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 51
6.4
Example application
Example for the use of the FC CNT_CTRL
The following example is representative for all functions and demonstrates the "Transfer load
value to FM 450-1" and "Start counter" functions to show how the FC°CNT_CTRL can be
applied.
STL
L
+1000;
// Enter load value into
T
KANAL1.LOAD_VAL;
// the DB.
U
INITIATION;
S
LOAD_DIRECT;
// DIRECT input parameters
R
TRIGGER;
CALL
CNT_CTRL, (
// Call the FC with the DB
// Channel 1.
SW_GATE
:=START,
// Control software gate
GATE_STP
:=GATE_STOP,
// Stop GATE
OT_ERR_A
:=ERROR_ACKN,
// Acknowledge operator error
OT_ERR
:=OPERATOR_ERR,
// Operator error occurred
L_DIRECT
:=LOAD_DIRECT,
// Load new counter value
L_PREPAR
:=LOAD_INDIRECT,
// Prepare new counter value
T_CMP_V1
:= COMP1_LOAD
// Load new comparison value 1
T_CMP_V2
:=COMP2_LOAD,
// Load new comparison value 2
RES_SYNC
:=RES_SYNCHRO,
// Delete synchronization status bit
RES_ZERO
:= RES_ZERO);
// Delete "zero crossing" status bit
AN
OPERATOR_ERROR;
// If no error has occurred,
JC
CONT;
// CONTinue
// *** Error evaluation START ***
L
CHANNEL1.OT_ERR_B;
// Read additional information
T
OUTPUT;
// and output.
SET
// Generate RLO 1
S
ERR_ACKN
// Acknowledge error
...
// Further error responses
SPA
END;
// *** Error evaluation END ***
CONT:
...
// Continue with normal processing
AN
LOAD_DIRECT;
// Load direct function is ready
S
START;
// Open software gate
END:
Program
6.5 Technical specifications of the blocks
Counter module FM 450-1
52 Manual, 02/2014, A5E03648739-02
Description of the symbols
The tables lists the symbols used in the example. You specify your own symbol assignments
in the S7 symbol table.
Table 6- 1 Symbols in the user program
Symbols used
Absolute (example)
Comment
CHANNEL1
DB 1
Data block for FC°CNT_CTRL
CHANNEL1.LOAD_VAL
DB1.DBB14
Counter value specified in DB 1
INITIATE
M 10.0
Initiation bit generated to meet technological requirements
LOAD_DIRECT
M 20.0
Accept counter value directly
START
M 20.1
Start counter
GATE_STOP
M 20.2
Close counter gate
ERR_ACKN
M 20.3
Acknowledge operator error
LOAD_INDIRECT
M 20.4
Load counter value in preparation
COMP1_LOAD
M 20.5
Load comparison value 1
COMP2_LOAD
M 20.6
Load comparison value 2
RES_SYNCHRON
M 20.7
Reset synchronization status bit
RES_ZERO
M 21.0
Reset zero crossing, overflow and underflow status bit
OPERATOR_ERROR
M 21.1
Operator error occurred
CHANNEL 1.OT_ERR_B
DB1.DBX40.0
Operator error information in DB 1
Description of the sequence
Prerequisite:
The value to be transferred must have been entered in the DB°1.
The load value is transferred and started:
When the FC is called, the load value of a channel is transferred to the FM 450-1. Calling the
FC°CNT_CTRL selects either the L_DIRECT parameter or the L_PREPAR parameter. The
L_DIRECT selection bit specifies that the load value will be loaded directly onto the counter
(L_DIRECT=1). The L_PREPAR selection bit specifies that the load value is to be stored in
the load register (L_PREPAR=1). The load value in the load register is then loaded onto the
counter when the counter is next set. L_PREPAR=1 prepares a new counter value. Load
value transfer lasts a minimum of 3 FC calls.
The FC must be called until it has reset the selected initiation bit (L_DIRECT or L_PREPAR).
While the job is in progress the I/O parameter remains set. The FC°CNT_CTRL does not
output an error message regarding data exchange with the FM.
If the FC CNT_CTRL resets the parameter you had set, the FM 450-1 has accepted the load
value. The read-back load value stored in the DB°1 is updated by the FC°CNT_CTRL.
You must generate the "initiation" bit to comply with your technological requirement. This bit
may be set at "1" for one cycle only. Please note, that the FC must be called until the I/O
parameter of the FC CNT_CTRL is reset.
Program
6.5 Technical specifications of the blocks
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 53
6.5
Technical specifications of the blocks
Table 6- 2
Technical Specifications
FC CNT_CTRL
FC DIAG_INF
Block number
FC 0
FC 1
Version
3.0
3.0
Assignment in work memory
540 bytes
246 bytes
Assignment in load memory
634 bytes
326 bytes
Assignment in local data area
4 bytes
38 bytes
System function called
-
SFC 51 RDSYSST
Internal update time of the FM°450-1: 0.5°ms.
SDB 100: approx. 240°bytes
Program
6.5 Technical specifications of the blocks
Counter module FM 450-1
54 Manual, 02/2014, A5E03648739-02
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 55
Commissioning
7
7.1
Chapter overview
Chapter overview
In this chapter you will find checklists for commissioning the FM 450-1. These checklists
enable you to
check all working steps up to full operation of the module,
avoid operating faults by the module.
Commissioning
7.3 Working steps for parameter assignment
Counter module FM 450-1
56 Manual, 02/2014, A5E03648739-02
7.2
Working steps during mechanical installation
Check list
Use the following checklist to check and document the working steps during mechanical
installation of the FM 450-1.
Working step
Options/procedure
(X)
Define the slot All slots that are not already occupied or due to be occupied by a power supply
module, a CPU or an IM.
Install the FM 450-1 1. Hook FM into position and screw tight
2. Attach slot number
Select cables
Observe rules and specifications in chapter "Wiring (Page 27)".
Connect 5 V encoders
Counter 1:
Terminal
Name
Function
5 V incremental encoders
with differential signals A
and /A, B and /B, N and /N
14
15
5
6
7
8
9
10
1M
5.2 VDC
A
/A
B
/B
N
/N
Ground for encoder power
supply
5.2 V encoder power supply
Encoder signal A
Encoder signal /A
Encoder signal B
Encoder signal /B
Encoder signal N
Encoder signal /N
Counter 2:
Terminal
Name
Function
5 V incremental encoders
with differential signals A
and /A, B and /B, N and /N
26
27
17
18
19
20
21
22
1M
5.2 VDC
A
/A
B
/B
N
/N
Ground for encoder power
supply
5.2 V encoder power supply
Encoder signal A
Encoder signal /A
Encoder signal B
Encoder signal /B
Encoder signal N
Encoder signal /N
Commissioning
7.3 Working steps for parameter assignment
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 57
Working step
Options/procedure
(X)
Connect 24 V encoders
Counter 1:
Terminal
Name
Function
24V incremental encoders 14
16
11
12
13
1M
24 VDC
A*
B*
N*
Ground for encoder power
supply
24 V encoder power supply
Encoder signal A*
Encoder signal B*
Encoder signal N*
Counter 2:
Terminal
Name
Function
24V incremental encoders 26
28
23
24
25
1M
24 VDC
A*
B*
N*
Ground for encoder power
supply
24 V encoder power supply
Encoder signal A*
Encoder signal B*
Encoder signal N*
Counter 1:
Terminal
Name
Function
24V pulse encoder without
direction level
initiator/BERO)
14
16
11
1M
24 VDC
A*
Ground for encoder power
supply
24 V encoder power supply
Encoder signal A*
Counter 2:
Terminal
Name
Function
24V pulse encoder without
direction level
initiator/BERO)
26
28
23
1M
24 VDC
A*
Ground for encoder power
supply
24 V encoder power supply
Encoder signal A*
Counter 1:
Terminal
Name
Function
24-V pulse encoder with
direction level
14
16
11
12
1M
24 VDC
A*
B*
Ground for encoder power
supply
24 V encoder power supply
Encoder signal A*
Direction level B*
Counter 2:
Terminal
Name
Function
24-V pulse encoder with
direction level
26
28
23
24
1M
24 VDC
A*
B*
Ground for encoder power
supply
24 V encoder power supply
Encoder signal A*
Direction level B*
Commissioning
7.3 Working steps for parameter assignment
Counter module FM 450-1
58 Manual, 02/2014, A5E03648739-02
Working step
Options/procedure
(X)
Wiring digital inputs and
outputs
Counter 1:
Terminal
Name
Function
Digital inputs and outputs 29
30
31
33
34
1I0
1I1
1I2
1Q0
1Q1
Digital input START
Digital input STOP
Digital input SET
Digital output Q0
Digital output Q1
Counter 2:
Terminal
Name
Function
Digital inputs and outputs 41
42
43
45
46
2I0
2I1
2I2
2Q0
2Q1
Digital input START
Digital input STOP
Digital input SET
Digital output Q0
Digital output Q1
Connecting auxiliary
voltage and load voltage
Terminal
Name
Function
Encoder supply 3
4
1L+
1M
24V auxiliary voltage
Auxiliary voltage ground
Supply for digital inputs and
outputs
47
48
2L+
2M
24V load voltage
Load voltage ground
Commissioning
7.3 Working steps for parameter assignment
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 59
7.3
Working steps for parameter assignment
Check list
Use the following checklist to check and document the working steps during parameter
assignment of the FM°450-1. Assign the parameters of the FM°450-1 counters in the same
order as the check list.
Working step
Options/procedure
(X)
Assign the FM 450-1
parameters
Select encoders for counter 1
5-V encoder with
symmetrical signals
Monitoring
A + B + N
A + B
A
None
24-V encoder with
asymmetrical signals
Interface
Sinking output
Sourcing output/push-pull
Frequency range/
minimum pulse width
≤200 kHz/≥2.5 μs
≤20 kHz/≥25 μs
24V encoders with a pulse
train and direction signal
Interface
Current-sinking output
Current-sourcing
output/push-pull
Frequency range/
minimum pulse width
≤200 kHz/≥2.5 μs
≤20 kHz/≥25 μs
24-V initiator
Signal evaluation Single
Double
Quadruple
Frequency and direction (with 24V encoders)
Commissioning
7.3 Working steps for parameter assignment
Counter module FM 450-1
60 Manual, 02/2014, A5E03648739-02
Step
Options/procedure
(X)
Assign the FM 450-1
parameters
Select encoders for counter 2
5-V encoder with
symmetrical signals
Monitoring
A + B + N
A + B
A
None
24-V encoder with
asymmetrical signals
Interface
Current-sinking output
Current-sourcing
output/push-pull
Frequency range/
minimum pulse width
≤200 kHz/≥2.5 μs
≤20 kHz/≥25 μs
24-V encoder with a pulse
train and direction signal
Interface
Current-sinking output
Current-sourcing
output/push-pull
Frequency range/
minimum pulse width
≤200 kHz/≥2.5 μs
≤20 kHz/≥25 μs
24-V initiator
Signal evaluation
Single
Double
Quadruple
Frequency and direction (with 24-V encoders)
Step
Options/procedure
(X)
Assign the FM 450-1
parameters
Specify mode for counter 1
Continuous counting
Without gate
With SW gate
With HW gate
Single counting
With SW gate
With HW gate
Periodic counting
With SW gate
With HW gate
Set count range
0 to +32 bit
-31 bit to +31 bit
Commissioning
7.3 Working steps for parameter assignment
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 61
Step
Options/procedure
(X)
Assign the FM 450-1
parameters
Specify mode for counter 2
Continuous counting
Without gate
With SW gate
With HW gate
Single counting
With SW gate
With HW gate
Periodic counting
With SW gate
With HW gate
Set count range
0 to +32 bit
-31 bit to +31 bit
Specify the behavior of the digital inputs for counter 1
HW gate
Level-controlled
Edge-controlled
Minimum pulse width
≥2.5 μs
≥25 μs
Set counter
Single setting
Multiple setting
Evaluate zero mark for setting
Specify the behavior of the digital inputs for counter 2
HW gate
Level-controlled
Edge-controlled
Minimum pulse width
≥2.5 μs
≥25 μs
Set counter
Single setting
Multiple setting
Evaluate zero mark for setting
Commissioning
7.3 Working steps for parameter assignment
Counter module FM 450-1
62 Manual, 02/2014, A5E03648739-02
Step
Options/procedure
(X)
Assign the FM 450-1
parameters
Specify the behavior of the digital outputs for counter 1
Output 1Q0
Disable
Active from comparison value 1 to overflow
Active from comparison value 1 to underflow
Active for "pulse duration" when comparison value 1 is
reached in up direction
Active for "pulse duration" when comparison value 1 is
reached in down direction
Active for "pulse duration" when comparison value 1 is
reached in up or down direction
Output 1Q1
Disable
Active from comparison value 2 to overflow
Active from comparison value 2 to underflow
Active for "pulse duration" when comparison value 2 is
reached in up direction
Active for "pulse duration" when comparison value 2 is
reached in down direction
Active for "pulse duration" when comparison value 2 is
reached in up or down direction
Pulse duration
0 to 500 ms
Specify the behavior of the digital outputs for counter 2
Output 2Q0
Disable
Active from comparison value 1 to overflow
Active from comparison value 1 to underflow
Active for "pulse duration" when comparison value 1 is
reached in up direction
Active for "pulse duration" when comparison value 1 is
reached in down direction
Active for "pulse duration" when comparison value 1 is
reached in up or down direction
Output 2Q1
Disable
Active from comparison value 2 to overflow
Active from comparison value 2 to underflow
Active for "pulse duration" when comparison value 2 is
reached in up direction
Active for "pulse duration" when comparison value 2 is
reached in down direction
Active for "pulse duration" when comparison value 2 is
reached in up or down direction
Pulse duration
0 to 500 ms
Commissioning
7.3 Working steps for parameter assignment
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 63
Step
Options/procedure
(X)
Assign the FM 450-1
parameters
Enable digital outputs
CTRL_DQ0 in DB 1
CTRL_DQ1 in DB 1
Specify load value and comparison values for counter 1 and enter in DB
Load value
Comparison value 1
Comparison value 2
Specify load value and comparison values for counter 2 and enter in DB
Load value
Comparison value 1
Comparison value 2
Enter basic data in DB 1
Module address
Channel address
User data length
32
Select interrupts for counter 1
Interrupt when door is opened
Interrupt when door is closed
Interrupt in case of overflow
Interrupt in case of underflow
Interrupt in case of zero crossing
Interrupt when comparison value 1 is reached in the up direction
Interrupt when comparison value 1 is reached in the down direction
Interrupt when comparison value 2 is reached in the up direction
Interrupt when comparison value 2 is reached in the down direction
Interrupt when setting counter
Select interrupts for counter 2
Interrupt when door is opened
Interrupt when door is closed
Interrupt in case of overflow
Interrupt in case of underflow
Interrupt in case of zero crossing
Interrupt when comparison value 1 is reached in the up direction
Interrupt when comparison value 1 is reached in the down direction
Interrupt when comparison value 2 is reached in the up direction
Interrupt when comparison value 2 is reached in the down direction
Interrupt counter is set
Integrate FCs in user
program
Integrate FC CNT_CTRL
Integrate FC DIAG_INF
Commissioning
7.3 Working steps for parameter assignment
Counter module FM 450-1
64 Manual, 02/2014, A5E03648739-02
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 65
Modes, settings, parameters and commands
8
8.1
Chapter overview
Chapter overview
This chapter gives you
an overview of the three modes, the various settings and the commands available and
how to call them.
A description of the three modes
A description of the settings
A description of the two commands
Marginal conditions and notes which you must heed when using these functions.
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
66 Manual, 02/2014, A5E03648739-02
8.2
Overview of modes, settings and commands
Which modes are available?
For the FM°450-1 there are the three following modes:
Table 8- 1 Operating modes of FM°450-1
Name
Description
Continuous counting
(with or without gate)
Starting from the current counter status the FM°450-1 counts
continuously.
Single counting with SW gate
or with HW gate
When the gate opens, the FM 450-1 counts from the load value to
the count limit.
Periodic counting with SW
gate or with HW gate
When the gate opens, the FM 450-1 counts between the load value
and the count limit.
You can configure the two FM 450-1 counters in different modes.
The default setting is the "Continuous counting" mode.
Choice of count range, behavior of the two digital outputs, pulse duration, evaluation of the
count signals, and the selection of the signal to set the counter all depend on the mode.
Which settings are available?
You can adapt the FM 450-1 to your count job by means of the following five settings:
Table 8- 2 The FM 450-1 settings
Name
Description
Count range
You select the count limit with the count range.
Behavior of digital outputs Q0
and Q1
You can choose between six possibilities for the behavior of the
outputs on reaching the comparison value.
Pulse duration
Pulse duration indicates the time for which the output is to be set.
Triggering hardware
interrupts
When the various selectable events occur, the FM 450-1 can trigger
a hardware interrupt.
Encoders You must specify different settings for the encoder used. These are
described in section "Encoder signals and their evaluation
(Page 93)".
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 67
Which commands are available?
You can influence the counting process of the FM 450-1 by means of the following
commands:
Table 8- 3 The FM 450-1 commands
Name
Description
Open and close gate The counting process starts when a gate opens and ends when it
closes.
Set counter
The counter can be set to the load value using various signals.
Basic parameter assignment
When configuring the hardware you define the basic parameter assignment of each FM 450-
1. The following table shows the significance of the relevant parameters.
Table 8- 4 Parameters for the basic parameter assignments
Name
Option
Description
Interrupt selection
None
You enable the corresponding interrupts via this
selection.
Diagnostics
Process
Process and diagnostics
Reaction to a CPU
STOP
STOP Outputs immediately disabled
counting process aborted
Continue operating
The module continues operating.
Terminate active job The single count process continues until it
terminates itself or, in modes with a HW gate,
until it is terminated by closing the HW gate.
The periodic counting process is reparameterized
into a single counting process and is terminated
as such.
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
68 Manual, 02/2014, A5E03648739-02
8.3
Basics on calling modes, settings and commands
Calling modes, settings and commands
You select modes and settings in the FM°450-1 parameter assignment screen forms.
The parameter assignment data are automatically stored on the programming device and
in the rack SDB.
Notes on installing parameter assignment screen forms and on assigning the FM°450-1
parameters can be found in the chapter "Parameter assignment (Page 41)" and, after the
software has been installed, also in the integrated Help function.
Modes and settings are modified in the parameter assignment screen forms. The new
mode or setting is valid from the next time the FM 450-1 starts.
Commands are either generated via hardware signals, which are connected to the front
connector, or by setting the relevant input parameters of the FC CNT_CTRL in the user
program to influence the count process. The input parameters are stored as control bits in
the DB of the FC CNT_CTRL.
Control and status bits in the DB
In addition to the control bits, there are status bits in the DB which signalize the status of the
count process. The control and status bits are each allocated two bytes in the DB (see the
chapter "Assignment of the DB (Page 103)".)
Transferring control and status bits
You transfer control and status bits between the CPU and module with the FC°CNT_CTRL,
which you must integrate into your user program:
Use symbolic names for the control and status bits in the user program. The symbolic names
are used in this chapter in the description of the FC.
The exact description of the FC CNT_CTRL is to be found in the chapter "Program
(Page 45)"; the DB assignments are to be found in the chapter "Assignment of the DB
(Page 103)".
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 69
8.4
Infinite counting
Overview
In this mode an FM 450-1 counter counts infinitely from the current counter status:
When counting up, if the counter reaches the upper count limit and a further count pulse
comes, it jumps to the lower limit and continues counting from there without any pulse
loss.
When counting down, if the counter reaches the lower count limit and a further count
pulse comes, it jumps to the upper limit and continues counting from there without any
pulse loss.
Select gate function
In this mode you can select the gate function Options:
Without gate (default)
SW gate
HW gate, level-controlled or edge-controlled
Figure 8-1 Infinite counting with load value and gate function
Open and close SW gate
You open and close the SW gate of the relevant counter with the input parameter SW_GATE
of the FC CNT_CTRL (see chapter "The FC CNT_CTRL function (Page 46)").
Action
Initiating event
Open SW gate
Set SW_GATE
Close SW gate
Reset SW_GATE
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
70 Manual, 02/2014, A5E03648739-02
Opening and closing HW gate
You open and close the HW gate of the relevant counter by applying or removing the
corresponding signals to or from the inputs 1I0 and 1I1 (counter 1) and/or 2I0 and 2I1
(counter 2).
Action
Initiating event
Opening HW gate (level controlled)
Applying signal to input 1I0 (2I0)
Closing HW gate (level controlled)
Removing signal from input 1I0 (2I0)
Opening HW gate (edge controlled)
Applying positive edge to input 1I0 (2I0)
Closing HW gate (edge controlled)
Applying positive edge to input 1I1 (2I1)
When the HW gate opens the counter resumes counting from the current counter status.
Terminating counting process with the gate stop function
In addition you can end the count process when counting with the SW gate or HW gate by
means of the gate stop function of the relevant counter. For this purpose you set the
GATE_STP input parameter of the FC CNT_CTRL.
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 71
8.5
Single counting
Overview
In this mode an FM°450-1 counter counts once from the load value up to the count limit.
Select gate function
In this mode you can select the gate function Options:
SW gate
HW gate, level-controlled or edge-controlled
Figure 8-2 Single counting with load value and gate function
Open and close SW gate
You open and close the SW gate and set the counter to the load value with the input
parameter SW_GATE of the FC CNT_CTRL.
Action
Initiating event
Open SW gate
Set SW_GATE
Close SW gate
Reset SW_GATE
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
72 Manual, 02/2014, A5E03648739-02
Opening and closing HW gate
You open and close the hardware gate and set the counter to the load value by applying or
removing the relevant signals at the inputs 1I0 and 1I1 (Counter 1) and/or 2I0 and 2I1
(Counter 2).
Action
Initiating event
Opening HW gate (level controlled)
Applying signal to input 1I0 (2I0)
Opening HW gate (edge controlled)
Applying positive edge to input 1I0 (2I0)
Closing HW gate (level controlled)
Removing signal from input 1I0 (2I0)
Closing HW gate (edge controlled)
Applying positive edge to input 1I1 (2I1)
In the case of a level-controlled HW gate, a signal at output 1I0 (2I0) is used to reopen the
gate and set the relevant counter to the load value.
If in the case of an edge controlled HW gate a positive edge is again applied to input 1I1
(2I1), the counter resumes counting from the load value irrespective of whether the gate is
closed or still open (retriggering) provided input 1I1 (2I1) is not set.
Behavior at count limits
If the counter reaches the upper or lower count limit and another count pulse arrives, the
counter is set to the other count limit.
Thereafter the gate is closed and the counting process terminated, even if the SW_GATE
parameter is still set or the HW gate is still open. The corresponding status bit is set in the
DB of the FC CNT_CTRL.
Count limit reached
Bit in the DB
Upper count limit
STS_OFLW is set
Lower count limit
STS_UFLW is set
If you want to restart the counter, you must reset the SW_GATE parameter and/or reopen
the HW gate. The counting process is then continued from the load value.
Terminating counting process with the gate stop function
In addition you can terminate the counting process at any time using the gate stop function.
For this purpose you set the GATE_STP input parameter of the FC°CNT_CTRL.
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 73
8.6
Periodic counting
Overview
In this mode an FM 450-1 counter counts once from the load value up to the count limit,
jumps back to the load value and continues to count.
Select gate function
In this mode you can select the gate function Options:
SW gate
HW gate, level-controlled or edge-controlled
Figure 8-3 Periodic counting with load value and gate function
Open and close SW gate
You open and close the SW gate and set the counter to the load value by setting or resetting
the relevant bit in the DB of the FC°CNT_CTRL in the user program (see chapter
"Assignment of the DB (Page 103)"). When you open the SW gate, the FM 450-1 starts
counting from the load value.
Action
Initiating event
Open SW gate
Set SW_GATE
Close SW gate
Reset SW_GATE
If you want to restart the counter, you must reset the bit. The counter then starts counting
from the load value.
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
74 Manual, 02/2014, A5E03648739-02
Opening and closing HW gate
You open and close the HW gate and set the counter to the load value by applying or
removing the relevant signals at the inputs 1I0 and 1I1 (counter 1) and/or 2I0 and 2I1
(counter°2).
Action
Initiating event
Opening HW gate (level controlled)
Applying signal to input 1I0 (2I0)
Closing HW gate (level controlled)
Removing signal from input 1I0 (2I0)
Opening HW gate (edge controlled)
Applying positive edge to input 1I0 (2I0)
Closing HW gate (edge controlled)
Applying positive edge to input 1I1 (2I1)
If in the case of an edge controlled HW gate a positive edge is again applied to input 1I0
(2I0), the relevant counter again starts counting from the load value irrespective of whether
the gate is closed or still open (retriggering) provided input 1I1 (2I1) is not set.
Behavior at the Count Limits
If a counter reaches the upper or lower count limit and a further count pulse comes, it begins
counting from the load value again. The count process is thereby continued without pulse
loss. A corresponding status bit is set in the DB:
Count limit reached
Bit in the DB
Upper count limit
STS_OFLW is set
Lower count limit
STS_UFLW is set
Terminating counting process with the gate stop function
In addition you can terminate the counting process at any time using the gate stop function.
For this purpose you set the GATE_STP input parameter of the FC CNT_CTRL.
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 75
8.7
Count range
Introduction
There is a 32°bit-wide count register on the module. With the count range you specify if the
module counts only in the positive range or if the 32nd°bit is interpreted as a sign bit and
hence negative numbers can be represented. This section describes these two count
ranges, "0 to +32 bits" and "-31 to +31 bits".
Count ranges
The FM 450-1 counts within different limits in the count ranges 0 to +32 bits and -31 to
+31 bits. In each case an overflow or an underflow is identified at the range limits.
In the "-31 to +31 bits" count mode, the counter status is represented in the two's
complement.
Count range
Overflow
Underflow
0 to +32 bits 1) 0 to 4 294 967 295 0 to
FFFF FFFFH
When the counter status changes
from 4 294 967 295 to 0
When the counter status changes from
0°to 4 294 967 295
-31 to +31 bit -2 147 483 648 to
2 147 483 647
8000 0000H to
7FFF FFFFH
When the counter status changes
from +2 147 483 647 to -
2 147 483 648
When the counter status changes from
-2 147 483 648 to +2 147 483 647
1) In this count range, you can only specify and evaluate values in hexadecimal.
Overflow, underflow and zero crossing
A bit is set in the DB of FC°CNT_CTRL for both count limits in the case of overflow and
underflow (see section "Assignment of the DB (Page 103)").
In the "-31 to +31 bit" count range, a bit is similarly set in the DB on a zero crossing.
In the "0 to +32 bit" count range, an overflow or underflow, depending on the direction of
counting, is additionally indicated on a zero crossing.
Event
Bit in the DB
Overflow
STS_OFLW is set
Underflow
STS_UFLW is set
Zero crossing
STS_ZERO is set
Triggering hardware interrupts
You can also signalize the events overflow, underflow and zero crossing by means of
hardware interrupts.
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
76 Manual, 02/2014, A5E03648739-02
8.8
Setting: Behavior of the digital outputs
Introduction
You can store two comparison values (comparison value 1 and 2) for the counters on the
module; these are assigned to the respective digital outputs (comparison value°1: 1Q0 and
2Q0, comparison value 2: 1Q1 and 2Q1). The comparison values are compared to the
current counter status. When the counter status reaches a comparison value, the relevant
output can be set.
Comparison values 1 and 2
You enter the two comparison values in the DB of the FC CNT_CTRL (CMP_V1, CMP_V2)
and transfer them to the FM 450-1 by setting the bits T_CMP_V1 or T_CMP_V2 (see the
section "Assignment of the DB (Page 103)"). The count is not affected by this.
The comparison values must be within the limits of the respective count range. The
comparison value is interpreted according to the selected count range. If you give
FFFF FFFF H, for example, as the comparison value, the value is interpreted as
4 294 967 295 within the 0 to +32 bit count range, and as -1 within the -31 to +31 bit count
range.
Enabling the outputs
Before you can activate the outputs, you must first enable them by setting the appropriate
bits in the DB (see the section Assignment of the DB (Page 103)). If you reset one of these
bits, the associated output is disabled immediately even if you have assigned a pulse
duration for them.
Output
...is enabled by
Q0
CTRL_DQ0
Q1
CTRL_DQ1
Status of the outputs
You can identify the state of the two outputs from the green status LEDs and the relevant
bits in the DB.
Output status
LED status
Bit status
1Q0 (2Q0) is set
CH 1 OUT 0 (CH2 OUT 0) is alight
STS_COMP1 is set
1Q0 (2Q0) is reset
CH 1 OUT 0 (CH2 OUT 0) is dark
STS_COMP1 is reset
1Q1 (2Q1) is set
CH 1 OUT 1 (CH2 OUT 1) is alight
STS_COMP2 is set
1Q1 (2Q1) is reset
CH 1 OUT 1 (CH2 OUT 1) is dark
STS_COMP2 is reset
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 77
Behavior of the outputs
For the two outputs you can set one of six possible responses to reaching the comparison
value. The various options are shown in the following table.
Digital output parameter
assignment
Behavior of the outputs
Disable
The output remains deactivated and is not affected by the comparison value, zero crossing,
overflow, and underflow events.
Active between
comparison value and
overflow
The output is enabled when the counter is within the range between comparison value n and
overflow. The output is activated by setting the counter to a value between the comparison
value and overflow.
Active between
comparison value and
overflow
The output is activated when the counter is within the range between comparison value and
underflow. The output is activated by setting the counter to a value between the comparison
value and underflow.
Active for "pulse duration"
when the comparison
value is reached in up
direction
The output is activated when the comparison value is reached in the up counting direction for
the time the pulse lasts.
Active for "pulse duration"
when the comparison
value is reached in down
direction
The output is activated when the comparison value is reached in the down count direction for
the time the pulse lasts.
Active for "pulse duration"
when comparison value is
reached in up or down
direction
The output is activated when the comparison value is reached for the time the pulse lasts,
irrespective of the counting direction.
A shaded in area in the table signifies: The output is active.
t = pulse duration
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
78 Manual, 02/2014, A5E03648739-02
Boundary conditions
If you assign the behavior of the digital outputs, you must observe the following boundary
conditions.
If ...
then...
... you want to assign parameters for the output to
be "active between the comparison value and the
overflow or underflow" ...
...you must ensure that the time between the
events is longer than the minimum operating time
of the outputs (operating time: 300°µs); otherwise
the control pulses at the outputs are lost.
If the counter status again reaches the
comparison value while the output is still active,
no new pulse will be initiated. A further pulse can
only be initiated when the output is no longer
active.
...you want to assign the parameters for the
output to be "active for the pulse duration in the
up counting direction"...
... you must not enable a hardware interrupt when
"the comparison value 1 or 2 in the down
direction is reached".
...you want to assign the parameters for the
output to be "active for the pulse duration in the
down counting direction"...
...you must not enable a hardware interrupt when
"the comparison value 1 or 2 in the up direction is
reached".
Disabling the outputs
The outputs are disabled by the following events, irrespective of the parameter assignment:
Module watchdog timeout (internal error)
Removal of the enable bit (CTRL_DQ0 for Q0 and CTRL_DQ1 for Q1 in the DB, see
section "Assignment of the DB (Page 103)")
Default setting
The outputs are disabled in the default setting.
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 79
8.9
Setting: Pulse duration
Introduction
As a means of adaptation to the actors used in your process (contactors, control elements
etc.) you have the possibility of specifying a pulse duration during which the outputs are set
when a comparison value is reached. This section describes what you must take into
account if you want to define a pulse duration for the outputs.
The effect of the pulse duration setting
Via the pulse duration you also specify for how long the output should be set at minimum.
This setting is only effective if you preselect the behavior of the output accordingly. The
pulse duration is without effect if the output is to be set between the comparison value and
overflow or underflow.
Pulse duration begins when the output is set. Inaccuracy of the pulse duration is less than
1°ms.
Value range
You can prescribe a value between 0 and 500°ms for the pulse duration. This value applies
to both outputs together.
Note
If you specify the pulse duration to be zero you must ensure that the count pulse times are
greater than the minimum operation time of the digital outputs (operating time:°300°µs, i°e.
the count frequency is less than 3333°Hz); otherwis
e the control pulses are lost at the
outputs.
In this case check if your actor can respond with the operating time 300°µs.
Default value
The default value for the pulse duration is 0.
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
80 Manual, 02/2014, A5E03648739-02
8.10
Command: Open and close gate
Overview
The FM 450-1 counters have the following gates:
A hardware gate (HW gate) which you can open and close level controlled or edge
controlled.
A software gate (SW gate) which you can open and close via control bits in the user
program.
Selecting a gate
In the "Operating Mode" dialog (see section "Overview of modes, settings and commands
(Page 66)"), you specify which gate you want to use for the count process.
The following figures demonstrate the various possibilities for opening and closing the
FM°450-1 gates.
Level controlled opening and closing of the HW gate
The following figure shows the level controlled opening and closing of the HW gate of
counter°1.
Figure 8-4 Level controlled opening and closing of the HW gate of counter 1
If you set input 1I0 to 1 the count signals can reach counter 1 and are counted. If you reset
input 1I0 to 0, the door is closed. The count pulses are no longer counted, counter 1 stops.
If the gate of counter 1 is closed owing to overflow or underflow, you must first reset input 1I0
and apply a positive edge to input 1I0 to reopen the door.
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 81
Edge controlled opening and closing of the HW gate
The following figure shows the edge controlled opening and closing of the HW gate of
counter 1.
Figure 8-5 Edge controlled opening and closing of the HW gate of counter 1
With the edge controlled door function the HW gate of counter 1 is opened by a positive
edge on input 1I0. The door is closed by a positive edge on input 1I1.
If positive edges occur simultaneously on inputs 1I0 and 1I1 an open gate is closed or a
closed gate remains closed. If input 1I1 is set a positive edge on input 1I0 cannot open the
gate.
The same applies analogously to counter 2 (inputs 2I0 and 2I1).
Status of inputs 1I0 (2I0) and 1I1 (2I1)
The status of the inputs 1I0 (2I0) and 1I1 (2I1) are indicated by the green LEDs CH1 IN 0
(CH 2 IN 0) and CH 1 IN 1 (CH 2 IN 1) and, within the user program, in the STS_STA and
STS_STP bit of the DB of the FC°CNT_CTRL.
Gate status
The gate status is indicated in the STS_GATE bit within the user program.
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
82 Manual, 02/2014, A5E03648739-02
Opening and closing the SW gate
The following figure shows the opening and closing of the SW gate of counter 1.
Figure 8-6 Opening and closing the SW gate
The SW gate is opened and closed by setting and resetting the input parameter SW_GATE
of the FC CNT_CTRL.
The closed gate can be reopened by setting the input parameter SW_GATE again.
Status of the SW gate
The status of the SW gate is signalized on the STS_SW_G bit of the DB of the
FC°CNT_CTRL.
Terminating the count with the gate stop function
In addition, you can terminate the counting process at any time using the gate stop function
of the relevant counter, irrespective of the signals applied or the status of the SW gate. For
this purpose you set the GATE_STP input parameter of the FC CNT_CTRL.
When you reset the GATE_STP parameter, you can only open the gate for the counter
concerned by means of a positive edge, either at input 1I0 or 2I0 (HW gate) or resetting the
SW_GATE input parameter (SW gate).
Hardware interrupt
Opening and closing of a HW or SW gate can be used to trigger a hardware interrupt (see
section "Initiating a process interrupt (Page 90)".)
Default setting
In the default setting all gates are open; the count pulses are counted.
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 83
8.11
Command: Set counter
Overview
If you want to start or continue the counting process of a counter from a specific value (the
load value), you must assign parameters for the signal with which the counter is to be set to
the load value. You can set the counter as follows:
With the L_DIRECT input parameter of the FC_CNT_CTRL
With an external signal either via input 1I2 (2I2) or via the input in conjunction with the
zero mark of the encoder.
This section describes the different methods and the time sequence for setting a counter.
Load value
Any number within the count range can be set for the load value.
The load value is interpreted according to the selected count range. If, for example, you
specify FFFF FFFF H as the load value, this is interpreted as 4 294 967 295 within the count
range 0 to +32 bit and as -1 within the count range -31 to +31 bit.
The load value is entered in the DB of the FC°CNT_CTRL.
Setting the counter via the user program
Regardless of the external events, you can set a counter with the FC°CNT_CTRL by means
of the L_DIRECT input parameter. This is also possible while a count is in progress.
The input parameter L_DIRECT is reset by FC CNT_CTRL once the job is successful
completed.
If you set the counter via the FC_CNT_CTRL call, setting cannot trigger a hardware interrupt.
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
84 Manual, 02/2014, A5E03648739-02
Setting the counter with an external signal
The L_PREPAR input parameter prepares a new load value. You can choose between two
different external signals with which you set a counter to the load value
Only input 1I2 (2I2)
Input 1I2 (2I2) and the zero mark of the encoder
You use the zero mark of the encoder if you want to synchronize the counter to a specific
counter status at a specific point in your process. Hence you achieve greater precision in the
count process.
The counter is set independent of the mode.
After setting the counter with an external signal, the STS_SYNC bit is set in the DB. The
STS_SYNC bit is cleared by the RES_SYNC bit.
Note
The synchronization of a counter with the zero mark only makes sense if the gate
is open.
When setting a counter with an external signal, if you have only enabled one count direction,
please note the following: When the door closes, only the current count direction is stored
(frozen). Hence it is possible for the counter to be synchron
ized in the opposite direction to
the enabled count direction.
Hardware interrupt
Setting a counter with an external signal can be used to trigger a hardware interrupt.
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 85
Setting counter with input 1I2 (2I2)
A counter can be loaded with the load value via a rising edge at input 1I2 (2I2).
You can specify the behavior of an FM°450-1 counter with a positive edge at input 1I2 (2I2)
with the ENSET_UP and ENSET_DN variables in the DB of the FC_CNT_CTRL and by
means of parameter assignment.
Bit
Behavior of the FM 450-1
ENSET_UP set
The counter is only set in the case of up counting
ENSET_DN set
The counter is only set in the case of down counting
ENSET_UP and
ENSET_DN set
Counter is set for up and down counting.
Parameter assignment
Behavior of the FM 450-1
Parameter assignment
"single setting of counter"
The counter is set only at the first rising edge at input 1I2 (2I2).
If the counter is to be set again, you must first set ENSET_UP or
ENSET_DN again. The counter is then set again with the next positive
edge at input 1I2 (2I2).
Parameter assignment
"multiple setting of
counter"
As long as ENSET_UP or/and ENSET_DN are set, the counter will be set
with each rising edge at input 1I2 (2I2).
Note
It is imperative that you set one of the two variables, ENSET_UP or/and ENSET_DN, so that
the relevant counter can be set via input 1I2 (2I2).
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
86 Manual, 02/2014, A5E03648739-02
Setting counter once with input 1I2 (2I2)
The following figure shows counter 1 being set once with input 1I2. The situation is
analogous for counter 2 with input 2I2. In the case represented here, only ENSET_UP is set,
i.e., the counter is set during up counting.
The relevant counter is set with the first rising edge at input 1I2, as long as ENSET_UP is
set. If you want to set this counter again, first you must reset the relevant ENSET_UP and
then set it again. Then the next positive edge at input 1I2 results in the counter being set.
Figure 8-7 Single setting of counter 1 with input 1I2
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 87
Multiple setting of the counter with input 1I2 (2I2)
The following figure shows the multiple setting of counter 1with input 1I2. The situation is
analogous for counter 2 with input 2I2. In the case represented here, only ENSET_UP is set,
i.e., the counter is set during up counting.
The relevant counter is set with the first rising edge at input 1I2, as long as ENSET_UP is
set. When you reset ENSET_UP you cannot set the counter with input 1I2. Only after you
have set ENSET_UP again will the next positive edge at input 1I2 result in the setting of the
counter.
Figure 8-8 Multiple setting of counter 1 with input 1I2
Setting the counter with the zero mark
If you assign the parameters for setting a counter with the zero mark of the encoder, the
relevant counter is set with the rising edge of the zero mark.
Setting is only performed if input 1I2 (2I2) of the relevant counter is set at the time of the
rising edge of the zero mark.
With the ENSET_UP and ENSET_DN variable is the DB of the FC CNT_CTRL and by
assigning parameters, you specify the behavior of the respective FM 450-1 counter in the
case of a rising edge of the zero mark.
Bit
Behavior of the FM 450-1 counter
ENSET_UP set
The counter is only set in the case of up counting.
ENSET_DN set
The counter is only set in the case of down counting.
ENSET_UP and
ENSET_DN set
Counter is set for up and down counting.
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
88 Manual, 02/2014, A5E03648739-02
Parameter assignment
Behavior of the FM 450-1 counter
Parameter assignment
"single setting of counter"
The counter is set only at the first rising edge of the zero mark.
If the counter is to be set again, you must first set ENSET_UP or
ENSET_DN again (edge evaluation). The counter is then set again with
the next rising edge of the zero mark.
Parameter assignment
"multiple setting of
counter"
As long as ENSET_UP and/or ENSET_DN are set, the counter will be set
with each rising edge of the zero mark.
Note
It is imperative that you set one of the two variables, ENSET_UP or/and ENSET_DN and
input 1I2 (2I2) so that the relevant counter can be set with the zero mark.
Single setting with the zero mark
The following figure shows counter 1 being set once with the zero mark. In the case
represented here, only ENSET_UP is set, i.e., the counter is set during up counting.
The relevant counter is set with the first rising edge of the zero mark as long as ENSET_UP
and input 1I2 are set.
If you want to set counter°1 again, you must reset ENSET_UP and then set it again. If input
1I2 is not set, setting is performed with the first zero mark after setting 1/2. If input 1I2 is set,
setting takes place with the next zero mark.
The situation is analogous for counter 2 with input 2I2.
Figure 8-9 Single setting of counter 1 with the zero mark
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 89
Multiple setting with the zero mark
The following figure shows multiple setting of counter 1 with the zero mark. In the case
represented here, only ENSET_UP is set, i.e., the counter is set during up counting.
The relevant counter is set with each first rising edge of the zero mark as long as
ENSET_UP and input 1I2 are set.
The situation is analogous for counter 2 with input 2I2.
Figure 8-10 Multiple setting of counter 1 with the zero mark
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
90 Manual, 02/2014, A5E03648739-02
8.12
Initiating a process interrupt
Introduction
For the individual counters of the FM 450-1 you can set which events are to trigger a
hardware interrupt during operation. For this purpose you parameterize the counter
interrupts in the parameter assignment screen marks.
What is a hardware interrupt?
If a response is to be made to an event regardless of the cycle of the CPU, each counter of
the FM 450-1 can trigger a hardware interrupt. The CPU then interrupts the cyclical program
and handles the hardware interrupt OB.
Which events can trigger a hardware interrupt?
In the FM 450-1 count mode, the following events can trigger a hardware interrupt
(independently of each other for each of the two counters):
Opening of the gate (in modes with HW or SW gate)
Closing of the gate (in modes with HW or SW gate)
Overflow
Underflow
Zero crossing
Reaching comparison value 1 in the up direction
Reaching comparison value 1 in the down direction
Reaching comparison value 2 in the up direction
Reaching comparison value 2 in the down direction
Setting the counter with an external signal
You can select a random number of events for triggering hardware interrupts, as long as the
boundary conditions are observed.
Enabling the hardware interrupt
When configuring the hardware, in the parameter assignment screen masks you enable the
interrupts for the module and choose whether the module is to initiate a diagnostic and/ or a
hardware interrupt.
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 91
Hardware interrupt OB, OB 4x
If a hardware interrupt occurs, the user program is interrupted, the data are transferred from
the module to the start information of the OB 4x and the OB 4x is called. The hardware
interrupt is acknowledged by quitting the OB 4x.
If no OB 4x is programmed the CPU goes into STOP. If you then switch back to RUN, the
hardware interrupt requirements are deleted.
Start information
The temporary variable OB4x_POINT_ADDR is described in the start information of the
OB4x.
The OB4x_POINT_ADDR variable (bytes 8 - 11) consists of four bytes. The information on
the event that initiated the hardware interrupt is entered into these four bytes. The following
table shows which bits are set for which interrupt. All bits not listed have no meaning and are
zero.
Byte
Bit
Significance: Interrupt in the case of...
Counter 1
0
0
Opening the gate
1
Closing the gate
2
Overflow
3
Underflow
4
Reaching comparison value 1 in the up direction
5
Reaching comparison value 1 in the down direction
6
Reaching comparison value 2 in the up direction
7
Reaching comparison value 2 in the down direction
1
0
Zero crossing
5
Setting of the counter
Counter 2
2
0
Opening the gate
1
Closing the gate
2
Overflow
3
Underflow
4 Reaching comparison value 1 in the up direction
5
Reaching comparison value 1 in the down direction
6 Reaching comparison value 2 in the up direction
7
Reaching comparison value 2 in the down direction
3
0
Zero crossing
5
Setting of the counter
Modes, settings, parameters and commands
8.12 Initiating a process interrupt
Counter module FM 450-1
92 Manual, 02/2014, A5E03648739-02
Lost hardware interrupt
If an event occurs that is to trigger a hardware interrupt and the same previous event has not
yet been acknowledged, no further hardware interrupt is triggered; the hardware interrupt is
lost.
This can result in the diagnostic interrupt "hardware interrupt lost" depending on the
parameters assigned.
Default setting
No hardware interrupt is assigned in the default setting.
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 93
Encoder signals and their evaluation
9
9.1
Chapter overview
Chapter overview
This chapter describes:
which encoders you can connect to the counter module
the time profile of the encoder signals
the multiple evaluation of encoder signals by the counter module
how the module monitors the various encoder signals
which signals can be assigned input filter parameters.
Encoder signals and their evaluation
9.5 Signal evaluation
Counter module FM 450-1
94 Manual, 02/2014, A5E03648739-02
9.2
Encoders which can be connected
Introduction
The counter module can process rectangular count signals which were generated by
incremental encoders or pulse generators.
Incremental encoders scan a barcode to generate rectangular electrical pulses. They differ in
terms of pulse amplitude and number of signals.
Pulse generators such as light barriers or proximity switches (BEROs) return only a
rectangular signal at a specific amplitude.
Connecting different encoders
The counter module supports different encoders which return pulses for the count signals.
The table shows these encoders and the corresponding signals.
Table 9- 1 Encoders which can be connected
Encoders
Signal
5-V incremental encoder
Differential signals A and /A, B and /B, N and /N
24-V incremental encoder
A*, B* and N*
24-V pulse encoder
24-V with directional signal
24-V proximity switch
24 V without directional signal
Encoder signals and their evaluation
9.5 Signal evaluation
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 95
9.3
5-V differential signals
Count signals of 5-V incremental encoders
RS422 signals returned by the 5-V incremental encoder to the module:
A and /A
B and /B
N and /N
The signals /A, /B and /N are the inverted signals of A, B and N. Signals A and B are phase-
shifted by 90°.
The tracks A and B of 5-V incremental encoders are used for counting. Track N is used to
initialize the counter with the load value, if programmed accordingly.
Encoders featuring these six signals are symmetrical encoders.
The diagram shows the time profile of the encoder signals:
Figure 9-1 Signals of the 5-V incremental encoder
The module detects the count direction by evaluating the ratio of signals A and B. The
diagrams in the chapter "Signal evaluation (Page 100)" show which edges of signals A and B
are counted in down or up direction.
Changing the count direction
You can change the count direction using the "Count direction normal" and "Count direction
inverted" parameters without having to modify the wiring.
Encoder signals and their evaluation
9.5 Signal evaluation
Counter module FM 450-1
96 Manual, 02/2014, A5E03648739-02
Monitoring encoder signals
The module monitors the cable connection, and detects wire-break or short-circuit.
You can define which of the three signal pairs to include in monitoring in your program.
There is no need to wire any unused signal pairs, if you have disabled the corresponding
diagnostics functions in the program (monitoring.)
An error state at all three signals indicates a defective encoder, or a short-circuit at the
"5.2 V DC" encoder supply, or a missing encoder.
When programming is completed, and the module detects an error, the error information will
be written to the diagnostics data records DS0 and DS1. This situation my lead to a
diagnostics interrupt if programmed accordingly.
Coding plug (only for FM 350-1)
To operate this encoder, insert the coding plug in position A.
Encoder signals and their evaluation
9.5 Signal evaluation
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 97
9.4
24-V signals
Count signals returned by 24-V encoders
24-V incremental encoders
The 24-V incremental encoder returns the 24-V signals A*, B* and N* to the module. The A*
and B* signals are phase-shifted by 90°.
24-V signals are marked with an asterisk "*" character.
The tracks A* and B* of a 24-V incremental encoder are used for counting. Track N* is used
to initialize the counter with the load value, if programmed accordingly.
Encoders which do not return inverted signals asymmetrical encoders.
The diagram shows the time profile of the encoder signals:
Figure 9-2 Signals of the 24-V incremental encoder
The module detects the count direction by evaluating the ratio of signals A* and B*. The
diagrams in the chapter "Signal evaluation (Page 100)" show which edges of the A* and B*
signals are incremented or decremented.
You can program the inputs of 24-V encoder signals for the connection of source outputs, or
push-pull outputs, or sink outputs. For further information, refer to the encoder manual.
You can change the count direction using the "Count direction normal" and "Count direction
inverted" parameters without having to modify the wiring.
Encoder signals and their evaluation
9.5 Signal evaluation
Counter module FM 450-1
98 Manual, 02/2014, A5E03648739-02
24-V pulse encoders without/with direction signal
Encoders such as proximity switches (BERO) or light barriers return only a count signal
which you wire to terminal A* of the front connector.
in additional, you can wire a signal for direction detection to terminal B* of the relevant
counter. If your encoder does not return a corresponding signal, you can wire a
corresponding ID signal you generate within the user program, or use a corresponding
process signal.
The diagram shows the time profile of the encoder signals, and the resultant count pulses
Figure 9-3 Signals of a 24-V pulse generator with direction signal
Programming the encoder inputs
The count direction is defined by programming the encoder inputs. The diagram shows a
change of the count direction based on parameter settings.
Table 9- 2 Count direction determined by input parameters
Programming
Terminal B*
Count direction
current sourcing, push-pull
not wired
Up
24 V connected
Down
current sinking
not wired
Down
Short-circuited to ground
Up
Set the "24 V pulse and direction" parameter for the selected encoder.
You can not reverse the direction of these count signal by inverting the B* signal.
Note
This type of evaluation may cause the count value to "drift off" at the edges if count signal
oscillates, as all signals are added.
Encoder signals and their evaluation
9.5 Signal evaluation
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 99
Input filters for the 24-V count inputs
For the purpose of suppressing interference, you can parameterize input filters with a
uniform filter time for the 24 V inputs A*, B* and N* and for the digital inputs. Input filters
available:
Table 9- 3 Input filters
Features
Input filter 1
(default)
Input filter 2
Typical input delay
1 µs
15 µs
Maximum count frequency
200 kHz
20 kHz
Minimum pulse width of count signals
2.5 µs
25 µs
Monitoring encoder signals
The 24-V count signals are not monitored to detect wire-breaks or short-circuits.
Coding plug (only for FM 350-1)
To operate this encoder, insert the coding plug in position D.
Encoder signals and their evaluation
9.5 Signal evaluation
Counter module FM 450-1
100 Manual, 02/2014, A5E03648739-02
9.5
Signal evaluation
Overview
The counter module supports the count of signal edges. It usually evaluates the edge at A
(A*) (single evaluation). Options in the program of increasing the resolution:
Single evaluation
Double evaluation
Quadruple evaluation
Multiple evaluation is only supported for 5-V incremental encoders which return the A and B
signal with a phase shift of 90°, for 24-V incremental 24 V encoders with a phase shift of 90°
of the A* and B* signals.
Single evaluation
In this mode, the module evaluates only one edge of signal A. Up count pulses are recorded
at the positive edge at track A, and if track B is low. Down count pulses are recorded at the
positive edge at track A, and if track B is low.
The diagram shows a single evaluation of signals:
Figure 9-4 Single evaluation
Encoder signals and their evaluation
9.5 Signal evaluation
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 101
Double evaluation
Double evaluation refers to the evaluation of the positive and negative edges of signal A.
The logic level at signal B determines the count direction, i.e. the up or down count pulse.
The diagram shows the double evaluation of signals:
Figure 9-5 Double evaluation
Quadruple evaluation
Quadruple evaluation refers to the evaluation of the positive and negative edges of signals A
and B. The logic level at the signals A and B determines the count direction, i.e. the up or
down count pulse.
The diagram shows quadruple evaluation of signals:
Figure 9-6 Quadruple evaluation
Default
Single evaluation is set by default.
Encoder signals and their evaluation
9.5 Signal evaluation
Counter module FM 450-1
102 Manual, 02/2014, A5E03648739-02
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 103
Assignment of the DB
10
10.1
Assignment of the DB
DB for the FC°CNT_CTRL
All data associated with a channel of the module are located in the DB of FC CNT_CTRL.
The data structure and the length of the DB is determined by the variable declaration in
FC CNT_CTRL. Prior to configuring the module, the DB must have the following valid data
assigned to it (see section "Program (Page 45)"):
Module address (address 6.0)
Channel starting address (address 8.0)
User data length (address 12.0)
The DB was generated from the UDT 1 as a data block with associated, user-specific data
type (see section "Program (Page 45)"). The DB assignments resulting from this are shown
below.
Table 10- 1 Assignment of the DB
Address
Variable
Data type
Initial value
Comment
0.0
AR1_BUFFER
DWORD
DW#16#0
AR1 buffer
4.0
FP
BYTE
B#16#0
Flag byte
5.0
RESERVED
BYTE
B#16#0
Reserved
6.0
MOD_ADR
WORD
W#16#0
Module address
8.0
CH_ADR
DWORD
DW#16#0
Channel address
12.0
U_D_LGTH
BYTE
B#16#0
User data length
13.0
A_BYTE_0
BYTE
B#16#0
Reserved
14.0
LOAD_VAL
1
DINT
L#0
New load value (write user)
18.0
CMP_V1
1
DINT
L#0
New comparison value 1 (write user)
22.0
CMP_V2
1
DINT
L#0
New comparison value 2 (write user)
26.0
A_BIT0_0
BOOL
FALSE
Reserved
26.1
TFB
BOOL
FALSE
Test enabled
26.2
A_BIT0_2
BOOL
FALSE
Reserved
26.3
A_BIT0_3
BOOL
FALSE
Reserved
26.4
A_BIT0_4
BOOL
FALSE
Reserved
26.5
A_BIT0_5
BOOL
FALSE
Reserved
26.6
A_BIT0_6
BOOL
FALSE
Reserved
26.7 A_BIT0_7 BOOL FALSE Reserved
27.0
ENSET_UP
1
BOOL
FALSE
Enable setting in up direction (write user)
27.1
ENSET_DN
1
BOOL
FALSE
Enable setting in down direction (write user)
Assignment of the DB
10.1 Assignment of the DB
Counter module FM 450-1
104 Manual, 02/2014, A5E03648739-02
Address
Variable
Data type
Initial value
Comment
27.2
A_BIT1_2
BOOL
FALSE
Reserved
27.3
A_BIT1_3
BOOL
FALSE
Reserved
27.4
A_BIT1_4
BOOL
FALSE
Reserved
27.5
A_BIT1_5
BOOL
FALSE
Reserved
27.6
A_BIT1_6
BOOL
FALSE
Reserved
27.7
A_BIT1_7
BOOL
FALSE
Reserved
28.0
CTRL_DO0
1
BOOL
FALSE
Enable digital output DO0 (write user)
28.1
CTRL_DO1
1
BOOL
FALSE
Enable digital output DO1 (write user)
28.2
A_BIT2_2
BOOL
FALSE
Reserved
28.3
A_BIT2_3
BOOL
FALSE
Reserved
28.4
A_BIT2_4
BOOL
FALSE
Reserved
28.5
A_BIT2_5
BOOL
FALSE
Reserved
28.6
A_BIT2_6
BOOL
FALSE
Reserved
28.7
A_BIT2_7
BOOL
FALSE
Reserved
29.0
A_BIT3_0
BOOL
FALSE
Reserved
29.1
A_BIT3_1
BOOL
FALSE
Reserved
29.2 A_BIT3_2 BOOL FALSE Reserved
29.3
A_BIT3_3
BOOL
FALSE
Reserved
29.4 A_BIT3_4 BOOL FALSE Reserved
29.5
A_BIT3_5
BOOL
FALSE
Reserved
29.6
A_BIT3_6
BOOL
FALSE
Reserved
29.7
A_BIT3_7
BOOL
FALSE
Reserved
30.0
LATCH_LOAD
1
DINT
L#0
Current load or latch value (read user)
34.0
ACT_CNTV
1
DINT
L#0
Current count value (read user)
38.0
DA_ERR_W
1
WORD
W#16#0
Data error word (read user)
40.0
OT_ERR_B
1
BYTE
B#16#0
Operator error byte (read user)
41.0
E_BIT0_0
BOOL
FALSE
Reserved
41.1
STS_TFB
BOOL
FALSE
Status test free
41.2
DIAG
BOOL
FALSE
Reserved
41.3
E_BIT0_3
BOOL
FALSE
Reserved
41.4
DATA_ERR
1
BOOL
FALSE
Data error bit (read user)
41.5
E_BIT0_5
BOOL
FALSE
Reserved
41.6
E_BIT0_6
BOOL
FALSE
Reserved
41.7
PARA
1
BOOL
FALSE
Module parameters assigned (read user)
42.0
E_BYTE_0
BYTE
B#16#0
Reserved
43.0
STS_RUN
BOOL
FALSE
Status, counter working
43.1
STS_DIR
1
BOOL
FALSE
Status count direction (read user)
43.2 STS_ZERO1 BOOL FALSE Status zero crossing (read user)
43.3
STS_OFLW
1
BOOL
FALSE
Status overflow (read user)
43.4
STS_UFLW
1
BOOL
FALSE
Status underflow (read user)
43.5
STS_SYNC
1
BOOL
FALSE
Status counter synchronized (read user)
43.6
STS_GATE
1
BOOL
FALSE
Status internal gate (read user)
Assignment of the DB
10.1 Assignment of the DB
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 105
Address
Variable
Data type
Initial value
Comment
43.7
STS_SW_G
1
BOOL
FALSE
Status SW gate (read user)
44.0
STS_SET
1
BOOL
FALSE
Status digital input SET (read user)
44.1
STS_LATCH
1
BOOL
FALSE
Reserved
44.2
STS_STA
1
BOOL
FALSE
Status digital input START (read user)
44.3
STS_STP
1
BOOL
FALSE
Status digital input STOP(read user)
44.4
STS_CMP1
1
BOOL
FALSE
Status output comparison value 1 (read user)
44.5
STS_CMP2
1
BOOL
FALSE
Status output comparison value 2 (read user)
44.6
STS_COMP1
1
BOOL
FALSE
Reserved
44.7
STS_COMP2
1
BOOL
FALSE
Reserved
45.0
E_BIT3_0
BOOL
FALSE
Reserved
45.1
E_BIT3_1
BOOL
FALSE
Reserved
45.2
E_BIT3_2
BOOL
FALSE
Reserved
45.3
E_BIT3_3
BOOL
FALSE
Reserved
45.4
E_BIT3_4
BOOL
FALSE
Reserved
45.5
E_BIT3_5
BOOL
FALSE
Reserved
45.6
E_BIT3_6
BOOL
FALSE
Reserved
45.7 E_BIT3_7 BOOL FALSE Reserved
46.0
ACT_CMP1
1
DINT
L#0
Current comparison value 1 (read user)
50.0 ACT_CMP21 DINT L#0 Current comparison value 2 (read user)
The following diagnostics data are entered by the FC_DIAG_INF
54.0
MDL_DEFECT
BOOL
FALSE
Module faults
54.1
INT_FAULT
BOOL
FALSE
Internal error
54.2
EXT_FAULT
BOOL
FALSE
External error
54.3
PNT_INFO
BOOL
FALSE
Channel error
54.4
EXT_VOLTAGE
BOOL
FALSE
Auxiliary voltage fault
54.5
FLD_CNNCTR
BOOL
FALSE
Front connectors
54.6
NO_CONFIG
BOOL
FALSE
Missing parameters
54.7
CONFIG_ERR
BOOL
FALSE
Faulty parameters
55.0
MDL_TYPE
BYTE
B#16#0
Module type
56.0
SUB_MDL_ERR
BOOL
FALSE
Incorrect/missing interface module
56.1
COMM_FAULT
BOOL
FALSE
Communication error
56.2
MDL_STOP
BOOL
FALSE
RUN/STOP operating status indicator
56.3 WTCH_DOG_FAU
LT
BOOL FALSE Watchdog (FM)
56.4
INT_PS_FLT
BOOL
FALSE
Internal power supply fault
56.5
PRIM_BATT_FLT
BOOL
FALSE
Battery monitoring
56.6 BCKUP_BATT_FL
T
BOOL FALSE Backup fault
56.7
RESERVED_2
BOOL
FALSE
Reserved
57.0 RACK_FLT BOOL FALSE Module rack fault
57.1
PROC_FLT
BOOL
FALSE
CPU fault
57.2
EPROM_FLT
BOOL
FALSE
EPROM fault
Assignment of the DB
10.1 Assignment of the DB
Counter module FM 450-1
106 Manual, 02/2014, A5E03648739-02
Address
Variable
Data type
Initial value
Comment
57.3
RAM_FLT
BOOL
FALSE
RAM fault
57.4
ADU_FLT
BOOL
FALSE
ADC/DAC fault
57.5
FUSE_FLT
BOOL
FALSE
Fuse
57.6
HW_INTR_FLT
BOOL
FALSE
Hardware interrupt lost
57.7
RESERVED_3
BOOL
FALSE
Reserved
58.0
CH_TYPE
BYTE
B#16#0
Channel type
59.0
LGTH_DIA
BYTE
B#16#0
Diagnostics data length per channel
60.0
CH_NO
BYTE
B#16#0
Channel number
61.0
GRP_ERR1
BOOL
FALSE
Group error channel 1
61.1
GRP_ERR2
BOOL
FALSE
Group error channel 2
61.2
D_BIT7_2
BOOL
FALSE
DS1 byte 7 bit 2
61.3
D_BIT7_3
BOOL
FALSE
DS1 byte 7 bit 3
61.4
D_BIT7_4
BOOL
FALSE
DS1 byte 7 bit 4
61.5
D_BIT7_5
BOOL
FALSE
DS1 byte 7 bit 5
61.6
D_BIT7_6
BOOL
FALSE
DS1 byte 7 bit 6
61.7
D_BIT7_7
BOOL
FALSE
DS1 byte 7 bit 7
62.0 CH1_SIGA BOOL FALSE Channel 1, error signal A
62.1
CH1_SIGB
BOOL
FALSE
Channel 1, error signal B
62.2 CH1_SIGZ BOOL FALSE Channel 1, error zero signal
62.3
CH1_BETW
BOOL
FALSE
Channel 1, error between channels
62.4
CH1_5V2
BOOL
FALSE
Channel 1, 5.2 V encoder supply fault
62.5
D_BIT8_5
BOOL
FALSE
DS1 byte 8 bit 5
62.6
D_BIT8_6
BOOL
FALSE
DS1 byte 8 bit 6
62.7
D_BIT8_7
BOOL
FALSE
DS1 byte 8 bit 7
63.0
D_BYTE9
BYTE
B#16#0
DS1 byte 9
64.0
CH2_SIGA
BOOL
FALSE
Channel 2, error signal A
64.1
CH2_SIGB
BOOL
FALSE
Channel 2, error signal B
64.2
CH2_SIGZ
BOOL
FALSE
Channel 2, error zero signal
64.3
CH2_BETW
BOOL
FALSE
Channel 2, error between channels
64.4
CH2_5V2
BOOL
FALSE
Channel 2, 5.2V encoder supply fault
64.5
D_BIT10_5
BOOL
FALSE
DS1 byte 10 bit 5
64.6
D_BIT10_6
BOOL
FALSE
DS1 byte 10 bit 6
64.7
D_BIT10_7
BOOL
FALSE
DS1 byte 10 bit 7
65.0
D_BYTE11
BYTE
B#16#0
DS1 byte 11
66.0
D_BYTE12
BYTE
B#16#0
DS1 byte 12
67.0
D_BYTE13
BYTE
B#16#0
DS1 byte 13
68.0
D_BYTE14
BYTE
B#16#0
DS1 byte 14
69.0 D_BYTE15 BYTE B#16#0 DS1 byte 15
1
Variables in the DB that you have to/can enter or read out during work with the FM
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 107
Errors and diagnostics
11
11.1
Chapter overview
Chapter overview
Errors can occur owing to operator errrs or incorrect wiring which the module must
communicate to the user.
The errors and faults are divided into the following classes on the module:
Faults displayed by the diagnostics LEDs that indicate internal and external module
faults.
Faults that can trigger a diagnostics interrupt.
Operator errors caused by incorrect operation.
The different classes of errors are indicated and displayed in different positions and must be
acknowledged in different ways.
This chapter describes
which errors and faults can occur,
where these errors and faults are displayed and
how you acknowledge them.
Errors and diagnostics
11.5 Operator error
Counter module FM 450-1
108 Manual, 02/2014, A5E03648739-02
11.2
Faults indicated via the diagnostics LEDs
Where are the faults displayed?
Faults are indicated by the two red diagnostics LEDs:
The INTF diagnostics LED displays internal faults of the module.
The EXTF diagnostics LEDdisplays external faults to the cable connections.
Which fauts are displayed?
The following faults are indicated by the two red diagnostics LEDs lighting up:
Fault type/LED
Cause of fault
Correction
Internal fault
INTF diagnostics LED
Fault in EPROM TEST
Module replacement
Fault in RAM TEST
Module replacement
Watchdog has responded
Module replacement
Process interrupt lost Is acknowledged by processing the process
interrupt.
External fault
EXTF Diagnostics LED
Auxilliary voltage 1L+/1M is not connected or
24 VDC encoder supply is short circuited
Correct connection
5.2 VDC encoder supply short circuited or
overloaded
Correct connection
5 V encoder signals faulty (wire breakage,
short circuit, cable missing)
Correct connection
Initiation of a diagnostics interrupt
All faults, except for the fault in the EPROM test can initiate a diagnostics interrupt if you
have enabled the diagnostics interrupt in the relevant parameter assignment screen form.
You will find out which fault has caused the LED to light up from the diagnostic data records
DS0 and DS1. The assignment of the diagnostics data records DS0 and DS1 is described in
the next section.
Errors and diagnostics
11.5 Operator error
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 109
11.3
Initiation of diagnostics interrupts
What is a diagnostics interrupt?
If the user program is to respond to an internal or external fault, you can set the parameters
for a diagnostic interrupt that will break off the cyclical program of the CPU device and calls
the diagnostics interrupt OB (OB 82).
Which events can initiate a diagnostic interrupt?
The following events can initiate a diagnostic interrupt:
The external auxiliary 1L+/1M voltage is faulty.
5.2 VDC encoder supply short circuited or overloaded.
The module parameters are incorrectly assigned.
Watchdog timeout
RAM defective
Hardware interrupt lost
Signal A faulty (wire breakage, short circuit, cable missing)
Signal B faulty (wire breakage, short circuit, cable missing)
Signal N faulty (wire breakage, short circuit, cable missing)
Enabling the diagnostic interrupt
You disable or enable the interrupts for the module and you choose whether the module is to
initiate a diagnostic interrupt and/or a hardware interrupt.
Responses to a diagnostic interrupt
If an event occurs that can trigger a diagnostic interrupt, the following happens:
The diagnostic information is stored in the diagnostic data records DS0 and DS1 on the
module.
An error LED lights up.
The diagnostic interrupt OB is called (OB82).
Diagnostic data record DS0 is entered in the start information of the diagnostic interrupt
OB.
The count process continues unchanged.
If no OB82 has been programmed, the CPU goes into STOP.
Errors and diagnostics
11.5 Operator error
Counter module FM 450-1
110 Manual, 02/2014, A5E03648739-02
Diagnostic Data Records DS0 and DS1
The information as to which event triggered a diagnostic interrupt is stored in diagnostic data
records DS0 and DS1. Diagnostics data record DS0 consists of 4 bytes; DS1 consists of
12 bytes, the first 4 bytes of which are identical to DS0.
Reading the data record from the module
Diagnostic data record DS0 is automatically transferred to the start information when the
diagnostic OB is called. These four bytes are stored there in the local data element
(bytes 8-11) of OB 82.
You can read out the diagnostic data record DS 1 and hence also the contents of DS0 from
the module using FC DIAG_INF. This is only useful if DS0 signals an error in one channel.
Assignment of the Diagnostic Data Record DS0 and the Start Information
The table below shows the assignment of the diagnostic data record DS0 in the start
information. All bits not listed have no meaning and are zero.
Table 11- 1 Assignment of diagnostic data record DS0
Byte
Bit
Meaning
Remark
Event no.
0
0
Module error
Is set at each diagnostic event.
8:x:00
1 Internal error Is set for all internal faults:
Fault in RAM TEST
Watchdog timeout
Lost hardware interrupt
8:x:01
2 External error Is set for all external faults:
Auxiliary voltage 1L+/1M is not
connected or 5.2 VDC encoder
supply is short circuited
5.2 VDC encoder supply short
circuited or overloaded.
5V signals faulty
Faulty parameter assignment
8:x:02
3 Error in one channel 1 is always assigned for internal and
external faults.
8:x:03
4
External auxiliary voltage faulty
8:x:04
7
Faulty parameter assignment
8:x:07
1
0 ... 3
Type class
Always assigned with 8.
4
Channel information
Always assigned with 1.
2
3
Watchdog timeout
8:x:33
3
3
RAM defective
8:x:43
6
Hardware interrupt lost
8:x:46
Errors and diagnostics
11.5 Operator error
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 111
Diagnostic data record DS1
Diagnostic data record DS 1 consists of 12 bytes. The first 4 bytes are identical to diagnostic
data record DS0. The following table shows the assignment of the remaining bytes. All bits
not listed have no meaning and are zero. This data record is entered into DB 1 from DW54
with the FC DIAG_INF.
Table 11- 2 Assignment of the bits of bytes 4 to 12 of the diagnostic data record DS1
Byte
Bit
Meaning
Remark
Event no.
4
0 ... 6
Channel type
76H is always assigned.
7
Other channel types
0 is always assigned.
5
0 ... 7
Diagnostic information length
Always allocated to CH.
6
0 ... 7
Number of channels
2 is always assigned.
7 0 Channel fault vector Bit 0 = 1: Fault on channel 1
Bit 1 = 1: Fault on channel 2
8
0
Signal A - faulty channel 1
8:x:B0
1
Signal B - faulty channel 1
8:x:B1
2
Signal N faulty channel 1
8:x:B2
4
5.2V encoder supply faulty channel 1
8:x:B4
9
Reserved
10
0
Signal A - faulty channel 2
8:x:B0
1
Signal B - faulty channel 2
8:x:B1
2
Signal N faulty channel 2
8:x:B2
4
5.2V encoder supply faulty channel 2
8:x:B4
11 Reserved
How does the diagnostic text appear in the diagnostic buffer?
If you want to enter the diagnostic message in the diagnostic buffer, you must call the
SFC 52 (Enter user-specific message in the diagnostic buffer" in the user program. The
event number of the diagnostic message in each case is specified in the input parameter
EVENTN. The interrupt is entered in the diagnostic buffer with x=1 as incoming and x=0 as
outgoing. The diagnostic buffer contains the relevant diagnostic text in the "Meaning" column
as well as the time of the entry.
Default setting
The diagnostic interrupt is disabled in the default setting.
Errors and diagnostics
11.5 Operator error
Counter module FM 450-1
112 Manual, 02/2014, A5E03648739-02
11.4
Data error
When do data errors occur?
If new parameters are transferred to the module, the FM 450-1 checks these parameters. If
errors occur during this check, the module reports these data errors.
Wrong parameters are not accepted by the module.
Where are data errors indicated?
The FC CNT_CTRL enters the data errors in DB1 with the error numbers. You can access
this data word via the variable name "DA_ERR_W" in the user program The following table
shows the numbers of the data errors and the significance of these errors.
Table 11- 3 Data error numbers and their significance
No.
Meaning
0
No fault
201
Value too great for receiver selection
202
Value too great for the diagnostics of the pair of signals
203
Value too great for the evaluation of the signals
204
Value too great for the input filter of the 24V count signals
205
Value too great for the input filters of the digital inputs
206
Reversing the direction not permitted
207
Value too great for the behavior of digital output 1Q0 (2Q0)
208
Value too great for the behavior of digital output 1Q1 (2Q1)
209
Pulse duration wrong or too long
211
Wrong mode selected
212
No gate or both gates specified
215 When assigning the process interrupt "Reaching the comparison value in the up and/or down
count direction" parameters a different count direction was specified than the parameter
assignment for the behavior of the outputs "Output active for on pulse duration in up and/or
down direction". The directions must match.
216
Gate control interrupts are only possible for modes with gate control
217
No interrupt on reaching the comparison values is permitted for behavior of the digital outputs
"active between comparison value and overflow" or "active between comparison value and
underflow".
How are data errors acknowledged?
Correct the values for the parameters to comply with the specifications. Transfer the
corrected set of parameters to the FM 450-1 again. This again checks the parameters and
deletes the data error in DB 1.
Errors and diagnostics
11.5 Operator error
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 113
11.5
Operator error
When do operator errors occur?
Operator errors occur if you operate the module incorrectly by specifying the wrong control
signals.
Where are operator errors indicated?
FC CNT_CTRL enters the operator error numbers in DB1. You can access this data word via
the variable name "OT_ERR_B" in your program.
Which operator errors exist?
The table below shows the possible numbers of operator errors and their meaning.
Table 11- 4 Operator error numbers and their meaning
Error code
Meaning
0
No fault
1
Mode cannot be started using the SW gate.
2
Mode cannot be aborted.
4
Permitted only if OD is active
How are operator errors acknowledged?
Acknowledge the error with parameter OT_ERR_A in DB 1.
Errors and diagnostics
11.5 Operator error
Counter module FM 450-1
114 Manual, 02/2014, A5E03648739-02
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 115
Technical Data
12
12.1
General technical specifications
These general technical specifications are described in the manual /3/:
Standards and certifications
Electromagnetic compatibility
Shipping and storage conditions
Mechanical and climatic environment conditions
Specifications for insulation tests, safety class, and degree of protection
Design Guidelines
SIMATIC products meet the requirements if you observe the design guidelines described in
the manuals when installing and operating the equipment.
Technical Data
12.2 Technical Data
Counter module FM 450-1
116 Manual, 02/2014, A5E03648739-02
12.2
Technical Data
Technical data
Dimensions and Weight
Dimensions WxHxD (mm)
Weight
25x290x210
Approx. 650 g
Voltages, currents, potentials
Auxiliary voltage 1L+/1M
24 VDC
Range, static 20.4 ... 28.8 V
Range, dynamic 18.5 ... 30.2 V
Reverse polarity protection Yes
2L+/2M load voltage
24 VDC
Range, static 20.4 ... 28.8 V
Range, dynamic 18.5 ... 30.2 V
Reverse polarity protection Yes
Electrical isolation Yes, toward all other voltages
5 V encoder power supply
Output voltage 5.2 V ± 2%
Output current Maximum 300 mA per count channel, short-circuit proof
24 V encoder power supply
Output voltage 1L+ - 3 V
Output current Maximum 300 mA per count channel, short-circuit proof
Non-periodic overvoltage Value: 35 V
Duration: 500 ms
Recovery time: 50 s
Current consumption
From the backplane bus 5 V DC, max. Approx. 300 mA
From load voltage 1L+ (no load), max. Approx. 50 mA
From load voltage 2L+ (no load), max. Approx. 60 μA
Power loss of the module
Approx. 6 W
Technical Data
12.2 Technical Data
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 117
Status, interrupts, diagnostics
Status display
Yes, 14 green LEDs for status of CR, DIR, inputs and outputs
Interrupts
Hardware interrupt Yes, configurable
Diagnostic interrupt Yes, configurable
Diagnostics functions
Yes
Fault indication for internal and external faults Yes, 2 red LEDs
Reading diagnostics information Yes
Data to the count signals and the digital inputs and outputs (applies to both counters)
Counter inputs 5 V (A , /A; B, /B; N, /N)
Level In compliance with RS 422
Terminating resistor approx. 220 Ohms
Differential input voltage Min. 0.5 V
Maximum count frequency 500 kHz
Electrical isolation toward S7-400 bus No
Counter inputs 24 V (A*, B*, N*)
Low Level - 30 ... + 5 V
High level + 11 ... + 30 V
Input current Typically 9 mA
Minimum pulse width (maximum count frequency) ≥ 2.5 µs (200 kHz)
≥ 25 µs (20 kHz)
(configurable)
Digital inputs
Low Level - 28.8 ... + 5 V
High level + 11 ... + 28.8 V
Input current Typically 9 mA
Minimum pulse width (maximum input frequency) ≥ 2.5 µs (200 kHz)
≥ 25 µs (20 kHz)
(configurable)
Technical Data
12.2 Technical Data
Counter module FM 450-1
118 Manual, 02/2014, A5E03648739-02
Data to the count signals and the digital inputs and outputs (applies to both counters)
Digital outputs
Supply voltage 2L+ / 2M
Electrical isolation Yes, toward all others except the digital inputs
Output voltage
High signal "1"
Low signal "0"
Min. 2L+ - 1.5 V
Max. 3 V
Switching current
Nominal value
Range
0.5 A (Res./P.D. 5W Tungsten 24VDC)
5 mA to 0.6 A
Switching time Max. 300 µs
Cutoff voltage (inductive) Limited to 2L+ -39V
Short-circuit proof Yes
Note
Other relevant data, e.g. environmental conditions, are listed in Manual /1/.
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 119
Spare parts
13
Spare parts
The table lists all the spare parts for the FM 450-1 you can order for this module either
additionally or at a later date.
Table 13- 1 Accessories and spare parts
Parts for the FM 450-1
Order number
Labeling sheet for the front connector, petrol blue
6ES7492-2AX00-0AA0
Labeling sheet for the front connector, light beige
6ES7492-2BX00-0AA0
Labeling sheet for the front connector, yellow
6ES7492-2CX00-0AA0
Labeling sheet for the front connector, red
6ES7492-2DX00-0AA0
Front connector (48-pin) with screw terminals
6ES7492-1AL00-0AA0
Front connector (48-pin) with spring-loaded terminals
6ES7492-1BL00-0AA0
Front connector (48-pin) with crimp snap-on terminals
6ES7492-1CL00-0AA0
Spare parts
Counter module FM 450-1
120 Manual, 02/2014, A5E03648739-02
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 121
References
14
Supplementary references
The table below lists all manuals to which reference is made in the present manual.
No.
Title
Order number
/1/ SIMATIC; S7-400 Automation System; Installation
(http://support.automation.siemens.com/WW/view/en/1117849)
Part of package
6ES7498-8AA04-8AA0
/2/ SIMATIC; System software for the S7-300/400 system and
standard functions
(http://support.automation.siemens.com/WW/view/en/44240604)
Part of package
6ES7810-4CA07-8AW1
/3/ SIMATIC; S7-400 Automation System S7-400 Module Data
(http://support.automation.siemens.com/WW/view/en/1117740)
References
Counter module FM 450-1
122 Manual, 02/2014, A5E03648739-02
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 123
Glossary
Asymmetrical signals
Refers to two pulse sequences, phase-shifted by 90°, and with zero mark signal where
applicable.
Configuration
Assignment of modules to racks, slots and addresses. Users configuring the hardware fill out
a configuration table in STEP 7.
Double evaluation
In this mode, the module evaluates all positive edges of the pulses at track A and B of an
incremental encoder.
Encoders
Encoders are used to for the precise recording of rectangular signals reflecting distances,
positions, velocity, speed, dimensions, etc.
Encoders with asymmetrical output signals
These encoders return two differential pulse sequences with 90° phase-shift, including a
zero mark signal where applicable.
Encoders with symmetrical output signals
These encoders return two differential pulse sequences with 90° phase-shift, including
inverted signals to form a zero mark as required.
Function (FC)
According to IEC 1131-3 notations, this is a code block which does not contain static data. A
function supports the transfer of parameters in a user program. Functions are thus
particularly suitable for programming complex, recurrent functions
Function module (FM)
A module which relieves the CPU of the S7 automation system of process signal processing
tasks which are critical in time or memory-intensive. As a rule, FMs use the internal
communication bus for high-speed data exchange with the CPU. Examples of FM
applications: Counting, positioning, controlling
Glossary
Counter module FM 450-1
124 Manual, 02/2014, A5E03648739-02
Incremental encoder
Incremental encoders are used to record distance, position, velocity, speed or weight units
by counting small increments.
Increments per encoder revolution
Defines the number of increments the encoder outputs per revolution.
OD
The "output disable" (OD) signal is used in STOP and HOLD state to force all modules of an
S7 automation system to safe state. A safe state could be: all outputs are shut off, or
supplied with a substitution value.
Power control
The power control unit controls the motor; its simplest form is a contactor relay circuit.
Proximity switch
A simple BERO switch, without directional information. The device returns only a single
count signal. The counter records only the positive edges at signal A. The count direction is
user-specific.
Pulse duration
The pulse duration setting defines the minimum on time of an output.
Push-pull
Push-pull output of an encoder; supplies an active low signal to 0 V (ground) and an active
high signal to +24 V.
Quadruple evaluation
In this mode, the module evaluates all pulse edges at the tracks A and B of an incremental
encoder.
SFC
An SFC (system function) is an integrated function of the CPU operating system. The SFC
can be called in the STEP 7 user program as required.
Single evaluation
Refers to a the evaluation of positive edges of the pulses at track A of an incremental
encoder.
Glossary
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 125
Sinking output
Encoder output which returns an active low signal to 0 V (ground)
Sourcing output
Sourcing output of the encoder which returns an active high signal +24 V.
STOP
STOP as an international term, for example, as an operating command.
STOPP
STOPP (German spelling) as a term used in the manual to define an action which is not a
command.
Zero mark
The zero mark is positioned on the third track of an incremental encoder. It returns a zero
mark signal after each rotation.
Zero mark signal
The incremental encoder returns one zero mark signal per revolution.
Glossary
Counter module FM 450-1
126 Manual, 02/2014, A5E03648739-02
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 127
Index
0
0 to +32 bit counting range, 75
2
24 V encoder signals, 32
Input filter, 33
24 VDC encoder power supply, 32
24-V encoder signals, 97
Input filter, 11
Input filters, 99
5
5-V encoder signals, 95, 99
A
Auxiliary voltage 1L+, 1M, 31
B
Basic parameter assignment, 67
Behavior of the digital outputs
Boundary conditions, 78
C
Check list
mechanical installation, 56
Parameter assignment, 59
Command
Open and close gate,
Set counter,
commands
specifying, 68
Commands, 67
Comparison value, 10, 19, 76
Continuous counting, 20
Control bits, 68
count limits, 19
Count range, 19, 75
Count range -31 to +31 bit, 75
D
Data error, 112
Diagnostic data record DS0
Assignment, 110
Diagnostic data record DS1
Assignment, 111
Diagnostic interrupt, 109
Enabling, 109
OB 82, 109
Diagnostics interrupt, 108
Digital input I0
Status, 81
Digital input I1
Status, 81
Digital input modules, 116
Digital inputs, 33
Input filters, 33
digital outputs
Behavior, 77
Disable, 78
Enabling, 76
Status, 76
Digital outputs, 34
Double evaluation, 101
E
ENSET_DN, 85
ENSET_UP, 85
External faults, 108
F
FC CNT_CTRL, 46
Example, 51
Parameters, 48
FC DIAG_INF, 50
FCs
Technical Specifications, 53
FM 450-1
in the S7-400 layout, 17
Overview of commands, 67
Overview of operating modes, 66
Settings overview, 66
Front connectors, 14
Index
Counter module FM 450-1
128 Manual, 02/2014, A5E03648739-02
Terminal assignment, 28
G
Gate stop function, 72, 74, 82
H
Hardware gate, 22
Hardware interrupt, 10, 90
Enabling, 90
Initiating, 90
OB 40, 91
HW gate
Edge controlled opening and closing of, 81
Level controlled opening and closing of, 80
Status, 81
Hysteresis, 11
I
Infinite count mode, 69
Input delay, 33
Input filters, 33
Internal faults, 108
L
Labeling strips, 15
LEDs
Meaning, 14
Load value, 10, 19, 83
M
Main field of application, 12
modes
Selecting, 68
Multiple counting, 21
O
OB 40, 91
OB 4x
Start information, 91
OB82, 109
Open and close SW gate, 69, 71, 73
Opening and closing hardware gate, 74
Operating modes, 66
Operator error, 113
Order number, 13
P
parameter assignment screen forms
Integrated help function, 43
Parameter assignment screen forms
Calling, 43
Installing, 42
Periodic counting mode, 73
Pulse duration
Default value, 79
Value range, 79
Q
Q0 see digital outputs, 34
Q1 see digital outputs, 34
Quadruple evaluation, 101
R
README file, 43
RESET status, 39
S
Select gate function, 69, 71, 73
SET, 83
SET see digital inputs, 33
Setting
Behavior of the digital outputs, 76
Count range,
Pulse duration,
Setting the counter
Via the user program, 83
With an external signal, 84
With digital input I2, 85
With the zero mark, 87
settings
Selecting, 68
Settings, 66
Single count mode, 71
Single counting, 20
Single evaluation, 100
Start addresses, 24
START see digital inputs, 33
Startup characteristics, 49
Status bits, 68
Index
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02 129
STOP see digital inputs, 33
Supply
of encoders, 31
SW gate
Opening and closing the, 82
Status, 82
Symmetrical encoders, 95
V
VDC 5.2 encoder power supply, 32
Version, 13
View of module, 13
Z
Zero crossing, 75
Index
Counter module FM 450-1
130 Manual, 02/2014, A5E03648739-02