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.
Qualified Personnel
personnel qualified
Proper use of Siemens products
WARNING
Siemens products may only be used for the applications described in the catalog and in the relevant technical
maintenance are required to ensure that the products operate safely and without any problems. The permissible
ambient conditions must be complied with. The information in the relevant documentation must be observed.
Trademarks
Disclaimer of Liability
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.
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.
The product/system described in this documentation may be operated only by
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.
Note the following:
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
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.
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.
for the specific
01/2018 Subject to change
Preface
Purpose of the documentation
Basic knowledge required
Validity of the documentation
This documentation supports you in configuring and programming modules for counting and
measurement tasks of the S7-1500, ET 200MP and ET 200SP, as well as in position
feedback and position input.
The following knowledge is required in order to understand the documentation:
● General knowledge of automation technology
● Knowledge of the industrial automation system SIMATIC
● Knowledge about the use of Windows-based computers
● Proficiency with STEP 7
This documentation applies to the use of the following modules:
● S7-1500 modules
– TM Count 2x24V
– TM PosInput 2
– TM Timer DIDQ 16x24V
– CPU 1511C-1 PN
– CPU 1512C-1 PN
– DI 32x24VDC HF (as of firmware version V2.1.0)
– DI 16x24VDC HF (as of firmware version V2.1.0)
● ET 200SP modules
– TM Count 1x24V
– TM PosInput 1
– TM Timer DIDQ 10x24V
– DI 8x24VDC HS
TM Count, TM PosInput and compact CPU are suitable for complex counting and measuring
tasks and for position detection. TM Timer DIDQ and digital input modules are suitable for
simple counting tasks.
Counting, measurement and position detection
Function Manual, 12/2017, A5E32009889-AG
3
Preface
Conventions
Note
The notes contain important information on the product described in the documentation, on
the ha
should be paid.
Additional assistance
Please observe notes marked as follows:
ndling of the product or on part of the documentation to which particular attention
● You can find information about the technical support offerings in the appendix Service &
Support (Page 199).
● The range of technical documentation for the individual SIMATIC products and
automation systems is available on the Internet
(http://www.siemens.com/simatic-tech-doku-portal).
● The online catalog and the ordering system are available on the Internet
(https://mall.industry.siemens.com).
4 Using the SSI_Absolute_Encoder technology object ............................................................................ 136
5 Using the module ................................................................................................................................ 169
3.7 Commissioning the High_Speed_Counter ............................................................................ 132
3.7.1 Commissioning the technology object .................................................................................. 132
5.1.4.1 Displaying and evaluating diagnostics .................................................................................. 183
5.1.5 Control and feedback interface (TM Count, TM PosInput) ................................................... 185
5.1.5.1 Assignment of the control interface ...................................................................................... 185
5.1.5.2 Assignment of the feedback interface ................................................................................... 188
Counting, measurement and position detection
Function Manual, 12/2017, A5E32009889-AG
7
Table of contents
A Service & Support ................................................................................................................................ 199
Index ................................................................................................................................................... 202
5.2 Using the digital input module .............................................................................................. 192
5.2.1 Configuring and assigning parameters to the module ......................................................... 192
5.2.1.1 Adding a module to the hardware configuration .................................................................. 192
5.2.1.2 Open hardware configuration ............................................................................................... 192
5.2.2.1 Displaying and evaluating diagnostics ................................................................................. 198
Counting, measurement and position detection
8Function Manual, 12/2017, A5E32009889-AG
1
Basic information
Device information
The documentation for the SIMATIC S7-1500 automation system, for CPU 1516pro-2 PN
based on SIMATIC S7-1500, and for the distributed I/O systems SIMATIC ET 200MP,
ET 200SP and ET 200AL is divided into three areas.
This division allows you easier access to the specific information you require.
System manuals and Getting Started manuals describe in detail the configuration,
installation, wiring and commissioning of the SIMATIC S7-1500, ET 200MP, ET 200SP and
ET 200AL systems; use the corresponding operating instructions for CPU 1516pro-2 PN.
The STEP 7 online help supports you in configuration and programming.
Product manuals contain a compact description of the module-specific information, such as
properties, terminal diagrams, characteristics and technical specifications.
Counting, measurement and position detection
Function Manual, 12/2017, A5E32009889-AG
9
Documentation guide
General information
Manual Collections
"mySupport"
"mySupport" - Documentation
The function manuals contain detailed descriptions on general topics such as diagnostics,
communication, Motion Control, Web server, OPC UA.
You can download the documentation free of charge from the Internet
(http://w3.siemens.com/mcms/industrial-automation-systems-simatic/en/manual-
overview/Pages/Default.aspx).
Changes and additions to the manuals are documented in product information sheets.
You will find the product information on the Internet:
● ET 200SP (https://support.industry.siemens.com/cs/ww/en/view/84133942)
● ET 200AL (https://support.industry.siemens.com/cs/ww/en/view/95242965)
With "mySupport", your personal workspace, you make the best out of your Industry Online
Support.
In "mySupport", you can save filters, favorites and tags, request CAx data and compile your
personal library in the Documentation area. In addition, your data is already filled out in
support requests and you can get an overview of your current requests at any time.
You must register once to use the full functionality of "mySupport".
You can find "mySupport" on the Internet (https://support.industry.siemens.com/My/ww/en).
In the Documentation area in "mySupport" you can combine entire manuals or only parts of
these to your own manual.
You can export the manual as PDF file or in a format that can be edited later.
You can find "mySupport" - Documentation on the Internet
(http://support.industry.siemens.com/My/ww/en/documentation).
Counting, measurement and position detection
10Function Manual, 12/2017, A5E32009889-AG
Documentation guide
"mySupport" - CAx data
Application examples
TIA Selection Tool
In the CAx data area in "mySupport", you can access the current product data for your CAx
or CAe system.
You configure your own download package with a few clicks.
You can find "mySupport" - CAx data on the Internet
(http://support.industry.siemens.com/my/ww/en/CAxOnline).
The application examples support you with various tools and examples for solving your
automation tasks. Solutions are shown in interplay with multiple components in the system separated from the focus on individual products.
You will find the application examples on the Internet
(https://support.industry.siemens.com/sc/ww/en/sc/2054).
With the TIA Selection Tool, you can select, configure and order devices for Totally
Integrated Automation (TIA).
This tool is the successor of the SIMATIC Selection Tool and combines the known
configurators for automation technology into one tool.
With the TIA Selection Tool, you can generate a complete order list from your product
selection or product configuration.
You can find the TIA Selection Tool on the Internet
(http://w3.siemens.com/mcms/topics/en/simatic/tia-selection-tool).
Counting, measurement and position detection
Function Manual, 12/2017, A5E32009889-AG
11
Documentation guide
SIMATIC Automation Tool
PRONETA
You can use the SIMATIC Automation Tool to run commissioning and maintenance activities
simultaneously on different SIMATIC S7 stations as a bulk operation, independently of the
TIA Portal.
The SIMATIC automation tool provides a variety of functions:
● Scanning of a PROFINET/Ethernet plant network and identification of all connected
CPUs
● Address assignment (IP, subnet, gateway) and station name (PROFINET device) to a
CPU
● Transfer of the date and programming device/PC time converted to UTC time to the
module
● Program download to CPU
● Operating mode switchover RUN/STOP
● CPU localization by means of LED flashing
● Reading out CPU error information
● Reading of CPU diagnostic buffer
● Reset to factory settings
● Updating the firmware of the CPU and connected modules
You can find the SIMATIC Automation Tool on the Internet
(https://support.industry.siemens.com/cs/ww/en/view/98161300).
With SIEMENS PRONETA (PROFINET network analysis), you analyze the plant network
during commissioning. PRONETA features two core functions:
● The topology overview independently scans PROFINET and all connected components.
● The IO check is a fast test of the wiring and the module configuration of a plant.
You can find SIEMENS PRONETA on the Internet
(https://support.industry.siemens.com/cs/ww/en/view/67460624).
Counting, measurement and position detection
12Function Manual, 12/2017, A5E32009889-AG
Documentation guide
SINETPLAN
SINETPLAN, the Siemens Network Planner, supports you in planning automation systems
and networks based on PROFINET. The tool facilitates professional and predictive
dimensioning of your PROFINET installation as early as in the planning stage. In addition,
SINETPLAN supports you during network optimization and helps you to exploit network
resources optimally and to plan reserves. This helps to prevent problems in commissioning
or failures during productive operation even in advance of a planned operation. This
increases the availability of the production plant and helps improve operational safety.
The advantages at a glance
● Network optimization thanks to port-specific calculation of the network load
● Increased production availability thanks to online scan and verification of existing systems
● Transparency before commissioning through importing and simulation of existing STEP 7
projects
● Efficiency through securing existing investments in the long term and optimal exploitation
of resources
You can find SINETPLAN on the Internet (https://www.siemens.com/sinetplan).
Counting, measurement and position detection
Function Manual, 12/2017, A5E32009889-AG
13
detection
2
2.1
Overview of modules and properties
Modules for the S7-1500 and ET 200MP systems
Property
S7-1500 / ET 200MP
Technology module
Digital input mod-
ule
Compact CPU
TM Count 2x24V
TM PosInput 2
TM Timer DIDQ
16x24V
DI 32x24VDC HF,
DI 16x24VDC HF
CPU 1511C-1
PN,
CPU 1512C-1 PN
ed/deactivated
frequency
(Page 72)
range
(Page 24)
connection
connection
(Page 71) connection
(Page 66)
The table below summarizes the performance features of the modules for counting,
measuring and position input for the S7-1500 and ET 200MP systems.
Number of counters 2 2 41 2 6
Use of counters can
be activat-
Maximum signal
Maximum count frequency for incremental encoders with
quadruple evaluation
Maximum counting
Maximum position
value range
RS422/TTL incremental and pulse
encoder (Page 69)
The basics of counting, measurement and position detection
Property
S7-1500 / ET 200MP
Technology module
Digital input mod-
ule
Compact CPU
TM Count 2x24V
TM PosInput 2
TM Timer DIDQ
16x24V
DI 32x24VDC HF,
DI 16x24VDC HF
CPU 1511C-1
PN,
CPU 1512C-1 PN
5 V encoder supply
— X — — —
24 V encoder supply
X X X — X
counter
counter
counter
Hysteresis (Page 62)
X X — — X
Software gate
X (Page 27)
X (Page 27)
—
X (Page 85)
X (Page 27)
Hardware gate
X (Page 27)
X (Page 27)
—
—
X (Page 27)
(Latch) (Page 30)
(Page 35)
Comparison functions
X (Page 43)
X (Page 43)
—
X (Page 87)
X (Page 43)
(Page 54)
PROFINET
signals
support
digital inputs
1
ter. Other channel configurations do not allow any counter use.
2.1 Overview of modules and properties
Number of additional
digital inputs per
Number of physical
digital outputs per
Number of logical
digital outputs per
Capture function
Synchronization
Frequency, velocity
and period duration
measurement
Support for isochronous mode on
3 2 — — 2
2 2 — — 1
2 2 — 1 2
X X — — X
X X — — X
X X — — X
X (Page 75) X (Page 75) X (Page 80) X (Page 91) —
Support for diagnostic
X (Page 66) X (Page 66) — — X (Page 66)
interrupts for sensor
Hardware interrupt
Configurable filter for
X (Page 66) X (Page 66) — X (Page 90) X (Page 66)
X X — X X
count signals and
The number of available counters is dependent on the channel configuration. In order to use four counters, you must
choose the use of eight inputs in the channel configuration. If you choose the use of three inputs, you can use one coun-
Counting, measurement and position detection
Function Manual, 12/2017, A5E32009889-AG
15
The basics of counting, measurement and position detection
Modules for the ET 200SP system
Property
ET 200SP
Technology module
Digital input module
TM Count 1x24V
TM PosInput 1
TM Timer DIDQ
10x24V
DI 8x24VDC HS
Number of counters
1 1 31
4
Maximum signal frequency
200 kHz
1 MHz
50 kHz
10 kHz
quadruple evaluation (Page 72)
Maximum counting range
32 bits (Page 22)
32 bits (Page 22)
32 bits (Page 77)
32 bits (Page 82)
(Page 24)
nection
connection
24 V pulse encoder connection
X (Page 67)
—
X (Page 79)
X (Page 90)
(Page 71) connection
trol (Page 66)
5 V encoder supply
— — —
—
24 V encoder supply
X X X
X
inputs per counter
puts per counter
Hysteresis X X — —
Software gate
X (Page 27)
X (Page 27)
—
X (Page 85)
Hardware gate
X (Page 27)
X (Page 27)
—
X (Page 85)
(Page 30)
Synchronization (Page 35)
X X —
—
Comparison functions
X (Page 43)
X (Page 43)
—
X (Page 87)
(Page 54)
2.1 Overview of modules and properties
The following table provides an overview of the performance features of the modules for
counting, measuring and position input for the ET 200SP system.
Use of counters can be activated/deactivated
Maximum count frequency for
incremental encoders with
Maximum position value range
RS422/TTL incremental and
pulse encoder (Page 69) con-
24 V incremental encoder
SSI absolute encoder
Position input for Motion Con-
Number of additional digital
— — X X
800 kHz 4 MHz 200 kHz —
— 31 bits — —
— X — —
X (Page 67) — X (Page 79) —
— X — —
X X — —
3 2 — 1
Number of physical digital
outputs per counter
Number of logical digital out-
Capture function (Latch)
Frequency, velocity and period
duration measurement
Counting, measurement and position detection
16Function Manual, 12/2017, A5E32009889-AG
2 2 — —
2 2 — 1
X X — —
X X — —
The basics of counting, measurement and position detection
Property
ET 200SP
Technology module
Digital input module
TM Count 1x24V
TM PosInput 1
TM Timer DIDQ
10x24V
DI 8x24VDC HS
on PROFINET
Hardware interrupt support
X (Page 66)
X (Page 66)
—
—
signals and digital inputs
1
One counter for incremental encoder (A, B phase-shifted) and two counters for pulse encoder
2.1 Overview of modules and properties
Support for isochronous mode
Support for diagnostic interrupts for sensor signals
Configurable filter for count
X (Page 75) X (Page 75) X (Page 80) X (Page 91)
X (Page 66) X (Page 66) — —
X X — X
Counting, measurement and position detection
Function Manual, 12/2017, A5E32009889-AG
17
The basics of counting, measurement and position detection
2.2
Basics of counting, measuring and position input (TM Count,
TM PosInput, Compact CPU)
2.2.1
Convention
Technology module
2.2.2
Overview of applications
Introduction
System environment for TM Count and TM PosInput
Application scenarios
Components required
Configuration software
In the user program
object
2.2 Basics of counting, measuring and position input (TM Count, TM PosInput, Compact CPU)
: We use the term "technology module" in this documentation both for the
technology modules TM Count and TM PosInput and the technology component of the
compact CPUs.
The technology module is configured and assigned parameters using the configuration
software.
The technology module functions are controlled and monitored via the user program.
The technology modules can be used in the following system environments:
Central operation with a
S7-1500 CPU or ET 200SP
CPU
• S7-1500 Automation
System or ET 200SP Distributed I/O System
• Technology module
STEP 7 (TIA Portal):
Operating with "Counting
and measurement" technology object
• Device configuration with
hardware configuration
• Parameter setting with
technology object
Counting and measurement
functions:
High_Speed_Counter instruction for the technology
object
Position input with SSI absolute encoder:
SSI_Absolute_Encoder instruction for the technology
Counting, measurement and position detection
18Function Manual, 12/2017, A5E32009889-AG
STEP 7 (TIA Portal):
Position input for "Mo-
tion Control" technology
object
• Device configuration with
hardware configuration
• Parameter setting with
axis technology object
Instructions for "Motion Control" technology object
The basics of counting, measurement and position detection
Application scenarios
Components required
Configuration software
In the user program
object
parameter settings with HSP
2.2 Basics of counting, measuring and position input (TM Count, TM PosInput, Compact CPU)
Central operation with a
S7-1500 CPU or ET 200SP
CPU
Distributed operation with a
S7-1500 CPU
Distributed operation with a
CPU S7-300/400 or S7-1200
• S7-1500 automation
system
• ET 200 distributed I/O
system
• Technology module
• S7-300/400 automation
system
• ET 200 distributed I/O
system
• Technology module
STEP 7 (TIA Portal):
Manual operation (without
technology object)
• Device configuration and
parameter setting with
hardware configuration
STEP 7 (TIA Portal):
Operating with "Counting
and measurement" technology object
• Device configuration with
hardware configuration
• Parameter setting with
technology object
STEP 7 (TIA Portal):
Position input for "Mo-
tion Control" technology
object
• Device configuration with
hardware configuration
• Parameter setting with
axis technology object
STEP 7 (TIA Portal):
Manual operation (without
technology object)
• Device configuration and
parameter setting with
hardware configuration
STEP 7 (TIA Portal):
Device configuration and
parameter setting with hardware configuration
STEP 7:
Device configuration and
Direct access to control and
feedback interface of the
technology module in the I/O
data
Counting and measuring
functions:
High_Speed_Counter instruction for the technology
object
Position input with SSI absolute encoder:
SSI_Absolute_Encoder instruction for the technology
Instructions for "Motion Control" technology object
Direct access to technology
module control and feedback
interface in the I/O data
Direct access to technology
module control and feedback
interface in the I/O data
Distributed operation in a
third-party system
Counting, measurement and position detection
Function Manual, 12/2017, A5E32009889-AG
• Third-party automation
system
• ET 200 distributed I/O
system
• Technology module
Third-party configuration
software:
Device configuration and
parameter settings with GSD
file
Direct access to technology
module control and feedback
interface in the I/O data
19
The basics of counting, measurement and position detection
System environment for a Compact CPU
Application scenarios
Components required
Configuration software
In the user program
Parameter assignment options
2.2 Basics of counting, measuring and position input (TM Count, TM PosInput, Compact CPU)
The Compact CPUs can be used in the following system environments:
Central operation with a
S7-1500 Compact CPU
• S7-1500 automation
system
• Compact CPU
STEP 7 (TIA Portal):
Operating with "Counting
and measurement" technology object
• Device configuration with
hardware configuration
• Parameter settings with
High_Speed_Counter
technology object
STEP 7 (TIA Portal):
Position input for "Mo-
tion Control" technology
object
• Device configuration with
hardware configuration
• Parameter setting with
axis technology object
STEP 7 (TIA Portal):
Manual operation (without
technology object)
• Device configuration and
parameter setting with
hardware configuration
Counting and measuring
functions:
High_Speed_Counter instruction for the technology
object
Instructions for "Motion Control" technology object
Direct access to control and
feedback interface of the
technology module in the I/O
data
In an S7-1500 system, you have two options for parameter assignment and control of
technology module functions:
● Configuration using the technology object and control using the associated instruction
Access to the control and feedback interface of the technology module takes place
through the technology object.
● Parameter setting via hardware configuration
The control and feedback interface of the technology module is accessed using direct
access to the I/O data.
Counting, measurement and position detection
20Function Manual, 12/2017, A5E32009889-AG
2.2 Basics of counting, measuring and position input (TM Count, TM PosInput, Compact CPU)
Configuration via technology object
Parameter setting via hardware configuration
For central and distributed use, we recommend the convenient, graphics-assisted
configuration using a technology object. A detailed description of this configuration can be
found starting from section High_Speed_Counter technology object (Page 92).
You specify the "Operation with technology object "Counting and measuring"" in the device
configuration of the technology module: see section Operating mode (Page 174).
You can assign the technology module and counting channel in the basic parameters of the
technology object: see section Basic parameters (Page 98).
You specify the "Manual operation (without technology object)" in the device configuration of
the technology module: see section Operating mode (Page 174).
Additional support for parameter setting via hardware configuration is available in the
context-sensitive help for the parameters in STEP 7 (TIA Portal). A description of the control
and feedback interface is available in the following sections:
The basics of counting, measurement and position detection
Assignment of the control interface (Page 185)
Assignment of the feedback interface (Page 188)
Counting, measurement and position detection
Function Manual, 12/2017, A5E32009889-AG
21
The basics of counting, measurement and position detection
2.2.3
Recording of count signals
2.2.3.1
Counting with incremental or pulse encoder
Counter limits
Start value
Gate control
2.2 Basics of counting, measuring and position input (TM Count, TM PosInput, Compact CPU)
Counting refers to the recording and adding up of events. The counters of the technology
modules capture and evaluate pulse and incremental signals. The count direction can be
specified using encoder or pulse signals or through the user program.
You can control counting processes using the digital inputs of the technology module. You
can switch the digital outputs exactly at defined counter values, regardless of the user
program.
You can configure the response of the counters using the functionalities described below.
The counter limits define the counter value range used. The counter limits are configurable
and can be modified during runtime using the user program.
The highest counter limit that can be set is 2147483647 (2
can be set is –2147483648 (–2
You can configure the response of the counter at the counter limits:
● Continue or stop counting upon violation of a counter limit (automatic gate stop)
● Set counter value to start value or to opposite counter limit upon violation of a counter
limit
31
).
31
–1). The lowest counter limit that
You can configure a start value within the counter limits. The start value can be modified
during runtime by the user program.
The technology module can, as configured, set the current counter value to the start value
upon synchronization, upon Capture function activation, upon violation of a counter limit or
when the gate is opened.
Opening and closing the hardware gate and software gate defines the period of time during
which the counting signals are captured.
The hardware gate is controlled externally via a digital input of the technology module. The
software gate is controlled via the user program. The hardware gate can be enabled through
parameter assignment. The software gate (bit in the control interface of the cyclic I/O data)
cannot be disabled.
Counting, measurement and position detection
22Function Manual, 12/2017, A5E32009889-AG
The basics of counting, measurement and position detection
Capture (Latch)
Synchronization
Hysteresis
2.2 Basics of counting, measuring and position input (TM Count, TM PosInput, Compact CPU)
You can configure an external reference signal edge that triggers the saving of the current
counter value or position value as a Capture value. The following external signals can trigger
the Capture function:
● Rising or falling edge of a digital input
● Both edges of a digital input
● Rising edge of the N signal at the encoder input
When using a digital input, you can specify whether counting is to continue from the current
counter value or from the start value after the Capture function.
You can configure an external reference signal edge to load the counter with the specified
start value. The following external signals can load the counter with the start value:
● Rising or falling edge of a digital input
● Rising edge of signal N at the encoder input
● Rising edge of signal N at the encoder input depending on the level of the assigned
digital input
You can specify hysteresis for the comparison values, within which a digital output is
prevented from switching again. An encoder can come to a standstill at a specific position,
and slight movements may make the counter value fluctuate around this position. If a
comparison value or a counting limit lies within this fluctuation range, the corresponding
digital output will be switched on and off with corresponding frequency if hysteresis is not
used. The hysteresis prevents these unwanted switching operations.
Counting, measurement and position detection
Function Manual, 12/2017, A5E32009889-AG
23
The basics of counting, measurement and position detection
2.2.3.2
Position input with SSI absolute encoder
Description
Gray-dual conversion
Capture (Latch)
Hysteresis
Range for position value
Complete SSI frame
2.2 Basics of counting, measuring and position input (TM Count, TM PosInput, Compact CPU)
You can use the TM PosInput technology modules with an SSI absolute encoder for position
detection. The technology module reads the position value via a synchronous serial interface
from the SSI absolute encoder and makes it available to the controller.
You can switch the digital outputs of the technology module exactly at defined position
values, regardless of the user program. Position input with an SSI absolute encoder does not
involve gate control. Due to system constraints, synchronization is not possible with an SSI
absolute encoder.
Gray-code and dual-code SSI absolute encoders are supported.
You can configure one or both edges of a digital input that triggers a saving of the current
position value as Capture value.
You can specify hysteresis for the comparison values, within which a digital output is
prevented from switching again. An encoder can come to a standstill at a specific position,
and slight movements may make the position value fluctuate around this position. If a
comparison value or a limit lies within this fluctuation range, the corresponding digital output
is switched on and off with corresponding frequency if hysteresis is not used. The hysteresis
prevents these unwanted switching operations.
You can specify a frame length of 10 bits to 40 bits for the SSI absolute encoder. The
configurable bit numbers of the LSB and the MSB of the position value in the frame define
the value range. The technology module can read a position value with a maximum length
of31 bits and communicate it to the controller. The position value is treated as unsigned
positive value and can assume values between 0" and "2
Instead of having a measured variable returned, you can choose to have the least significant
32 bits of the current unprocessed SSI frame returned. This provides you with encoderspecific additional bits, such as error bits, in addition to the position value. If the SSI frame is
shorter than 32 bits, the complete SSI frame is returned right-aligned and the top unused bits
are returned with "0" in the feedback interface.
(MSB-LSB+1)-1
".
Counting, measurement and position detection
24Function Manual, 12/2017, A5E32009889-AG
The basics of counting, measurement and position detection
2.2.4
Behavior at the counting limits
Violation of a counting limit
Counting limit violated
Status bit
High counting limit
EVENT_OFLW is set
Note
The high counting limit and the start value define the value range of the counter:
Value range of the counter = (high limit
Examples
2.2 Basics of counting, measuring and position input (TM Count, TM PosInput, Compact CPU)
The high counting limit is violated when the current counter value is equal to the high
counting limit and another upward count pulse is received. The counter low limit is violated
when the current counter value is equal to the counter low limit and another downward count
pulse is received.
The appropriate status bit is set in the feedback interface in the event of limit violation:
Low counting limit EVENT_UFLW is set
You can reset the status bits with RES_EVENT .
You can configure whether or not and from which counter value counting is to continue
following counting limit violation.
– start value) + 1
The figure below shows an example for terminating the counting process (automatic gate
stop) after an overflow and setting the counter to the start value:
Counting, measurement and position detection
Function Manual, 12/2017, A5E32009889-AG
25
The basics of counting, measurement and position detection
2.2 Basics of counting, measuring and position input (TM Count, TM PosInput, Compact CPU)
The figure below shows an example for continuing the counting process after an overflow
and setting the counter to the start value:
The figure below shows an example for terminating counting after an overflow and setting
the counter to the opposite counting limit:
The figure below shows an example for continuing the counting process after an overflow
and setting the counter to the opposite counting limit:
Counting, measurement and position detection
26Function Manual, 12/2017, A5E32009889-AG
The basics of counting, measurement and position detection
2.2.5
Gate control with incremental or pulse encoder
2.2.5.1
Software gate
2.2.5.2
Hardware gate
Note
The configured input filters delay the
Level-triggered opening and closing of the hardware gate with a digital input
2.2 Basics of counting, measuring and position input (TM Count, TM PosInput, Compact CPU)
Many applications require counting processes to be started or stopped in accordance with
other events. In such cases, counting is started and stopped using the gate function.
The technology modules have two gates for each channel. These define the resulting
internal gate:
● Software gate
● Hardware gate
The software gate of the channel is opened and closed with the control bit (Page 185)
SW_GATE. The status of the software gate is indicated by the feedback bit (Page 188)
STS_SW_GATE .
The hardware gate is optional. You open and close the hardware gate by means of signals
at the configured digital inputs of the channel.
control signal of the digital input.
The status of a DIm digital input is indicated by the respective feedback bit (Page 188)
STS_DIm .
The figure below shows an example of level-triggered opening and closing with a digital
input. The digital input is configured to be active with high level:
As long as the digital input is active, the hardware gate is open and the count pulses are
counted. The hardware gate is closed when the digital input becomes inactive. The counter
value stays constant and ignores any further count pulses.
Counting, measurement and position detection
Function Manual, 12/2017, A5E32009889-AG
27
The basics of counting, measurement and position detection
Edge-triggered opening and closing of the hardware gate with two digital inputs
2.2.5.3
Internal gate
Internal gate
Hardware gate
Software gate
Internal gate
Open/not configured
open
open
Open/not configured
closed
closed
closed
open
closed
2.2 Basics of counting, measuring and position input (TM Count, TM PosInput, Compact CPU)
The figure below shows an example of opening and closing with two digital inputs. The two
digital inputs are configured so that the rising edge of the hardware gate opens:
The hardware gate is opened with the configured edge at the digital input that is configured
for opening. The hardware gate is closed with the configured edge at the digital input that is
configured for closing.
The internal gate is open if the software gate is open and the hardware gate is open or has
not been configured. The status of the internal gate is indicated by the feedback bit
(Page 188) STS_GATE.
If the internal gate is open, counting is started. If the internal gate is closed, all other count
pulses are ignored and counting is stopped.
If you want to control a counting process with the hardware gate only, the software gate must
be open. If you do not configure a hardware gate, the hardware gate is considered to be
always open. In this case, you open and close the internal gate with the software gate only.
closed closed closed
When you configure the counter behavior, you can specify whether the counting process is
to start from the start value or from the current counter value when the internal gate is
opened.
Counting, measurement and position detection
28Function Manual, 12/2017, A5E32009889-AG
The internal gate can also be automatically closed upon violation of a counting limit. The
software or hardware gate must then be closed and reopened to continue counting.
The basics of counting, measurement and position detection
2.2.5.4
Counter behavior at gate start
Setting counter to start value
Continuing with the current counter value
2.2 Basics of counting, measuring and position input (TM Count, TM PosInput, Compact CPU)
You have the following configuration options for counter behavior upon gate start:
● Setting counter to start value
● Continuing with the current counter value
Counter behavior is as follows for this configuration:
Each counting process starts with the start value when the internal gate is opened.
The figure below shows an example for continuing the counting process after counter is set
to the start value:
Counter behavior is as follows for this configuration:
Each counting process starts from the current counter value after the internal gate is
reopened.
The figure below shows an example for continuing the counting process with the current
counter value:
Counting, measurement and position detection
Function Manual, 12/2017, A5E32009889-AG
29
Loading...
+ 175 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.