0% found this document useful (0 votes)
11 views

Et200s Technological Functions Operating Instructions en en-US

Uploaded by

Bernabe
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Et200s Technological Functions Operating Instructions en en-US

Uploaded by

Bernabe
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 340

1

SIMATIC ET 200S Technological Functions


______________
Preface

2
______________
1Count24V/100kHz

3
SIMATIC ______________
1Count5V/500kHz

4
ET 200S ______________
1SSI

Technological Functions 5
______________
2PULSE

Operating Instructions

04/2008
A5E00124867-06
Safety Guidelines
Safety Guidelines
This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent
damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert
symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are
graded according to the degree of danger.

DANGER
indicates that death or severe personal injury will result if proper precautions are not taken.

WARNING
indicates that death or severe personal injury may result if proper precautions are not taken.

CAUTION
with a safety alert symbol, indicates that minor personal injury can result if proper precautions are not taken.

CAUTION
without a safety alert symbol, indicates that property damage can result if proper precautions are not taken.

NOTICE
indicates that an unintended result or situation can occur if the corresponding information is not taken into
account.
If more than one degree of danger is present, the warning notice representing the highest degree of danger will
be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to
property damage.

Qualified Personnel
The device/system may only be set up and used in conjunction with this documentation. Commissioning and
operation of a device/system may only be performed by qualified personnel. Within the context of the safety notes
in this documentation qualified persons are defined as persons who are authorized to commission, ground and
label devices, systems and circuits in accordance with established safety practices and standards.

Prescribed Usage
Note the following:

WARNING
This device may only be used for the applications described in the catalog or the technical description and only
in connection with devices or components from other manufacturers which have been approved or
recommended by Siemens. Correct, reliable operation of the product requires proper transport, storage,
positioning and assembly as well as careful operation and maintenance.

Trademarks
All names identified by ® are registered trademarks of the Siemens AG. The remaining trademarks in this
publication may be trademarks whose use by third parties for their own purposes could violate the rights of the
owner.

Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software
described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the
information in this publication is reviewed regularly and any necessary corrections are included in subsequent
editions.

Siemens AG A5E00124867-06 Copyright © Siemens AG 2008.


Automation and Drives Ⓟ 04/2008 Technical data subject to change
Postfach 48 48
90327 NÜRNBERG
GERMANY
Table of contents
1 Preface .................................................................................................................................................... 13
2 1Count24V/100kHz.................................................................................................................................. 15
2.1 Product Overview.........................................................................................................................15
2.2 Clocked Mode ..............................................................................................................................18
2.3 Example: Start 1Count24V/100kHz .............................................................................................19
2.4 Terminal Assignment Diagram.....................................................................................................23
2.5 Settings modes of the 1Count24V/100kHz..................................................................................24
2.6 Count Modes................................................................................................................................26
2.6.1 Overview ......................................................................................................................................26
2.6.2 Endless Counting.........................................................................................................................28
2.6.3 Once-Only Counting ....................................................................................................................30
2.6.4 Periodic Counting.........................................................................................................................33
2.6.5 Behavior of the Digital Input.........................................................................................................36
2.6.6 Gate Functions in Count Modes ..................................................................................................37
2.6.7 Latch Function .............................................................................................................................40
2.6.8 Synchronization............................................................................................................................44
2.6.9 Behavior Types of the Outputs in Count Modes ..........................................................................46
2.6.10 Assignment of the Feedback and Control Interface for the Count Modes...................................54
2.6.11 Parameter Assignment for the Count Modes...............................................................................62
2.7 Measurement Modes ...................................................................................................................64
2.7.1 Overview ......................................................................................................................................64
2.7.2 Sequence of continuous-action measurement ............................................................................65
2.7.3 Frequency Measurement .............................................................................................................69
2.7.4 Continuous Frequency Measurement..........................................................................................71
2.7.5 Rotational Speed Measurement ..................................................................................................73
2.7.6 Continuous Rotational Speed Measurement ...............................................................................75
2.7.7 Period Measurement....................................................................................................................78
2.7.8 Continuous Period Measurement ................................................................................................80
2.7.9 Gate Functions in Measurement Modes......................................................................................83
2.7.10 Behavior of the Output in Measurement Modes ..........................................................................84
2.7.11 Assignment of the Feedback and Control Interfaces for the Measurement Modes ....................86
2.7.12 Parameter Assignment for Measurement Modes ........................................................................93
2.8 Fast mode ....................................................................................................................................95
2.8.1 Overview ......................................................................................................................................95
2.8.2 Fast mode ....................................................................................................................................96
2.8.3 Gate function in the case of fast mode ........................................................................................96
2.8.4 Synchronization............................................................................................................................97
2.8.5 Assignment of feedback interface for fast mode..........................................................................98
2.8.6 Assigning parameters for fast mode ..........................................................................................100

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 3
Table of contents

2.9 Position Detection ..................................................................................................................... 101


2.9.1 Overview ................................................................................................................................... 101
2.9.2 Position Detection ..................................................................................................................... 103
2.9.3 Gate Functions for Position Detection ...................................................................................... 104
2.9.4 Latch Function........................................................................................................................... 107
2.9.5 Synchronization......................................................................................................................... 110
2.9.6 Assignment of the Feedback and Control Interface for Position Feedback.............................. 112
2.9.7 Assigning Parameters for Position Feedback ........................................................................... 118
2.10 Evaluation of count and direction signal ................................................................................... 120
2.11 Behavior at CPU-Master-STOP ................................................................................................ 123
2.12 Technical Specifications............................................................................................................ 125
3 1Count5V/500kHz.................................................................................................................................. 129
3.1 Product Overview...................................................................................................................... 129
3.2 Clocked Mode ........................................................................................................................... 132
3.3 Example: Start 1Count5V/500kHz ............................................................................................ 133
3.4 Terminal Assignment Diagram.................................................................................................. 137
3.5 Operating mode of the 1Count5V/500kHz ................................................................................ 138
3.6 Count Modes............................................................................................................................. 140
3.6.1 Overview ................................................................................................................................... 140
3.6.2 Endless Counting ...................................................................................................................... 142
3.6.3 Once-Only Counting.................................................................................................................. 144
3.6.4 Periodic Counting...................................................................................................................... 147
3.6.5 Behavior of the Digital Inputs .................................................................................................... 150
3.6.6 Gate Functions in Count Modes ............................................................................................... 150
3.6.7 Latch Function........................................................................................................................... 153
3.6.8 Synchronization......................................................................................................................... 156
3.6.9 Behavior of the Outputs in Count Modes .................................................................................. 160
3.6.10 Assignment of the Feedback and Control Interface for the Count Modes................................ 168
3.6.11 Parameter Assignment for the Count Modes............................................................................ 176
3.7 Measurement Modes ................................................................................................................ 178
3.7.1 Overview ................................................................................................................................... 178
3.7.2 Sequence of continuous-action measurement.......................................................................... 180
3.7.3 Frequency Measurement .......................................................................................................... 184
3.7.4 Continuous Frequency Measurement....................................................................................... 186
3.7.5 Rotational Speed Measurement ............................................................................................... 189
3.7.6 Continuous Rotational Speed Measurement ............................................................................ 191
3.7.7 Period Measurement................................................................................................................. 194
3.7.8 Continuous Period Measurement ............................................................................................. 196
3.7.9 Gate Functions in Measurement Modes ................................................................................... 199
3.7.10 Behavior of the Outputs in Measurement Modes ..................................................................... 200
3.7.11 Assignment of the Feedback and Control Interfaces for the Measurement Modes.................. 202
3.7.12 Parameter Assignment for Measurement Modes ..................................................................... 209
3.8 Fast mode ................................................................................................................................. 211
3.8.1 Overview ................................................................................................................................... 211
3.8.2 Fast mode ................................................................................................................................. 212
3.8.3 Gate function in the case of fast mode ..................................................................................... 212
3.8.4 Synchronization......................................................................................................................... 213
3.8.5 Assignment of feedback interface for fast mode....................................................................... 215
3.8.6 Assigning parameters for fast mode ......................................................................................... 217

Technological Functions
4 Operating Instructions, 04/2008, A5E00124867-06
Table of contents

3.9 Position feedback.......................................................................................................................218


3.9.1 Overview ....................................................................................................................................218
3.9.2 Position detection.......................................................................................................................220
3.9.3 Gate Functions for Position Detection .......................................................................................221
3.9.4 Latch Function ...........................................................................................................................224
3.9.5 Synchronization..........................................................................................................................227
3.9.6 Assignment of the Feedback and Control Interface for Position Feedback ..............................229
3.9.7 Assigning Parameters for Position Feedback............................................................................235
3.10 Evaluation of count and direction signal ....................................................................................236
3.11 Behavior at CPU-Master-STOP .................................................................................................238
3.12 Technical Specifications ............................................................................................................240
4 1SSI....................................................................................................................................................... 243
4.1 Product Overview.......................................................................................................................243
4.2 Clocked Mode ............................................................................................................................246
4.3 Example: Starting 1SSI..............................................................................................................247
4.4 Terminal Assignment Diagram...................................................................................................251
4.5 Configuring standard mode and fast mode................................................................................252
4.6 Functions of the 1SSI.................................................................................................................253
4.6.1 Overview of 1SSI functions........................................................................................................253
4.6.2 Encoder Value Detection ...........................................................................................................254
4.6.3 Gray/Binary Converter ...............................................................................................................255
4.6.4 Transmitted Encoder Value and Standardization ......................................................................256
4.6.5 Detection of Direction and Reversal of the Direction of Rotation ..............................................257
4.6.6 Comparator (Only in Standard Mode)........................................................................................258
4.6.7 Latch Function (Only in Standard Mode) ...................................................................................260
4.6.8 Error Detection in Standard Mode .............................................................................................262
4.6.9 Error Detection in Fast Mode .....................................................................................................262
4.7 Behavior at CPU-Master-STOP .................................................................................................263
4.8 Setting parameters for the 1SSI.................................................................................................264
4.9 Control and Feedback Interfaces in Standard Mode .................................................................267
4.10 Feedback Interface in Fast Mode ..............................................................................................270
4.11 Technical Specifications ............................................................................................................272

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 5
Table of contents

5 2PULSE................................................................................................................................................. 275
5.1 Product Overview...................................................................................................................... 275
5.2 Example: Starting 2PULSE ....................................................................................................... 277
5.3 Modes and Functions................................................................................................................ 280
5.3.1 Overview ................................................................................................................................... 280
5.3.2 Pulse Output Mode ................................................................................................................... 282
5.3.3 Pulse-Width Modulation Mode (PWM)...................................................................................... 287
5.3.4 Pulse Train Mode ...................................................................................................................... 294
5.3.5 On/Off-Delay Mode ................................................................................................................... 300
5.3.6 Function: Direct Control of the DO Digital Output..................................................................... 307
5.3.7 Function: Error Detection/Diagnostics ...................................................................................... 308
5.3.8 Behavior at CPU-Master-STOP ................................................................................................ 310
5.4 Application Examples................................................................................................................ 311
5.4.1 Overview ................................................................................................................................... 311
5.4.2 Example: Filling Liquids ............................................................................................................ 312
5.4.3 Example: Heating a Liquid ........................................................................................................ 316
5.4.4 Example: Packing Piece Goods................................................................................................ 321
5.4.5 Example: Applying a Protective Layer ...................................................................................... 326
5.5 Technical Specifications of the 2PULSE, Terminal Assignment............................................... 330
5.6 Technical Specifications for Programming, Reference Lists .................................................... 334
Index...................................................................................................................................................... 339

Technological Functions
6 Operating Instructions, 04/2008, A5E00124867-06
Table of contents

Tables
Table 2-1 Terminal Assignment of the 1Count24V/100kHz.........................................................................23
Table 2-2 RESET States ..............................................................................................................................27
Table 2-3 Feedback Interface (Inputs) .........................................................................................................55
Table 2-4 Control Interface (Outputs) ..........................................................................................................56
Table 2-5 Notes on the Control Bits .............................................................................................................57
Table 2-6 Notes on the Feedback Bits.........................................................................................................58
Table 2-7 Access to the Control and Feedback Interface in STEP 7 Programming....................................59
Table 2-8 Parameter List for Counting Modes .............................................................................................62
Table 2-9 Calculating the Integration Time ..................................................................................................69
Table 2-10 Calculation of the Update Time....................................................................................................71
Table 2-11 Calculation of the Integration Time ..............................................................................................73
Table 2-12 Possible Measuring Ranges with Error Indication (Number of Pulses per Encoder
Revolution = 60)...........................................................................................................................74
Table 2-13 Calculation of the Update Time....................................................................................................75
Table 2-14 Possible Measuring Ranges with Error Indication (Number of Pulses per Encoder
Revolution = 60)...........................................................................................................................76
Table 2-15 Calculation of the Integration Time ..............................................................................................78
Table 2-16 Calculation of the Update Time....................................................................................................80
Table 2-17 Feedback Interface (Inputs) .........................................................................................................86
Table 2-18 Control Interface (Outputs) ..........................................................................................................87
Table 2-19 Notes on the Control Bits .............................................................................................................88
Table 2-20 Notes on the Feedback Bits.........................................................................................................89
Table 2-21 Access to the Control and Feedback Interface in STEP 7 Programming....................................90
Table 2-22 Parameter List for Measuring Modes...........................................................................................93
Table 2-23 RESET States ............................................................................................................................101
Table 2-24 Feedback Interface (Inputs) .......................................................................................................112
Table 2-25 Control Interface (Outputs) ........................................................................................................113
Table 2-26 Notes on the Control Bits ...........................................................................................................114
Table 2-27 Notes on the Feedback Bits.......................................................................................................114
Table 2-28 Access to the Control and Feedback Interface in STEP 7 Programming..................................115
Table 2-29 Parameter List for Position Feedback........................................................................................118
Table 3-1 Terminal Assignment of the 1Count5V/500kHz.........................................................................137
Table 3-2 RESET States ............................................................................................................................141
Table 3-3 Valid Range for the Two Comparison Values............................................................................167
Table 3-4 Feedback Interface (Inputs) .......................................................................................................168
Table 3-5 Control Interface (Outputs) ........................................................................................................169

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 7
Table of contents

Table 3-6 Notes on the Control Bits .......................................................................................................... 170


Table 3-7 Notes on the Feedback Bits ...................................................................................................... 171
Table 3-8 Access to the Control and Feedback Interface in STEP 7 Programming................................. 172
Table 3-9 Parameter List for Counting Modes .......................................................................................... 176
Table 3-10 Calculation of the Integration Time ........................................................................................... 184
Table 3-11 Calculation of the Update Time................................................................................................. 186
Table 3-12 Calculation of the Integration Time ........................................................................................... 189
Table 3-13 Possible Measuring Ranges with Error Indication (Number of Pulses per Encoder
Revolution = 60) ........................................................................................................................ 190
Table 3-14 Calculation of the Integration Time ........................................................................................... 191
Table 3-15 Feedback Interface (Inputs) ...................................................................................................... 202
Table 3-16 Control Interface (Outputs)........................................................................................................ 203
Table 3-17 Notes on the Control Bits .......................................................................................................... 204
Table 3-18 Notes on the Feedback Bits ...................................................................................................... 205
Table 3-19 Access to the Control and Feedback Interface in STEP 7 Programming................................. 206
Table 3-20 Parameter List for Measuring Modes........................................................................................ 209
Table 3-21 RESET States ........................................................................................................................... 218
Table 3-22 Feedback Interface (Inputs) ...................................................................................................... 229
Table 3-23 Control Interface (Outputs)........................................................................................................ 230
Table 3-24 Notes on the Control Bits .......................................................................................................... 231
Table 3-25 Notes on the Feedback Bits ...................................................................................................... 231
Table 3-26 Access to the Control and Feedback Interface in STEP 7 Programming................................. 232
Table 3-27 Parameter list for Position Feedback ........................................................................................ 235
Table 4-1 Terminal Assignment of the 1SSI ............................................................................................. 251
Table 4-2 Encoder Value Detection .......................................................................................................... 254
Table 4-3 Assignment of the Feedback Interface (Inputs) ........................................................................ 267
Table 4-4 Assignment of the Control Interface (Outputs).......................................................................... 268
Table 4-5 Assignment of the Feedback Interface (Inputs) ........................................................................ 270
Table 5-1 Parameter List for the Filling Process ....................................................................................... 314
Table 5-2 Parameter List for Heating a Liquid .......................................................................................... 318
Table 5-3 Parameter List for the Packing of Piece Goods ........................................................................ 323
Table 5-4 Parameter List for Applying a Protective Layer......................................................................... 328

Technological Functions
8 Operating Instructions, 04/2008, A5E00124867-06
Table of contents

Figures
Figure 2-1 Terminal Assignment for the Example.........................................................................................19
Figure 2-2 Count Continuously with Gate Function ......................................................................................28
Figure 2-3 Count Once Without Main Count Direction; Canceling Gate Function ........................................31
Figure 2-4 Count Once with Up as the Main Count Direction .......................................................................31
Figure 2-5 Periodic Counting without a Main Count Direction ......................................................................34
Figure 2-6 Periodic Counting with Up as the Main Count Direction..............................................................34
Figure 2-7 Count Continuously, Up, Interrupting Gate Function ...................................................................38
Figure 2-8 Count Continuously, Down, Canceling Gate Function ................................................................38
Figure 2-9 Latch and Retrigger with Load Value = 0.....................................................................................40
Figure 2-10 Latch with a Load Value of 0........................................................................................................42
Figure 2-11 Once-Only and Periodic Synchronization ....................................................................................44
Figure 2-12 V2 < V1 at the Start of Counting ..................................................................................................49
Figure 2-13 V2 > V1 at the Start of Counting ..................................................................................................49
Figure 2-14 Example of How Hysteresis Works..............................................................................................50
Figure 2-15 Example of How Hysteresis Works..............................................................................................51
Figure 2-16 Example of How Hysteresis Works..............................................................................................52
Figure 2-17 Resetting of the Status Bits..........................................................................................................59
Figure 2-18 Acceptance of Values with the Load Function.............................................................................60
Figure 2-19 Acknowledgment Principle in Isochrone Mode ............................................................................61
Figure 2-20 Error Acknowledgment.................................................................................................................61
Figure 2-21 Measuring Principle .....................................................................................................................66
Figure 2-22 Principle of Continuous Measurement (Frequency Measurement Example) ..............................67
Figure 2-23 Frequency Measurement with Gate Function..............................................................................69
Figure 2-24 Frequency Measurement with Gate Function..............................................................................71
Figure 2-25 Rotational Speed Measurement with Gate Function ...................................................................73
Figure 2-26 Rotational Speed Measurement with Gate Function ...................................................................75
Figure 2-27 Period Measurement with Gate Function ....................................................................................78
Figure 2-28 Period Measurement with Gate Function ....................................................................................80
Figure 2-29 Limit-Value Monitoring .................................................................................................................85
Figure 2-30 Resetting of the Status Bits..........................................................................................................90
Figure 2-31 Acceptance of Values with the Load Function.............................................................................91
Figure 2-32 Acknowledgment Principle in Isochrone Mode ............................................................................92
Figure 2-33 Error Acknowledgment.................................................................................................................92
Figure 2-34 Count Continuously with Gate Function ....................................................................................103
Figure 2-35 Position Detection, Up, Interrupting Gate Function ...................................................................105

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 9
Table of contents

Figure 2-36 Position Detection, Down, Interrupting Gate Function.............................................................. 105


Figure 2-37 Latch and Retrigger with Load Value = 0.................................................................................. 107
Figure 2-38 Latch with a Load Value of 0..................................................................................................... 108
Figure 2-39 Once-Only and Periodic Synchronization ................................................................................. 110
Figure 2-40 Resetting of the Status Bits....................................................................................................... 115
Figure 2-41 Acceptance of Values with the Load Function .......................................................................... 116
Figure 2-42 Acknowledgment Principle in Isochrone Mode ......................................................................... 117
Figure 2-43 Error Acknowledgment.............................................................................................................. 117
Figure 2-44 Time Span between the Direction Signal and the Count Signal ............................................... 120
Figure 2-45 Signals of a 24-V Pulse Generator with Direction Indicator...................................................... 121
Figure 2-46 Single Evaluation ...................................................................................................................... 121
Figure 2-47 Double Evaluation ..................................................................................................................... 122
Figure 2-48 Quadruple Evaluation................................................................................................................ 122
Figure 3-1 Terminal Assignment for the Example ...................................................................................... 133
Figure 3-2 Endless Counting with Gate Function....................................................................................... 142
Figure 3-3 Once-Only Counting Without Main Count Direction; Terminating Gate Function..................... 145
Figure 3-4 Once-Only Counting with Up as the Main Count Direction....................................................... 145
Figure 3-5 Periodic Counting without a Main Count Direction ................................................................... 148
Figure 3-6 Periodic Counting with Up as the Main Count Direction ........................................................... 148
Figure 3-7 Count Continuously, Up, Interrupting Gate Function ................................................................ 151
Figure 3-8 Count Continuously, Down, Canceling Gate Function.............................................................. 151
Figure 3-9 Latch and Retrigger with Load Value = 0.................................................................................. 153
Figure 3-10 Latch with a Load Value of 0..................................................................................................... 154
Figure 3-11 Once-Only and Periodic Synchronization ................................................................................. 156
Figure 3-12 Once-Only and Periodic Synchronization ................................................................................. 158
Figure 3-13 V2 < V1 at the Start of Counting ............................................................................................... 163
Figure 3-14 V2 > V1 at the Start of Counting ............................................................................................... 163
Figure 3-15 Example of How Hysteresis Works........................................................................................... 164
Figure 3-16 Example of How Hysteresis Works........................................................................................... 165
Figure 3-17 Example of How Hysteresis Works........................................................................................... 166
Figure 3-18 Resetting of the Status Bits....................................................................................................... 173
Figure 3-19 Acceptance of Values with the Load Function .......................................................................... 173
Figure 3-20 Acknowledgment Principle in Isochrone Mode ......................................................................... 174
Figure 3-21 Error Acknowledgment.............................................................................................................. 175
Figure 3-22 Measuring Principle................................................................................................................... 181
Figure 3-23 Principle of Continuous Measurement (Frequency Measurement Example) ........................... 182

Technological Functions
10 Operating Instructions, 04/2008, A5E00124867-06
Table of contents

Figure 3-24 Frequency Measurement with Gate Function............................................................................184


Figure 3-25 Frequency Measurement with Gate Function............................................................................186
Figure 3-26 Rotational Speed Measurement with Gate Function .................................................................189
Figure 3-27 Rotational Speed Measurement with Gate Function .................................................................191
Figure 3-28 Period Measurement with Gate Function ..................................................................................194
Figure 3-29 Period Measurement with Gate Function ..................................................................................196
Figure 3-30 Limit-Value Monitoring ...............................................................................................................201
Figure 3-31 Resetting of the Status Bits........................................................................................................206
Figure 3-32 Acceptance of Values with the Load Function...........................................................................207
Figure 3-33 Acknowledgment Principle in Isochrone Mode ..........................................................................208
Figure 3-34 Error Acknowledgment...............................................................................................................208
Figure 3-35 Count Continuously with Gate Function ....................................................................................220
Figure 3-36 Position Detection, Up, Interrupting Gate Function ...................................................................222
Figure 3-37 Position Detection, Down, Interrupting Gate Function...............................................................222
Figure 3-38 Latch and Retrigger with Load Value = 0...................................................................................224
Figure 3-39 Latch with a Load Value of 0......................................................................................................225
Figure 3-40 Once-Only and Periodic Synchronization ..................................................................................227
Figure 3-41 Resetting of the Status Bits........................................................................................................232
Figure 3-42 Accepting Values with the Load Function (LOAD_VAL; LOAD_PREPARE; C_DOPARAM;
C_INTTIME) ...............................................................................................................................233
Figure 3-43 Acknowledgment Principle in Isochrone Mode ..........................................................................234
Figure 3-44 Error Acknowledgment...............................................................................................................234
Figure 3-45 Single Evaluation .......................................................................................................................236
Figure 3-46 Double Evaluation......................................................................................................................237
Figure 3-47 Quadruple Evaluation ................................................................................................................237
Figure 4-1 Terminal Assignment for the Example.......................................................................................247
Figure 4-2 Value Transfer............................................................................................................................259
Figure 4-3 Latch Function ...........................................................................................................................261
Figure 4-4 Error Acknowledgment...............................................................................................................262
Figure 5-1 Terminal Assignment of the 2PULSE for the Example ..............................................................277
Figure 5-2 How the 2PULSE works.............................................................................................................280
Figure 5-3 Basic Circuit Diagram for Pulse Output Mode ...........................................................................282
Figure 5-4 Output Sequence for Pulse Output............................................................................................283
Figure 5-5 Block Diagram for Pulse-Width Modulation Mode .....................................................................287
Figure 5-6 Pulse-Width Modulation Output Sequence................................................................................288
Figure 5-7 Modulation of the Pulse Duration...............................................................................................289
Figure 5-8 Basic Circuit Diagram for Pulse Train Mode..............................................................................294

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 11
Table of contents

Figure 5-9 Output Sequence of the Pulse Train......................................................................................... 295


Figure 5-10 Basic Circuit Diagram for On/Off-Delay Mode .......................................................................... 300
Figure 5-11 On/Off-Delay Output Sequence ................................................................................................ 301
Figure 5-12 The Pulse Duration Is Too Short............................................................................................... 302
Figure 5-13 The Interpulse Period Is Too Short ........................................................................................... 302
Figure 5-14 Retriggering the Current On-Delay ........................................................................................... 303
Figure 5-15 Retriggering the Current Off-Delay ........................................................................................... 303
Figure 5-16 Filling Liquids ............................................................................................................................ 312
Figure 5-17 Flow Diagram for the Filling Process ........................................................................................ 313
Figure 5-18 Terminal Assignment of the 2PULSE for Filling Liquids ........................................................... 315
Figure 5-19 Heating a Liquid ........................................................................................................................ 316
Figure 5-20 Flow Diagram for Heating a Liquid............................................................................................ 317
Figure 5-21 Terminal Assignment of the 2PULSE for the Heating of a Liquid ............................................. 319
Figure 5-22 Using a Solenoid Valve to Control the Flow.............................................................................. 320
Figure 5-23 Packing Piece Goods................................................................................................................ 321
Figure 5-24 Flow Diagram for the Packing of Piece Goods ......................................................................... 322
Figure 5-25 Terminal Assignment of the 2PULSE for the Packing of Piece Goods .................................... 325
Figure 5-26 Applying a Protective Layer ...................................................................................................... 326
Figure 5-27 Flow Diagram for Applying a Protective Layer.......................................................................... 327
Figure 5-28 Terminal Assignment of the 2PULSE for Applying a Protective Layer ..................................... 329
Figure 5-29 Resistive Load - Both Channels PWM 50/50............................................................................ 332
Figure 5-30 Resistive Load - Only Channel 1 PWM 50/50........................................................................... 332

Technological Functions
12 Operating Instructions, 04/2008, A5E00124867-06
Preface 1
How this Manual Is Structured...
This manual is a supplement to the ET 200S Distributed I/O System manual. This manual is
part of the documentation package 6ES7 151-1AA10-8AA0.
It contains descriptions of the ET-200S modules that are particularly suited for use in certain
processes.

How to Find Your Way Around


At the beginning of each chapter you will find a Product Overview, which lists the features
and applications of the module described. You will also find the order number of the module
and the name and release of the software required.
For the current GSD file, go to:
http://support.automation.siemens.com
In each chapter you will then find a section with the heading Brief Instructions on
Commissioning. These brief instructions tell you in a series of short steps how to install and
configure the module, how to integrate it in your use program, and how to test it in your user
program.

Index
The index contains keywords that come up in the manual.

Additional Support
Please talk to your Siemens contact at one of our agencies or local offices if you have any
questions about the products described here and do not find the answers in this manual.
You will find information on who to contact at:
http://www.siemens.com/automation/partner
A guide to the technical documentation for the various SIMATIC products and systems is
available at:
http://www.siemens.de/simatic-tech-doku-portal
The online catalog and ordering system are available at:
http://mall.ad.siemens.com

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 13
Preface

Training Center
We offer various courses for newcomers to the SIMATIC S7 automation system. Please
contact your regional training center or the central training center in
D90327 Nuremberg.
Phone: +49 (911) 895-3200
Internet: http://www.sitrain.com

Technical Support
You will find technical support for all A&D products
● By filling out a Support Request at:
http://www.siemens.de/automation/support-request
● Phone: + 49 180 5050 222
● Fax:+ 49 180 5050 223
For additional information about our technical support, refer to the Internet at
http://www.siemens.com/automation/service.

Service & Support on the Internet


Supplementary to our documentation offers, we offer you a comprehensive online knowledge
base on the Internet.
http://www.siemens.com/automation/service&support
There you will find:
● Our newsletter, providing you with the latest information about your products.
● The right documentation for you using our Service & Support search engine.
● A forum where users and experts from all over the world exchange ideas.
● Your local Automation & Drives representative.
● Information about on-site service, repairs and spare parts. Lots more can be found on our
"Services" pages.

Technological Functions
14 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz 2
2.1 Product Overview

Order Number
6ES7 138-4DA04-0AB0

Compatibility
The 1Count24V/100kHz with the order number 6ES7 138-4DA04-0AB0 replaces the
1Count24V/100kHz with the order number 6ES7 138-4DA03-0AB0 with full compatibility. In
STEP 7 version V5.3 SP2 and later, you can use it in non-isochronous and isochronous
modes.

Features
● Connection of a pulse generator to count 24 V signals up to a frequency of 100 kHz.
● Can be operated using terminal modules TM-E15S24-01 and TM-E15S26-A1
● Isochronous mode
● Modified user data interface 1
1 Insteadof 8 bytes of input data and 8 bytes of output data, 12 bytes of input data and
6 bytes of output data are used, provided the IM 151 supports this.
The following IM 151 modules support this function:
– IM151-1/Standard order no. 6ES7 151-1AA04-0AB0 and higher
– IM151-1/HF order no. 6ES7 151-1BA01-0AB0 and higher
● Modes of the 1Count24V/100kHz:
Counting modes:
– Count continuously
– Count once
– Count periodically

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 15
1Count24V/100kHz
2.1 Product Overview

Measuring modes:
– Frequency measurement
– Rotational speed measurement
– Period measurement
Position feedback:
– Position detection
– Fast mode
● Gate control, synchronization or latch function via digital input (P or M switch)
● One real digital output for direct control or output of the comparison result
● One virtual digital output
● Firmware update1
● Identification data 1
1 The following IM 151 modules support this function: IM 151-1 Standard:
6ES7151-1AA04-0AB0 and later and IM 151-1 High Feature: 6ES7151-1BA01-0AB0 and
later

Connectable Counting Signals


The 1Count24V/100kHz can count the signals of the following encoders:
● 24 V pulse encoder with direction level
● 24 V pulse encoder without direction level
● 24 V incremental encoder with two tracks that are 90o out of phase (rotary encoder).

Adjustment During Operation


● Counting modes
– You can change the function and behavior of the digital outputs during operation
● Measuring modes
– You can change the function of the DO1 digital output during operation
– You can change the integration time and the update time during operation

Configuration
You can use either of the following to configure the 1Count24V/100kHz:
● STEP 7 V5.3 SP2 or higher
● HSP hardware support package (available online) as of STEP 7 V5.2 SP1

Technological Functions
16 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.1 Product Overview

Firmware Update
To add functions and for troubleshooting, it is possible to load firmware updates to the
operating system memory of the 1Count24V/100kHz using STEP 7 HW Config.

Note
When you launch the firmware update, the old firmware is deleted. If the firmware update is
interrupted or canceled for any reason, the 1Count24V/100kHz will no longer function
correctly as a result. Re-launch the firmware update and wait until this has completed
successfully.

Identification Data 1
● Hardware release status
● Firmware release status
● Serial number
1 See also ET 200S Distributed I/O System Manual, section: Identification Data

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 17
1Count24V/100kHz
2.2 Clocked Mode

2.2 Clocked Mode

Note
The principles of isochrone mode are described in a separate manual.
See Isochrone Mode Function Manual (A5E00223279).

Hardware Requirements
You will require the following for the 1Count24V/100kHz in isochrone mode:
● A CPU that supports isochrone mode
● A master or PROFINET master that supports the equidistant bus cycle
● An IM 151 that supports isochrone mode

Features
Depending on the system parameter assignment, the 1Count24V/100kHz works either in
non-isochrone or isochrone mode.
In isochrone mode, data exchange between the bus master and 1Count24V/100kHz is
isochronous to the cycle.
In isochrone mode, all 8 bytes/12 bytes of the user data interface are consistent.
If an error occurs during parameter assignment, the 1Count24V/100kHz does not go into
isochrone mode.
If isochrone mode fails due to faults or failure/delay of global control (GC), the
1Count24V/100kHz will return to isochrone mode during the next cycle without an error
response.
If isochrone mode fails, the user data interface is not updated.
The Ti/To overlap is supported by the module in firmware version V1.0.1 and later.

Technological Functions
18 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.3 Example: Start 1Count24V/100kHz

2.3 Example: Start 1Count24V/100kHz

Introduction
These instructions guide you to a functioning application that will enable you to count the
switching operations of a contact and become familiar with and check the basic hardware
and software functions of the 1Count24/100kHz. The counting mode used in this example is
"Count continuously".

Requirements
The following requirements must be satisfied:
● You have commissioned an ET 200S station on an S7 station with a master.
● You must have the following:
– A TM-E15S24-01 terminal module
– A 1Count24V/100kHz
– A momentary contact switch and the necessary wiring material

Installation, Wiring and Fitting


1. Install and wire the TM-E15S24-01 terminal module (see Figure).
2. Connect the 1Count24V/100kHz to the terminal module (you will find detailed instructions
on how to do this in the ET 200S Distributed I/O System Manual).

&RXQW
9N+]

6)

83 '1
 
(6
'$$%

  

  

 

 

Figure 2-1 Terminal Assignment for the Example

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 19
1Count24V/100kHz
2.3 Example: Start 1Count24V/100kHz

Configuring with STEP 7 using HW Config


You must first adapt the hardware configuration of your existing ET 200S station.
1. Open the relevant project in SIMATIC Manager.
2. Open the HW Config configuration table in your project.
3. Select the 1Count 24V/100kHz Counting Mode from the hardware catalog.
The number 6ES7 138-4DA04-0AB0 C appears in the infotext. Drag the entry to the slot
at which you have installed your 1Count24V/100kHz.
4. Double-click this number to open the "Properties" - 1Count 24V/100kHz (R-S Slot
Number) tab.
5. On the Addresses tab, you will find the addresses of the slot to which you have dragged
the 1Count24V/100kHz. Make a note of these addresses for subsequent programming.
6. On the Parameters tab you will find the default settings for the 1Count24V/100kHz. Leave
the default settings unchanged.
7. Save and compile your configuration, and download the configuration in STOP mode of
the CPU by choosing "PLC > Download to Module".

Technological Functions
20 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.3 Example: Start 1Count24V/100kHz

Integration into the User Program


(not for modified user data interface)
1. Create block FC101 and integrate it in your control program (in OB1, for example).
This block requires the data block DB1 with a length of 16 bytes. The start address of the
module in the following example is 256.

STL Description
Block: FC101

Network 1: Presettings

L 0 //Delete control bits


T DB1.DBD0
T DB1.DBD4
SET
S DB1.DBX4.0 //Open SW gate

Network 2: Write to the control interface

L DB1.DBD0 //Write 6 bytes to the 1Count24V/100kHz


//Configured start address of the outputs
T PAD 256
L DB1.DBW4
T PAW 260

Network 3: Read from the feedback interface


//Read 8 bytes from the 1Count24V/100kHz
//Configured start address of inputs
L PED 256
T DB1.DBD8
L PED 260
T DB1.DBD12

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 21
1Count24V/100kHz
2.3 Example: Start 1Count24V/100kHz

Testing
Use "Monitor/Modify Variables" to monitor the count value and the gate.
1. Select the "Block" folder in your project. Choose the "Insert > S7 Block > Variable Table"
menu command to insert the VAT 1 variable table, and then confirm with "OK".
2. Open the VAT 1 variable table, and enter the following variables in the "Address" column:
DB1.DBD8 (current count value)
DB1.DBx13.0 (internal gate status)
3. Choose "PLC > Connect To > Configured CPU" to switch to online.
4. Choose "Variable > Monitor" to switch to monitoring.
5. Switch the CPU to RUN mode.
The "internal gate status" bit must be set.
6. Use your counting contact to generate pulses.

Result
You can now see that:
● The UP LED on the 1Count24V/100kHz is on. The status of the UP LED changes with
each new pulse.
● The count value in the block changes.

Technological Functions
22 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.4 Terminal Assignment Diagram

2.4 Terminal Assignment Diagram

Wiring Rules
The cables (terminals 1 and 5 and terminals 2 and 8) must be shielded. The shield must be
supported at both ends. To do this use the shield contact (see the ET 200S Distributed I/O
System manual).

Terminal Assignment of the 1Count24V/100kHz


In the following tables you will find the terminal assignment for the 1Count24V/100kHz:

Table 2-1 Terminal Assignment of the 1Count24V/100kHz

View Terminal Assignment Remarks


B: Direction input or track B
A: Pulse input or track A
&RXQW
9N+]

6) 24V DC: Sensor supply


M: Chassis ground
DI: Digital input

70(6DQG
DO1: Digital output
&RXQW9N+]
83 '1
 
(6
'$$%


%   $ 

9'&   9'& 

0 0 
  

'2   ',  

Pulse Generator Connection

Encoder Type Connection Count Direction


Pulse generator without direction indicator 24 V count pulses at terminal 5 (A) pulses
Pulse generator with direction indicator 24 V count pulses at terminal 5 (A) and Up, down
24 V direction at terminal 1 (B)
Pulse generator with 2 tracks that are 90o Track A terminal 5 (A) and track B terminal Up, down
out of phase 1 (B)

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 23
1Count24V/100kHz
2.5 Settings modes of the 1Count24V/100kHz

2.5 Settings modes of the 1Count24V/100kHz

Introduction
To begin with, decide how you want to use the 1Count24V/100kHz. You can choose
between the following modes:

Counting modes Measuring modes Position feedback Fast mode


Count continuously Frequency measurement Position detection Position feedback in short (isochronous) cycles
Count once Rotational speed
measurement
Count periodically Period measurement
Parameters are assigned to the various modes. You will find the parameter lists in the descriptions of the modes.
You can integrate the 1Count24V/100kHz in your project in two different ways. Decide whether you want to work with a
GSD file or with STEP 7.

Integrating 1Count24V/100kHz with STEP 7

Integrating 1Count24V/100kHz with STEP 7


(in isochronous and non-isochronous mode)
Select an entry from the hardware catalog that corresponds to the operating mode you want.
For counting modes, For measuring modes, For position detection, For Fast Mode, select the
select the "1Count24V select the "1Count24V select the "1Count24V "1COUNT24V Fast Mode
Counting Mode V2.0" entry Measuring Mode V2.0" entry Position Detection V2.0" V2.0" entry
entry
The number The number The number The number
6ES7 138-4DA04-0AB0 C 6ES7 138-4DA04-0AB0 M 6ES7 138-4DA04-0AB0 W 6ES7 138-4DA04-0AB0 F
appears in the infotext. Drag appears in the infotext. Drag appears in the infotext. Drag appears in the infotext. Drag
the entry to the slot at which the entry to the slot at which the entry to the slot at which the entry to the slot at which
you have installed your you have installed your you have installed your you have installed your
1Count24V/100kHz. 1Count24V/100kHz. 1Count24V/100kHz. 1Count24V/100kHz.

Select the parameters.

Technological Functions
24 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.5 Settings modes of the 1Count24V/100kHz

Integrating 1Count24V/100kHz with GSD File

Integrating 1Count24V/100kHz with GSD file


(only in non-isochronous mode)
Select an entry in the GSD file that corresponds to the operating mode you want.
For counting modes, select For measuring modes, select For position feedback, select
C 6ES7 138-4DA04-0AB0 1CNT24V M 6ES7 138-4DA04-0AB0 1CNT24V W 6ES7 138-4DA04-0AB0 1CNT24V
Select the parameters.

Note
Fast mode is designed for use in especially short isochronous cycles. You need STEP 7 to
configure isochronous operation.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 25
1Count24V/100kHz
2.6 Count Modes

2.6 Count Modes

2.6.1 Overview

Principle
The counting modes are used in counting applications (for counting of items, for example).
For the "Counting modes" parameter, you can select from the following modes:
● Count continuously (for position detection with incremental encoders, for example)
● Count once (for counting items up to a maximum limit, for example)
● Count periodically (in applications with recurring counting operations, for example)
To execute one of these modes, you have to assign parameters to the 1Count24V/100kHz.

Maximum Count Range


The high counting limit is +2147483647 (231 - 1).
The low counting limit is -2147483648 (-231).

Load Value
You can specify a load value for the 1Count24V/100kHz.
This load value is either applied directly as the new count value (LOAD_VAL) or it is applied
as the new count value when the following events occur (LOAD_PREPARE):

In the Count once and Count periodically counting modes:


● The low or high counting limit is reached when a main count direction is not assigned.
● The assigned high counting limit is reached when the main count direction is up.
● Zero is reached when the main count direction is down.

In all counting modes:


● The counting operation is started by a SW gate or HW gate (if the counting operation is
continued, the load value is not applied).
● Synchronization
● Latch and retrigger

Gate Control
To control the 1Count24V/100kHz, you have to use the gate functions.

Technological Functions
26 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.6 Count Modes

Main Count Direction


With the main count direction, you assign which RESET states (status following parameter
assignment) the load value and count value can take on. It is thus possible to create
incrementing or decrementing count applications. The assigned main count direction has no
effect on the direction evaluation when the count pulses are detected.

RESET States of the Following Values after Parameter Assignment

Table 2-2 RESET States

Value Main count direction RESET state


Load value None 0
Up 0
Down Assigned high counting limit
Count value None 0
Up 0
Down Assigned high counting limit
Comparison value 1 and 2 None 0
Up 0
Down Assigned high counting limit
Latch value None 0
Up 0
Down Assigned high counting limit

Isochrone Mode
In isochrone mode, the 1Count24V/100kHz accepts control bits and control values from the
control interface in each bus cycle and reports back the response in the same cycle.
In each cycle the 1Count24V/100kHz transfers the count and latch value that were valid at
time Ti and the status bits valid at time Ti.
A count controlled by hardware input signals can only be transferred in the same cycle if the
input signal occurred before time Ti.
(see Isochrone Mode Manual)

See also
Parameter Assignment for the Count Modes (Page 62)

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 27
1Count24V/100kHz
2.6 Count Modes

2.6.2 Endless Counting

Definition
In this mode, the 1Count24V/100kHz counts continuously starting from the load value:
● If the 1Count24V/100kHz reaches the high counting limit when counting up, and another
count pulse then comes, it will jump to the low counting limit and continue counting from
there without losing a pulse.
● If the 1Count24V/100kHz reaches the low counting limit when counting down, and
another count pulse then comes, it will jump to the high counting limit and continue
counting from there without losing a pulse.
● The high counting limit is set to +2147483647 (231 - 1).
● The low counting limit is set to -2147483648 (-231).

&RXQWHUVWDWXV

+LJKFRXQWLQJOLPLW

/RDGYDOXH

/RZFRXQWLQJOLPLW

0HDVXUHGYDOXH *DWHVWRS 7LPH

Figure 2-2 Count Continuously with Gate Function

Function of the Digital Input


For the "Function DI" parameter, select one of the following functions for the digital input:
● Input
● HW gate
● Latch function
● Synchronization

Function of the Digital Outputs


For the "Function DO1" and "Function DO2" parameters, select one of the following
functions for each digital output:
● Output, no switching by comparator
● Switch on at count greater than or equal to the comparison value
● Switch on at count less than or equal to the comparison value
● Pulse on reaching the comparison value
● Switch at comparison values (DO1 only)

Technological Functions
28 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.6 Count Modes

Influencing the Behavior of the Digital Outputs via:


● Hysteresis
● Pulse duration

Changing Values during Operation


The following values can be changed during operation:
● Load value (LOAD_PREPARE)
● Count (LOAD_VAL)
● Comparison value 1 (CMP_VAL1)
● Comparison value 2 (CMP_VAL2)
● Function and behavior of the digital outputs (C_DOPARAM)

See also
Latch Function (Page 40)
Synchronization (Page 44)
Behavior Types of the Outputs in Count Modes (Page 46)
Assignment of the Feedback and Control Interface for the Count Modes (Page 54)

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 29
1Count24V/100kHz
2.6 Count Modes

2.6.3 Once-Only Counting

Definition
In this mode, the 1Count24V/100kHz counts once only, depending on the assigned main
count direction ("Main Count Direction" parameter).
● When there is no main count direction:
– Counts starting from the load value.
– Counts up or down.
– The counting limits are fixed at the maximum count range.
– If the high or low counting limit is violated, the gate is closed automatically, and the
counter jumps to the respective counting limit.
● When the main count direction is up:
– Counts starting from the load value.
– Counts up or down.
– When the high counting limit is reached, the counter jumps to the load value and the
gate is closed.
– The high counting limit can be assigned, and the load value has RESET state = 0 and
can be changed.
● When the count direction is down:
– Counts starting from the load value.
– Counts up or down.
– When the low counting limit is reached, the 1Count24V/100kHz jumps to the load
value and the gate is closed.
– The low counting limit is fixed at 0, and the load value can be assigned (parameter:
high counting limit) and can be changed.

Technological Functions
30 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.6 Count Modes

The internal gate is automatically closed in the event of an overflow/underflow at the


counting limits. To restart counting, you have to open the gate again.

&RXQWHUVWDWXV

8SSHU 676B2)/:
FRXQWOLPLW

/RDGYDOXH
 676B1'

/RZHU 676B8)/:
FRXQWOLPLW

0HDVXUHG $XWRPDWLF 0HDVXUHG $XWRPDWLF 7LPH


YDOXH JDWHVWRS YDOXH JDWHVWRS

Figure 2-3 Count Once Without Main Count Direction; Canceling Gate Function

With an interrupting gate function, the 1Count24V/100kHz remains at the underflow when
the gate is started.

&RXQWHUVWDWXV

8SSHU 676B2)/:
FRXQWOLPLW

/RDGYDOXH

/RZHU
FRXQWOLPLW

0HDVXUHG $XWRPDWLF 0HDVXUHG $XWRPDWLF


YDOXH JDWHVWRS YDOXH JDWHVWRS 7LPH

Figure 2-4 Count Once with Up as the Main Count Direction

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 31
1Count24V/100kHz
2.6 Count Modes

Function of the Digital Input


For the "Function DI" parameter, select one of the following functions for the digital input:
● Input
● HW gate
● Latch function
● Synchronization

Function of the Digital Outputs


For the "Function DO1" and "Function DO2" parameters, select one of the following
functions for each digital output:
● Output, no switching by comparator
● Switch on at count greater than or equal to the comparison value
● Switch on at count less than or equal to the comparison value
● Pulse on reaching the comparison value
● Switch at comparison values (DO1 only)

Influencing the Behavior of the Digital Outputs via:


● Hysteresis
● Pulse duration

Values that Can Be Changed during Operation:


● Load value (LOAD_PREPARE)
● Count (LOAD_VAL)
● Comparison value 1 (CMP_VAL1)
● Comparison value 2 (CMP_VAL2)
● Function and behavior of the digital outputs (C_DOPARAM)

See also
Latch Function (Page 40)
Synchronization (Page 44)
Behavior Types of the Outputs in Count Modes (Page 46)
Assignment of the Feedback and Control Interface for the Count Modes (Page 54)
Gate Functions in Count Modes (Page 37)

Technological Functions
32 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.6 Count Modes

2.6.4 Periodic Counting

Definition
In this mode, the 1Count24V/100kHz counts periodically, depending on the main count
direction set.
● When there is no main count direction:
– Counts as of the load value.
– Counts up or down.
– The count limits are fixed at the maximum count range.
– In the event of an overflow or underflow at the respective count limit, the
1Count24V/100kHz jumps to the load value and continues counting from there.
● When the main count direction is up:
– Counts as of the load value.
– Counts up or down.
– The upper limit can be assigned parameters, and the load value has a RESET status
of 0 and can be changed.
– When the upper count limit is reached, the 1Count24V/100kHz jumps to the load value
and continues counting from there.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 33
1Count24V/100kHz
2.6 Count Modes

● When the count direction is down:


– Counts as of the load value.
– Counts up or down.
– When the lower count limit is reached, the 1Count24V/100kHz jumps to the load value
and continues counting from there.
– The lower limit is fixed at 0, and the load value can be assigned parameters
(parameter: upper count limit) and can be changed.

&RXQW

+LJKFRXQWLQJ 676B2)/:
OLPLW

/RDGYDOXH
 676B1'

/RZFRXQWLQJ
676B8)/:
OLPLW 
*DWHVWDUW *DWHVWRS 7LPH

Figure 2-5 Periodic Counting without a Main Count Direction

&RXQW

+LJK
676B2)/:
FRXQWLQJOLPLW

/RDGYDOXH



/RZ
FRXQWLQJOLPLW

*DWHVWDUW *DWHVWRS 7LPH

Figure 2-6 Periodic Counting with Up as the Main Count Direction

Technological Functions
34 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.6 Count Modes

Function of the Digital Input


Select one of the following functions for the digital input:
● Input
● Hardware gate
● Latch Function
● Synchronization

Function of the Digital Outputs


Select one of the following functions for each digital output:
● Output, no switching through comparator
● Activation at a counter status greater than or equal to the comparison value
● Activation at a counter status less than or equal to the comparison value
● Pulse on reaching the comparison value
● Switching at comparison values (DO1 only)

Influencing the Behavior of the Digital Outputs


The behavior of the digital outputs can be influenced as follows:
● Hysteresis
● Pulse duration

Changing values during operation


The following values can be changed during operation:
● Load value (LOAD_PREPARE)
● Counter status (LOAD_VAL)
● Comparison value 1 (CMP_VAL1)
● Comparison value 2 (CMP_VAL2)
● Function and behavior of the digital outputs (C_DOPARAM)

See also
Latch Function (Page 40)
Synchronization (Page 44)
Behavior Types of the Outputs in Count Modes (Page 46)
Assignment of the Feedback and Control Interface for the Count Modes (Page 54)
Gate Functions in Count Modes (Page 37)

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 35
1Count24V/100kHz
2.6 Count Modes

2.6.5 Behavior of the Digital Input

Digital Input of the 1Count24V/100kHz


The DI digital input can be operated with different sensors (P switch and series mode or M
switch).

Note
If you have selected the 24V M switch setting for the "Sensor A, B, DI" parameter, you must
use M-switching sensors.

The level of the digital input can be inverted by assigning parameters (exception: inverting is
not possible in the latch function).
To filter the input signal, you can switch on a filter depending on the minimum pulse duration
or the maximum signal frequency (parameter: sensor and input filter).
The STS_DI feedback bit indicates the level of the digital input.

Technological Functions
36 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.6 Count Modes

2.6.6 Gate Functions in Count Modes

Software Gate and Hardware Gate


The 1Count24V/100kHz has two gates
● A software gate (SW gate), which is controlled by the SW_GATE control bit.
The software gate can only be opened by a positive edge of the SW_GATE control bit. It
is closed when this bit is reset. Note the transfer times and run times of your control
program.
● A hardware gate (HW gate), which is controlled by the digital input on the
1Count24V/100kHz. You assign the hardware gate as the function of the digital input
(Function DI "HW Gate"). It is opened on a positive edge at the digital input and closed on
a negative edge.

Internal gate
The internal gate is the logical AND operation of the HW gate and SW gate. Counting is only
active when the HW gate and the SW gate are open. The STS_GATE feedback bit (internal
gate status) indicates this. If a HW gate has not been assigned, the setting of the SW gate is
decisive. Counting is activated, interrupted, continued, and canceled by means of the
internal gate. In the Count once counting mode, the internal gate is closed automatically
when there is an overflow/underflow at the counting limits.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 37
1Count24V/100kHz
2.6 Count Modes

Canceling- and Interrupting-Type Gate Function


When assigning the gate function ("Gate Function" parameter), you can specify whether the
internal gate is to cancel or interrupt counting. When counting is canceled, after the gate is
closed and restarted, counting starts again from the beginning. When counting is interrupted,
after the gate is closed and restarted, counting continues from the previous value.
The diagrams below indicate how the interrupting and canceling gate functions work:

&RXQW

+LJKFRXQWLQJOLPLW

/RDGYDOXH

/RZFRXQWLQJOLPLW

*DWHVWDUW *DWHVWRS *DWHVWDUW 7LPH

Figure 2-7 Count Continuously, Up, Interrupting Gate Function

&RXQWHUVWDWXV

8SSHUFRXQWOLPLW

/RDGYDOXH

/RZHUFRXQWOLPLW

0HDVXUHG *DWHVWRS 0HDVXUHG 7LPH


YDOXH YDOXH

Figure 2-8 Count Continuously, Down, Canceling Gate Function

Gate Control by Means of the SW Gate Only


When the gate is opened, one of the following occurs, depending on the parameter
assignment:
● Counting continues from the current count, or
● Counting starts from the load value
If the SW gate is opened in isochrone mode in bus cycle "n" by setting the SW_GATE control
bit, counting starts at time To in cycle "n+1". In the same cycle "n+1", the 1Count24V/100kHz
delivers the current count value from time Ti. (see Isochrone Mode Manual)

Technological Functions
38 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.6 Count Modes

Gate Control by Means of the SW Gate and HW Gate


If the SW gate opens when the HW gate is already open, counting continues starting from
the current count.
When the HW gate is opened, one of the following occurs, depending on the parameter
assignment:
● Counting continues from the current count, or
● Counting starts from the load value
If the SW gate is opened in isochrone mode in bus cycle "n" by setting the SW_GATE control
bit, counting starts at time To in cycle "n+1" if the HW gate is already open at this time. If the
HW gate opens between To and Ti in cycle "n+1", counting only starts once the HW gate is
open. In both cases, the 1Count24V/100kHz delivers the current count value in cycle "n+1"
starting from time Ti.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 39
1Count24V/100kHz
2.6 Count Modes

2.6.7 Latch Function

Introduction
There are two latch functions:
● The Latch and Retrigger function
● The Latch function

The Latch and Retrigger Function

Requirement
In order to use this function, you must first select it with the "Latch and Retrigger on Positive
Edge" parameter from the possible functions of the digital input.

Description

&RXQWSXOVHV

6:B*$7(

',GLJLWDOLQSXW

&RXQWHUVWDWXV

/DWFKYDOXH

Figure 2-9 Latch and Retrigger with Load Value = 0

This function stores the current internal count of the 1Count24V/100kHz and retriggers
counting when there is a positive edge on the digital input. This means that the current
internal count at the time of the positive edge is stored (latch value), and the
1Count24V/100kHz is then loaded again with the load value, from which counting resumes.
The counting mode must be enabled with the SW gate before the function can be executed.
It is started with the first positive edge on the digital input.
The stored count rather than the current count is indicated in the feedback interface. The
STS_DI bit indicates the status of the latch and retrigger signal.

Technological Functions
40 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.6 Count Modes

The latch value is preassigned with its RESET state. It is not changed when the SW gate is
opened.
Direct loading of the counter does not cause the indicated stored count to be changed.
If you close the SW gate, counting is only interrupted; this means that when you open the
SW gate again, counting is continued. The digital input DI remains active even when the SW
gate is closed.
Counting is also latched and triggered in isochrone mode with each edge on the digital input.
The count that was valid at the time of the last edge before Ti is displayed in the feedback
interface.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 41
1Count24V/100kHz
2.6 Count Modes

The Latch Function

Requirement
In order to use this function, the Function DI parameter must be set to "Latch on Positive
Edge".

Description

&RXQWSXOVHV

6:B*$7(

',GLJLWDOLQSXW

&RXQWHUVWDWXV

/DWFKYDOXH

Figure 2-10 Latch with a Load Value of 0

Count and latch value are preassigned with their RESET states.
The counting function is started when the SW gate is opened. The 1Count24V/100kHz
begins at the load value.
The latch value is always the exact count at the time of the positive edge on the digital input
DI.
The stored count rather than the current count is indicated in the feedback interface. The
STS_DI bit indicates the level of the latch signal.
Direct loading of the counter does not cause the indicated stored count to be changed.
In isochrone mode, the count that was latched at the time of the last positive edge before Ti
is displayed in the feedback interface.
When you close the SW gate, the effect is either canceling or interrupting, depending on the
parameter assignment. The digital input DI remains active even when the SW gate is closed.
Further possible causes of parameter assignment errors with the latch function:
● Incorrect parameter assignment of the digital output function (Function DI)

Technological Functions
42 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.6 Count Modes

Modified User Data Interface


If the 1Count24V/100kHz is inserted behind an IM 151 that supports the reading and writing
of wider user data interfaces, the current count value can be read from bytes 8-11 of the
feedback interface.

See also
Overview (Page 26)

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 43
1Count24V/100kHz
2.6 Count Modes

2.6.8 Synchronization

Requirement
In order to use this function, you must first select it with the "Synchronize on Positive Edge"
Function DI parameter.

Description

,QWHUQDOFRXQWSXOVHV
XSRUGRZQ

'LJLWDOLQSXW
]HURPDUN

6\QFKURQL]DWLRQ
RQFHRQO\
(QDEOH
&57/B6<1

&RXQWYDOXH

/RDGYDOXH

6\QFKURQL]DWLRQ
SHULRGLF

(QDEOH
&57/B6<1

&RXQWYDOXH

/RDGYDOXH

Figure 2-11 Once-Only and Periodic Synchronization

If you have assigned synchronization, the rising edge of a reference signal on the input sets
the 1Count24V/100kHz to the load value.
You can select between once-only and periodic synchronization ("Synchronization"
parameter).

Technological Functions
44 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.6 Count Modes

The following conditions apply:


● The counting mode must have been started with the SW gate.
● The "Enable synchronization CTRL_SYN" control bit must be set.
● In once-only synchronization, the first edge loads the 1Count24V/100kHz with the load
value after the enable bit is set.
● In periodic synchronization, the first edge and each subsequent edge load the
1Count24V/100kHz with the load value after the enable bit is set.
● After successful synchronization, the STS_SYN feedback bit is set. It must be reset by
the RES_STS control bit.
● The signal of a bounce-free switch or the zero mark of a rotary encoder can serve as the
reference signal.
● The STS_DI feedback bit indicates the level of the reference signal.
In isochrone mode, the set feedback bit STS_SYN indicates that the rising edge on the
digital input was between time Ti in the current cycle and time Ti in the previous cycle.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 45
1Count24V/100kHz
2.6 Count Modes

2.6.9 Behavior Types of the Outputs in Count Modes

Introduction
The 1Count24V/100kHz lets you store two comparison values, which are assigned to the
digital outputs. The outputs can be activated, depending on the count and the comparison
values. The various ways of setting the behavior of the outputs are described in this section.

Description
The 1Count24V/100kHz has a real digital output and a virtual digital output that exists only
as a status bit in the feedback interface.
Parameters can be assigned for both outputs ("Function DO1" and "Function DO2"
parameters).
You can change the function and the behavior of the digital outputs during operation. The
new function takes effect immediately.
You can choose from the following functions:
● Output
● Count ≥ comparison value
● Count ≤ comparison value
● Pulse on reaching the comparison value
● Switch at comparison values (DO1 only)

Output
You can switch the outputs on and off with the control bits SET_DO1 and SET_DO2.
The control bits CTRL_DO1 or CTRL_DO2 must be set for this.
You can query the status of the outputs with the status bits STS_DO1 and STS_DO2 in the
feedback interface.
The status bits STS_CMP1 and STS_CMP2 indicate that the relevant output is or was
switched on. These status bits retain their status until they are acknowledged. If the output is
still switched, the corresponding bit is set again immediately. These status bits are also set
when the control bit SET_DO1 or SET_DO2 is operated without DO1 or DO2 being enabled.
Isochrone mode: In isochrone mode, the output DO1 is switched at time To. The status of the
virtual output DO2 is signaled at time Ti.

Technological Functions
46 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.6 Count Modes

Count ≤ Comparison Value and Count ≥ Comparison Value


If the comparison conditions are fulfilled, the respective comparator switches on the output.
The status of the output is indicated by STS_DO1 and STS_DO2.
The control bits CTRL_DO1 or CTRL_DO2 must be set for this.
The comparison result is indicated by the status bits STS_CMP1 or STS_CMP2. You cannot
acknowledge and thus reset these bits until the comparison conditions are no longer fulfilled.
Isochrone mode: In isochrone mode, as well, the DO1 output is switched as soon as the
comparison condition is fulfilled and is therefore independent of the bus cycle. The status of
the virtual output DO2 is signaled at time Ti.

Comparison Value Reached, Output Pulse


If the count reaches the comparison value, the comparator switches on the respective digital
output for the assigned pulse duration.
The control bit CTRL_DO1 or CTRL_DO2 must be set for this.
The status bits STS_DO1 and STS_DO2 always have the status of the corresponding digital
output.
The comparison result is indicated by the status bit STS_CMP1 or STS_CMP2 and cannot
be reset by acknowledgment until the pulse duration has elapsed.
If a main count direction is assigned, the comparator switches only when the comparison
value in the main count direction is reached.
If a main count direction is not assigned, the comparator switches when the comparison
value is reached from either direction.
If the digital output is set by control bit SET_DO1 or SET_DO2, it is reset when the pulse
duration has elapsed.
Isochrone mode: In isochrone mode, as well, the DO1 output is switched as soon as the
comparison condition is fulfilled and is therefore independent of the bus cycle. The status of
the virtual output DO2 is signaled at time Ti.

Pulse Duration when the Comparison Value is Reached


The pulse duration begins when the respective digital output is set. The inaccuracy of the
pulse duration is less than 2 ms.
The pulse duration can be set to suit the actuators used. The pulse duration specifies how
long the output is to be set for. The pulse duration can be preselected between 0 ms and
510 ms in increments of 2 ms.
If the pulse duration = 0, the output is set until the comparison condition is no longer fulfilled.
Note that the count pulse times must be greater than the minimum switching times of the
digital output.
Isochrone mode: In isochrone mode, as well, the DO1 output is switched as soon as the
comparison condition is fulfilled and is therefore independent of the bus cycle. The status of
the virtual output DO2 is signaled at time Ti.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 47
1Count24V/100kHz
2.6 Count Modes

Switch at Comparison Values


The comparator switches the output when the following conditions are met:
● The two comparison values must be loaded using the load functions CMP_VAL1 and
CMP_VAL2, and
● After the comparison values are loaded, the DO1 output must be enabled with
CRTL_DO1.
The following table shows you when the DO1 is switched on or off:

DO1 is switched on when DO1 Is switched off when


V2 < V1 V2 ≤ count ≤ V1 V2 > count
(see Figure below) or
count > V1
V2 = V1 V2 = count = V1 V2 ≠ count ≠ V1
V2 > V1 V1 > count V1 ≤ count ≤ V2
(see Figure below) or
count > V2
The comparison result is indicated by the status bit STS_CMP1. You can only acknowledge
and thus reset this bit when the comparison condition is no longer fulfilled.
There is no hysteresis in the case of this output behavior.
It is not possible to control the DO1 output with the SET_DO1 control bit in the case of this
output behavior.

Technological Functions
48 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.6 Count Modes

Isochrone mode: In isochrone mode, as well, the DO1 output is switched as soon as the
comparison condition is fulfilled and is therefore independent of the bus cycle. The status of
the virtual output DO2 is signaled at time Ti.

&RXQW

9

9

 W

'2
W

Figure 2-12 V2 < V1 at the Start of Counting

&RXQW

9

9

 W

'2
W

Figure 2-13 V2 > V1 at the Start of Counting

Setting or Modifying the Function and Behavior of the Digital Output DO1
When setting or modifying the behavior of DO1, you must take all assignable
interdependencies into account. Failure to do so will generate a parameter assignment error
or a loading error.

Boundary conditions:
If you assign "Switch at Comparison Values" for DO1, you must:
● Set hysteresis = 0, and
● Assign "Output" for the DO2 output

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 49
1Count24V/100kHz
2.6 Count Modes

Hysteresis
An encoder can remain at a particular position and then fluctuate around this position. This
state causes the count to fluctuate around a particular value. If there is a comparison value
in this fluctuation range, for example, the associated output is switched on and off in
accordance with the rhythm of the fluctuations. To prevent switching occurring in the case of
small fluctuations, the 1Count24V/100kHz is equipped with an assignable hysteresis. You
can assign a range between 0 and 255 (0 means: hysteresis switched off).
Hysteresis also works with overflow and underflow.

Method of Operation with Count ≤ Comparison Value and Count ≥ Comparison Value
The diagram below provides an example of how hysteresis works. The figure shows the
differences in the behavior of an output when hysteresis of 0 (= switched off) is assigned as
opposed to hysteresis of 3. In the example, the comparison value is 5.
The following settings are assigned for the counter: "Main count direction" = "Up" and
"Switch on at count ≥ comparison value".
When the comparison condition is met, hysteresis becomes active. While the hysteresis is
active, the comparison result remains unchanged.
If the count value goes outside the hysteresis range, hysteresis is no longer active. The
comparator switches again according to its comparison conditions.

&RXQW











+\V

+\V
Figure 2-14 Example of How Hysteresis Works

Note
If the count direction changes on the comparison value when hysteresis is active, the output
is reset.

Technological Functions
50 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.6 Count Modes

Method of Operation when the Comparison Value Is Reached and the Pulse Duration = 0
The diagram below provides an example of how hysteresis works. The figure shows the
differences in the behavior of an output when hysteresis of 0 (= switched off) is assigned as
opposed to hysteresis of 3. In the example, the comparison value is 5.
The following settings are assigned for the counter: "Pulse on reaching the comparison
value", "No main count direction" and "Pulse duration = 0".
When the comparison conditions are met, hysteresis becomes active. While the hysteresis is
active, the comparison result remains unchanged. If the count value goes outside the
hysteresis range, hysteresis is no longer active. The comparator deletes the result of the
comparison.

&RXQW











+\V

+\V

Figure 2-15 Example of How Hysteresis Works

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 51
1Count24V/100kHz
2.6 Count Modes

Method of Operation when the Comparison Value Is Reached, Output Pulse Duration
The diagram below provides an example of how hysteresis works. The figure shows the
differences in the behavior of an output when hysteresis of 0 (= switched off) is assigned as
opposed to hysteresis of 3. In the example, the comparison value is 5.
The following settings are assigned for the counter: "Pulse on reaching the comparison
value", "No main count direction" and "pulse duration > 0".
When the comparison conditions have been met, hysteresis becomes active and a pulse of
the assigned duration is output.
If the count value goes outside the hysteresis range, hysteresis is no longer active.
When hysteresis becomes active, the 1Count24V/100kHz stores the count direction.
If the hysteresis range is exited in a different direction to the one stored, a pulse is output.

&RXQW











+\V

+\V
Figure 2-16 Example of How Hysteresis Works

Technological Functions
52 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.6 Count Modes

Controlling the Outputs Simultaneously with the Comparators


If you have selected a comparison function for the outputs, you can continue to control the
outputs with SET_DO1 or SET_DO2. This allows you to simulate the effect of the
comparison functions on your control program:
● The output is set with the positive edge of SET_DO1 or SET_DO2.
However, if the Pulse on Reaching the Comparison Value function is selected, only one
pulse with the specified duration is output. SET_DO1 and SET_DO2 have no effect when
pulse duration = 0.
The SET_DO1 control bit is not permitted with the Switch at Comparison Values output
behavior.
● A negative edge of SET_DO1 or SET_DO2 resets the output.
Note that the comparators are still active and can set or reset the output if the comparison
result changes.

Note
An output set by SET_DO1 or SET_DO2 is not reset by the comparator.

Loading Comparison Values


You transfer the comparison values to the 1Count24V/100kHz. The counting is not affected
by this.

Valid Range for the Two Comparison Values

Main count direction: Main count direction: Main count direction:


None Up Down
Low counting limit –2147483648 1
to to to
high counting limit high counting limit –1 2147483647

Modifying the Function and Behavior of Digital Outputs


You can modify the functions and behavior of the outputs during operation using the control
interface. The 1Count24V/100kHz deletes the outputs and accepts the values as follows:
● Function of digital outputs DO1 and DO2: If you change this function so that the
comparison condition is satisfied, the output is not set until after the next count pulse.
However, if hysteresis is active, the 1Count24V/100kHz does not make any changes at
the output.
● Hysteresis: An active hysteresis (see How Hysteresis Works) continues to be active
following the change. The new hysteresis range is applied the next time the comparison
value is reached.
● Pulse duration: The new pulse duration takes effect with the next pulse.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 53
1Count24V/100kHz
2.6 Count Modes

2.6.10 Assignment of the Feedback and Control Interface for the Count Modes

Note
The following data of the control and feedback interfaces are consistent for the
1Count24V/100kHz:
Bytes 0 to 3
Bytes 4 to 7
Bytes 8 to 11 (modified user data interface)
Use the access or addressing mode for data consistency over the entire control and
feedback interface on your master (only for configuration using the GSD file).

Technological Functions
54 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.6 Count Modes

Assignment Tables

Table 2-3 Feedback Interface (Inputs)

Address Assignment Designation


Bytes 0 to 3 Count value or stored count value in the case of the latch function on the digital input
Byte 4 Bit 7: Short circuit of the encoder supply ERR_24V
Bit 6: Short circuit / wire break / overtemperature ERR_DO1
Bit 5: Parameter assignment error ERR_PARA
Bit 4: Reserve = 0
Bit 3: Reserve = 0
Bit 2: Resetting of status bits active RES_STS_A
Bit 1: Load function error ERR_LOAD
Bit 0: Load function is running STS_LOAD
Byte 5 Bit 7: Down direction status STS_C_DN
Bit 6: Up direction status STS_C_UP
Bit 5: Reserve = 0
Bit 4: DO2 status STS_DO2
Bit 3: DO1 status STS_DO1
Bit 2: Reserve = 0
Bit 1: DI status STS_DI
Bit 0: Internal gate status STS_GATE
Byte 6 Bit 7: Zero-crossing in the count range when counting without a main count STS_ND
direction
Bit 6: Low counting limit STS_UFLW
Bit 5: High counting limit STS_OFLW
Bit 4: Comparator 2 status STS_CMP2
Bit 3: Comparator 1 status STS_CMP1
Bit 2: Reserve = 0
Bit 1: Reserve = 0
Bit 0: Synchronization status STS_SYN
Byte 7 Reserve = 0
Bytes 8 to 11 Count value 1
1 Modified user data interface

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 55
1Count24V/100kHz
2.6 Count Modes

Table 2-4 Control Interface (Outputs)

Address Assignment
Bytes 0 to 3 Load value direct, preparatory, comparison value 1 or 2
Byte 0 Behavior of DO1, DO2 of the 1Count24V/100kHz
Bit 2 Bit 1 Bit 0 Function DO1
0 0 0 Output
0 0 1 Switch on at count ≥ comparison value
0 1 0 Switch on at count ≤ comparison value
0 1 1 Pulse on reaching the comparison value
1 0 0 Switch at comparison values
1 0 1 blocked
1 1 0 blocked
1 1 1 blocked
Bit 5 Bit 4 Function DO2
0 0 Output
0 1 Switch on at count ≥ comparison value
1 0 Switch on at count ≤ comparison value
1 1 Pulse on reaching the comparison value
Bits 3, 6, and 7: Reserve = 0
Bytes 1 to 3 Byte 1: Hysteresis DO1, DO2 (range 0 to 255)
Byte 2: Pulse duration [2ms] DO1, DO2 (range 0 to 255)
Byte 3: Reserve = 0
Byte 4 EXTF_ACK Bit 7: Error diagnostics acknowledgment
CTRL_DO2 Bit 6: Enable DO2
SET_DO2 Bit 5: Control bit DO2
CTRL_DO1 Bit 4: Enable DO1
SET_DO1 Bit 3: Control bit DO1
RES_STS Bit 2: Start resetting of status bit
CTRL_SYN Bit 1: Enable synchronization
SW_GATE Bit 0: SW gate control bit
Byte 5 Bit 7: Reserve = 0
Bit 6: Reserve = 0
Bit 5: Reserve = 0
C_DOPARAM Bit 4: Change function and behavior of DO1, DO2
CMP_VAL2 Bit 3: Load comparison value 2
CMP_VAL1 Bit 2: Load comparison value 1
LOAD_PREPARE Bit 1: Load counter preparatory
LOAD_VAL Bit 0: Load counter direct
Bytes 6 to 7 Reserve = 0 1
1 Not used for modified user interface

Technological Functions
56 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.6 Count Modes

Notes on the Control Bits

Table 2-5 Notes on the Control Bits

Control bits Notes


C_DOPARAM Change function and behavior of DO1, DO2 (see figure below)
The values from bytes 0 to 2 are applied as new function, hysteresis, and pulse duration of DO1,
DO2. This may result in the following error: The conditions for the "Switch at comparison values"
behavior are not fulfilled.
CMP_VAL1 Load comparison value 1 (see figure below)
The value from bytes 0 to 3 is transferred to comparison value 1 with the control bit "Load
comparison value CMP_VAL1".
CMP_VAL2 Load comparison value 2 (see figure below)
The value from bytes 0 to 3 is transferred to comparison value 2 with the control bit "Load
comparison value CMP_VAL2".
CTRL_DO1 Enable DO1
You use this bit to enable the DO1 output.
CTRL_DO2 Enable DO2
You use this bit to enable the DO2 output.
CTRL_SYN You use this bit to enable synchronization.
EXTF_ACK Error acknowledgment
The error bits must be acknowledged with the EXTF_ACK control bit after the cause is removed. (see
figure below)
LOAD_PREPARE Load counter preparatory (see figure below)
The value from bytes 0 to 3 is applied as the load value.
LOAD_VAL The value from bytes 0 to 3 is loaded directly as the new counter value (see figure below).
RES_STS Start resetting of status bit
The status bits are reset through the acknowledgment process between the RES_STS bit and the
RES_STS_A bit. (see figure below)
SET_DO1 Control bit DO1
Switches the DO1 digital output on and off when CTRL_DO1 is set.
SET_DO2 Control bit DO2
Switches the DO2 digital output on and off when CTRL_DO2 is set.
SW_GATE SW gate control bit
The SW gate is opened/closed via the control interface with the SW_GATE bit.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 57
1Count24V/100kHz
2.6 Count Modes

Notes on the Feedback Bits

Table 2-6 Notes on the Feedback Bits

Feedback bits Notes


ERR_24V Short circuit of the encoder supply
The error bit must be acknowledged by the EXTF_ACK control bit (see figure below)
Diagnostic message if assigned.
ERR_DO1 Short circuit/wire break/overtemperature due to overload at output DO1
The error bit must be acknowledged by the EXTF_ACK control bit (see figure below)
Diagnostic message if assigned.
ERR_LOAD Load function error (see figure below)
The LOAD_VAL, LOAD_PREPARE, CMP_VAL1, CMP_VAL2, and C_DOPARAM bits cannot be set
simultaneously during transfer. This results in setting the ERR_LOAD status bit, similar to loading an
incorrect value (which is not accepted).
ERR_PARA Parameter assignment error ERR_PARA
RES_STS_A Resetting of the status bits active (see figure below)
STS_C_DN Down direction status
STS_C_UP Up direction status
STS_CMP1 Comparator 1 status
The STS_CMP1 status bit indicates that the output is or was switched on. It must be acknowledged
with the RES_STS control bit. If the status bit is acknowledged when the output is still switched on,
the bit is set again immediately. This bit is also set if the SET_DO1 control bit is used when DO1 is
not enabled.
STS_CMP2 Comparator 2 status
The STS_CMP2 status bit indicates that the output is or was switched on. It must be acknowledged
with the RES_STS control bit. If the status bit is acknowledged when the output is still switched on,
the bit is set again immediately. This bit is also set if the SET_DO2 control bit is used when DO2 is
not enabled.
STS_DI DI status
The status of the DI is indicated in all modes with the STS_DI bit in the feedback interface.
STS_DO1 DO1 status
The STS_DO1 status bit indicates the status of the DO1 digital output.
STS_DO2 DO2 status
The STS_DO2 status bit indicates the status of the virtual DO2 digital output.
STS_GATE Internal gate status: Counting
STS_LOAD Load function running (see figure below)
STS_ND Zero-crossing in the count range when counting without a main counting direction. The bit must be
reset by the RES_STS control bit.
STS_OFLW High counting limit violated
STS_UFLW Low counting limit violated
Both bits must be reset.
STS_SYN Synchronization status
After successful synchronization, the STS_SYN bit is set. It must be reset by the RES_STS control
bit.

Technological Functions
58 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.6 Count Modes

Access to the Control and Feedback Interface in STEP 7 Programming

Table 2-7 Access to the Control and Feedback Interface in STEP 7 Programming

Configuring with STEP 7 Configuring with STEP 7


using the GSD File 1) using HW Config
(Hardware catalog\PROFIBUS-DP\Additional (Hardware catalog\PROFIBUS-DP\
FIELD DEVICES\I/O\ET 200S) ET 200S)
Feedback interface Read with SFC 14 "DPRD_DAT" Load command (e.g. L PID)
Control interface Write with SFC 15 "DPWR_DAT" Transfer command (e.g. T PQD)
1Load and transfer commands are also possible with CPU 3xxC, CPU 3xx with MMC, CPU 4xx (V3.0 and later), and
WinLC RTX (PC CPU).

Resetting of the Status Bits


STS_SYN, STS_CMP1, STS_CMP2, STS_OFLW, STS_UFLW, STS_ND

(YHQWVWLOOSHQGLQJRQUHVHW

)HHGEDFNVLJQDOV
RQHRIWKHVWDWXVELWV

&RQWUROELW
5(6B676

)HHGEDFNELW
5(6B676B$
W

5HVHWH[HFXWHG

5HTXHVWFDQFHOHG

&RXQW9N+]H[HFXWHVWKHUHVHW

5HTXHVWUHVHW

Figure 2-17 Resetting of the Status Bits

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 59
1Count24V/100kHz
2.6 Count Modes

Acceptance of Values with the Load Function

(UURUELW
(55B/2$'
&RQWUROELW
/2$'B9$/
/2$'B35(3$5(
&03B9$/
&03B9$/
&B'23$5$0

)HHGEDFNELW
676B/2$'
W

9DOXHLVDSSOLHG(QGRIWUDQVIHU

&DQFHOUHTXHVWDQGDQGNHHSYDOXH
DYDLODEOH
&RXQW9N+]KDVXQGHUVWRRGWKHUHTXHVW

5HTXHVWYDOXHWUDQVIHUDQGPDNHYDOXHDYDLODEOH

Figure 2-18 Acceptance of Values with the Load Function

Note
Only one of the following control bits can be set at a particular time:
CMP_VAL1 or CMP_VAL2 or LOAD_VAL or LOAD_PREPARE or C_DOPARAM.
Otherwise, the ERR_LOAD error is reported until all the specified control bits are deleted
again.
The ERR_LOAD error bit is only deleted when the following is carried out correctly.

Technological Functions
60 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.6 Count Modes

Acknowledgment Principle in Isochrone Mode


In isochrone mode, exactly 4 bus cycles are always required to reset the status bits and to
accept values during the load function.

VW'3F\FOH QG'3F\FOH UG'3F\FOH WK'3F\FOH

&RQWUROELW
LQXVHU
SURJUDP

6WDWXVELW
RIPRGXOH

7L 7L 7L 7L 7L

7'3 7'3 7'3 7'3 7'3

Figure 2-19 Acknowledgment Principle in Isochrone Mode

Error Detection
The program errors must be acknowledged. They have been detected by the
1Count24V/100kHz and are indicated in the feedback interface. A channel-specific diagnosis
is carried out if you have enabled group diagnostics in your parameter assignment (see the
ET 200S Distributed I/O System Manual).
The parameter assignment error bit is acknowledged by means of correct parameter
assignment.

$QHUURUKDVRFFXUUHGWKH&RXQW9N+]VHWVDQHUURU
ELWDGLDJQRVWLFPHVVDJHPD\DSSHDUHUURUGHWHFWLRQ
FRQWLQXHV

(UURUHOLPLQDWHGZKHQ(;7)B$&.LVVHWE\WKHXVHU
SURJUDPWKH&RXQW9N+]GHOHWHVWKHHUURUELWD
GLDJQRVWLFPHVVDJHPD\DSSHDU

HJHUURUELW
(55B9

(UURUDFNQRZOHGJPHQW
(;7)B$&.

Figure 2-20 Error Acknowledgment

In the case of continuous error acknowledgment (EXTF_ACK=1) or at CPU/Master Stop, the


1Count24V/100kHz signals errors as soon as they are detected and resets them as soon as
they have been eliminated.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 61
1Count24V/100kHz
2.6 Count Modes

2.6.11 Parameter Assignment for the Count Modes

Introduction
You can use either of the following to assign parameters for the 1Count24V/100kHz:
● A GSD file (http://www.ad.siemens.de/csi/gsd)
● STEP 7 V5.3 SP2 or later

Parameter List for Counting Modes

Table 2-8 Parameter List for Counting Modes

Parameter Value range Default


Enable
Group diagnostics Disable/enable Disable
Behavior in the event of the parent controller failing
Behavior at CPU/Master-STOP Turn off DO1/ Turn off DO1
Continue working mode/
DO1 substitute a value/
DO1 keep last value
Encoder parameters
Signal evaluation A, B Pulse and direction/ Pulse and direction
Rotary encoder single/
double/
quadruple
Encoder and input filter
• At count input (track A) • 2.5 µs/25 µs • 2.5 µs
• At direction input (track B) • 2.5 µs/25 µs • 2.5 µs
• At digital input DI • 2.5 µs/25 µs • 2.5 µs
Sensor A, B, DI 24V P switch, normal mode/ 24V P switch, normal
24V M switch mode
Direction input B Normal/Inverted Normal
Output parameters
Function DO1 Output/ Output
Switch on at count ≥ comparison value/
Switch on at count ≤ comparison value/
Pulse on reaching the comparison value/
Switch at comparison values
Function DO2 Output/ Output
Switch on at count ≥ comparison value/
Switch on at count ≤ comparison value/
Pulse on reaching the comparison value
Substitute value DO1 0/1 0
Diagnostics DO11 Off/on Off
Hysteresis DO1, DO2 0...255 0
Pulse duration [2 ms] DO1, DO2 0...255 0

Technological Functions
62 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.6 Count Modes

Parameter Value range Default


Mode
Counting mode Continuous counting/ Count continuously
One-time counting/
Periodic counting
Gate function Cancel counting/ Cancel counting
Interrupt counting
Input signal HW gate Normal/Inverted Normal
Function DI Input/ Input
HW gate/
Latch and retrigger on positive rising edge/
Synchronization on positive edge
Synchronization2 Once-only/Periodically Once-only
Main count direction None/Up/Down None
High counting limit 2 … 7FFF FFFF 7FFF FFFF
1 DO1 diagnostics (wire break, short circuit) is possible only with pulse lengths of > 90 ms on digital output DO1.
2 Only relevant if Function DI = Synchronization on positive edge

Parameter Assignment Error


● Incorrect mode
● Incorrect main count direction
● The "Input signal HW gate" parameter is set to inverted and the "Function DI" parameter
is not set to HW gate.
● High counting limit incorrect
● The value for the behavior of DO2 is not set to output although "Switch at comparison
values" has been assigned for DO1.
● The value for hysteresis does not equal 0 although "Switch at comparison values" has
been assigned for DO1.

What to Do in the Event of Errors


Check the set value ranges.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 63
1Count24V/100kHz
2.7 Measurement Modes

2.7 Measurement Modes

2.7.1 Overview

Introduction
For the "Measuring Mode" parameter, you can select from the following modes:
● Frequency measurement
● Period measurement
● Rotational speed measurement
For the "Measuring Method" parameter, you can select from the measurement methods:
● With integration time
● Continuous-action
To execute one of these modes, you have to assign parameters to the 1Count24V/100kHz.

Sequence of Measurements with Integration Time


The measurement is carried out during the assigned integration time. When the integration
time elapses, the measured value is updated.
The end of a measurement is indicated by the STS_CMP1 status bit. This bit is reset by the
RES_STS control bit in the control interface.
If there were not at least two rising edges in the assigned integration time, 0 is returned as
the measured value.
A value of -1 is returned up until the end of the first integration time.
You can change the integration time for the next measurement during operation.

Direction Reversal
If the direction of rotation is reversed during an integration time, the measured value for this
measurement period is uncertain. If you evaluate the STS_C_UP and STS_C_DN feedback
bits (direction evaluation), you can respond to any process irregularities.

Technological Functions
64 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.7 Measurement Modes

2.7.2 Sequence of continuous-action measurement

Measuring Principle
The 1Count24/100kHz counts each positive edge of a pulse and assigns it a time value in
µs.
The update time indicates the time interval at which the measured value is updated by the
module in the feedback interface.
The following applies for a pulse train with one or more pulse trains per update time:

Dynamic measuring time = Time of last pulse in the current update time interval
minus
Time of last pulse in the previous update time interval
When the update time has elapsed, a new measured value is calculated and output with the
dynamic measuring time.
If the current update time does not contain a pulse, the following dynamic measuring time
results:

Dynamic measuring time = Time of current, elapsed update time


minus
Time of last pulse
When the update time has elapsed, an estimated measured value is calculated with the
dynamic measuring time under the assumption that a pulse occurred at the end of the
update time.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 65
1Count24V/100kHz
2.7 Measurement Modes

If the "1 Pulse per dynamic measuring time" estimated measured value is less than the last
measured value during the frequency and speed measurement, this estimated measured
value is output as the new measured value. With the period measurement, the dynamic
measuring time is output as the estimated period if the dynamic measuring time is greater
than the last measured period.

8SGDWHWLPH 8SGDWHWLPH 8SGDWHWLPH

'\QDPLF '\QDPLF '\QDPLF


PHDVXULQJWLPH PHDVXULQJWLPH PHDVXULQJWLPH

8SGDWHWLPH 8SGDWHWLPH 8SGDWHWLPH

'\QDPLF
PHDVXULQJWLPH

'\QDPLF
PHDVXULQJWLPH

'\QDPLF
PHDVXULQJWLPH

Figure 2-21 Measuring Principle

The 1Count24V/100kHz measures continuously. When assigning parameters, you specify


an update time.
During the time until the end of the first elapsed update time, a value of "-1" is returned.
The continuous measurement begins after the gate is opened with the first pulse of the pulse
train to be measured. The first measured value can be calculated after the second pulse, at
the earliest.
A measured value (frequency, period, or speed) is output in the feedback interface each time
the update time elapses. The end of a measurement is indicated with the STS_CMP1 status
bits. This bit is reset with the RES_STS and RES_STS_A bits according to the complete
acknowledgement principle.
If the direction of rotation is reversed during an update time, the measured value for this
measurement period is undefined. By evaluating the STS_C_DN and STS_C_UP feedback
bits (direction evaluation), you can respond to any process irregularities.

Technological Functions
66 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.7 Measurement Modes

The following figure illustrates the principle of continuous measurement using frequency
measurement as an example.

*DWH

3XOVHWUDLQ

0HDVXUHG
YDOXH








 8SGDWHWLPH

Figure 2-22 Principle of Continuous Measurement (Frequency Measurement Example)

Gate Control
To control the 1Count24V/100kHz, you have to use the gate functions.

Isochrone Mode
In isochrone mode, the 1Count24V/100kHz accepts control bits and control values from the
control interface in each bus cycle and reports back the response in the same cycle.
In each cycle, the 1Count24V/100kHz transfers a measured value and the status bits that
were valid at time Ti.
The measurement starts and ends at time Ti.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 67
1Count24V/100kHz
2.7 Measurement Modes

Integration Time and Update Time in Isochrone Mode


If the integration time/update time lasts several TDP cycles, you can recognize the new
measured value in the user program at the bit STS_CMP1 status bit (measurement
completed) of the feedback interface. This enables monitoring of the measuring operation or
a synchronization with the measuring operation. It takes 4 TDP cycles, however, for this
message to be acknowledged. The minimum integration time/update time in this case is (4 x
TDP).
If the application can tolerate a jitter in the integration time/update time of TDP and a
measured value that remains constant for several cycles, you do not need to continually
evaluate status bit STS_CMP1. Integration times/update times of (1 x TDP) to (3 x TDP) are
then possible.
Because isochronous operation was lost in the last TDP cycle of the integration time, the
integration time/update time is increased by one TDP cycle. This does not corrupt the
measured value.

Note
The value range limits for the integration time/update time must not be exceeded (see tables
for the individual measuring modes).
A violation of the value range limits will result in a parameter assignment error, and the
1Count24V/100kHz will not go into isochrone mode.

Note
When you change the configuration from non-isochrone to isochrone mode and vice versa,
you must always adjust the integration time/update time parameter if you want to keep the
length of the integration time/update time.

Technological Functions
68 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.7 Measurement Modes

2.7.3 Frequency Measurement

Definition
In frequency measurement mode, the 1Count24V/100kHz counts the pulses that arrive
within a set integration time.

Integration time
Preset the integration time with the integration time parameter (see the table).

Table 2-9 Calculating the Integration Time

Specific Conditions Integration time Range of n


nmin nmax
Non-clocked mode Any TDP n x 10 ms 1 1000
Clocked Mode TDP < 10 ms n x TDP (10 ms/TDP [ms]) +1 1 1000
TDP ≥ 10 ms n x TDP 1 10000 ms/TDP [ms] 1
1Any digits after the decimal point that come about after dividing by TDP can be omitted.
These limits must not be violated. If these limits are violated the 1Count24V/100kHz generates a parameter assignment
error and will not go into clocked mode.

Frequency Measurement
The value of the calculated frequency is made available in the unit Hz*10-3. The measured
frequency value can be read at the feedback interface (byte 0 to 3).

,QWHJUDWLRQWLPH

Q PV Q PV

&RXQWSXOVHV

,QWHUQDOJDWH
%HJLQQLQJRIIUHTXHQF\ (QGRIIUHTXHQF\
PHDVXUHPHQW PHDVXUHPHQW

Figure 2-23 Frequency Measurement with Gate Function

(1) Internal Gate


(2) Count pulses
(3) Integration time
(4) End of frequency measurement
(5) Beginning of frequency measurement

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 69
1Count24V/100kHz
2.7 Measurement Modes

Limit-Value Monitoring
The following value ranges are permitted for limit-value monitoring:

Lower limit fu Upper limit fo


0 to 99,999,999 Hz*10-3 fu+1 to 100,000,000 Hz*10-3

Possible Measurement Ranges with Error Indication

Integration time fmin + absolute error fmax + absolute error


10 s 0.1 Hz ± 0.001 Hz 100000 Hz ± 18 Hz
1s 1 Hz ± 0.001 Hz 100000 Hz ± 11 Hz
0.1 s 10 Hz ± 0.002 Hz 100000 Hz ± 10 Hz
0.01 s 100 Hz ± 0.013 Hz 100000 Hz ± 13 Hz

Function of the Digital Input


Select one of the following functions for the digital input:
● Input
● Hardware gate

Function of the DO1 Digital Output


Select one of the following functions for the DO1 digital output:
● Output (no switching by means of limit-value monitoring)
● Measured value outside the limits
● Measured value under the lower limit
● Measured value over the upper limit

Changing values during operation


The following values can be changed during operation:
● Lower limit (LOAD_PREPARE)
● Upper limit (LOAD_VAL)
● Function of the DO1 (C_DOPARAM) digital output
● Integration time (C_INTTIME)

Technological Functions
70 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.7 Measurement Modes

2.7.4 Continuous Frequency Measurement

Definition
In frequency measurement mode, the 1Count24V/100kHz counts the pulses that arrive
within a dynamic measuring time.

Update Time
The 1Count24V/100kHz updates the measured values cyclically. You preset the update time
with the Update Time parameter (see table). You can change the update time during
operation.

Table 2-10 Calculation of the Update Time

Boundary conditions Update time Range of n


nmin nmax
Non-isochrone mode Any TDP n x 10 ms 1 1000
Isochrone mode TDP < 10 ms n x TDP (10 ms/TDP [ms]) +1 1 1000
TDP ≥ 10 ms n x TDP 1 10000 ms/TDP [ms] 1
1 Any digits after the decimal point that come about after dividing by TDP are omitted.
These limits must not be violated. If these limits are violated, the 1Count24V/100kHz generates a parameter assignment
error and will not go into isochrone mode.

Frequency Measurement
The value of the calculated frequency is made available in the unit Hz*10-3. The measured
frequency value can be read in the feedback interface (byte 0 to 3).

8SGDWHWLPH 8SGDWHWLPH

&RXQWSXOVHV

,QWHUQDOJDWH

6WDUWRIIUHTXHQF\ (QGRI
PHDVXUHPHQW IUHTXHQF\PHDVXUHPHQW

Figure 2-24 Frequency Measurement with Gate Function

Limit-Value Monitoring
The following value ranges are permitted for limit-value monitoring:

Encoder type Low limit fu High limit fo


24-V encoders 0 to 99,999,999 Hz*10-3 fu+1 to 100,000,000 Hz*10-3

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 71
1Count24V/100kHz
2.7 Measurement Modes

Possible Measuring Ranges with Error Indication

Frequency f Absolute error


0.1 Hz ±0.001 Hz
1 Hz ±0.001 Hz
10 Hz ±0.003 Hz
100 Hz ±0.02 Hz
1 000 Hz ±0.18 Hz
10 000 Hz ±1.8 Hz
100 000 Hz ±18 Hz

Function of the Digital Input


For the "Function DI" parameter, select one of the following functions for the digital input:
● Input
● HW gate

Function of the Digital Output DO1


For the "Function DO1" parameter, select one of the following functions for the DO1 digital
output:
● Output (no switching by the limit-value monitoring)
● Measured value outside the limits
● Measured value under the low limit
● Measured value over the high limit

Changing Values during Operation


The following values can be changed during operation:
● Low limit (LOAD_PREPARE)
● High limit (LOAD_VAL)
● Function of the Digital Output DO1 (C_DOPARAM)
● Integration time/update time (C_INTTIME)

See also
Gate Functions in Measurement Modes (Page 83)
Behavior of the Output in Measurement Modes (Page 84)
Assignment of the Feedback and Control Interfaces for the Measurement Modes (Page 86)

Technological Functions
72 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.7 Measurement Modes

2.7.5 Rotational Speed Measurement

Definition
In rotational speed measurement mode, the 1Count24V/100kHz counts the pulses that arrive
from a rotary encoder within a set integration time and calculates the speed of the connected
motor.

Integration Time
You preset the integration time with the Integration Time parameter (see table).

Table 2-11 Calculation of the Integration Time

Boundary conditions Integration time Range of n


nmin nmax
Non-isochrone mode Any TDP n x 10 ms 1 1000
Isochrone mode TDP < 10 ms n x TDP (10 ms/TDP [ms]) + 11 1000
TDP ≥ 10 ms n x TDP 1 10000 ms/TDP [ms] 1
1 Any digits after the decimal point that come about after dividing by TDP are omitted.
These limits must not be violated. If these limits are violated, the 1Count24V/100kHz generates a parameter assignment
error and will not go into isochrone mode.

Rotational Speed Measurement


For rotational speed measurement mode, you also have to assign the pulses per encoder or
motor revolution.
The rotational speed is returned in the unit 1x10-3 /min.

,QWHJUDWLRQWLPH ,QWHJUDWLRQWLPH

&RXQWSXOVHV

,QWHUQDO*DWH

%HJLQQLQJRIURWDWLRQDO (QGRIURWDWLRQDO
VSHHGPHDVXUHPHQW VSHHGPHDVXUHPHQW

Figure 2-25 Rotational Speed Measurement with Gate Function

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 73
1Count24V/100kHz
2.7 Measurement Modes

Limit-Value Monitoring
The following value ranges are permitted for limit-value monitoring:

Low limit nu High limit no


0 to 24 999 999 x10-3 /min nu+1 to 25 000 000 x10-3 /min

Possible Measuring Ranges with Error Indication

Table 2-12 Possible Measuring Ranges with Error Indication (Number of Pulses per Encoder
Revolution = 60)

Integration time nmin ± absolute error nmax ± absolute error


10 s 1 /min ± 0.03 /min 25000 /min ± 4.5 /min
1s 1 /min ± 0.03 /min 25000 /min ± 2.8 /min
0.1 s 10 /min ± 0.03 /min 25000 /min ± 2.6 /min
0.01 s 100 /min ± 0.04 /min 25000 /min ± 3.2 /min

Technological Functions
74 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.7 Measurement Modes

2.7.6 Continuous Rotational Speed Measurement

Definition
In rotational speed measurement mode, the 1Count24V/100kHz counts the pulses that are
received from a tachometer generator within a dynamic measuring time and calculates the
speed from this value with the number of pulses per encoder revolution.

Update Time
The 1Count24V/100kHz updates the measured values cyclically. You preset the update time
with the Update Time parameter (see table). You can change the update time during
operation.

Table 2-13 Calculation of the Update Time

Boundary conditions Update time Range of n


nmin nmax
Non-isochrone mode Any TDP n x 10 ms 1 1000
Isochrone mode TDP < 10 ms n x TDP (10 ms/TDP [ms]) + 1 1 1000
TDP ≥ 10 ms n x TDP 1 10000 ms/TDP [ms] 1
1 Any digits after the decimal point that come about after dividing by TDP are omitted.
These limits must not be violated. If these limits are violated, the 1Count24V/100kHz generates a parameter assignment
error and will not go into isochrone mode.

Rotational Speed Measurement


For the rotational speed measurement mode, you must also assign the pulses per encoder
revolution.
The rotational speed is returned in the unit 1x10-3 /min.

8SGDWHWLPH 8SGDWHWLPH

&RXQWSXOVHV

,QWHUQDOJDWH

6WDUWRIURWDWLRQDOVSHHG (QGRI
PHDVXUHPHQW URWDWLRQDOVSHHGPHDVXUHPHQW

Figure 2-26 Rotational Speed Measurement with Gate Function

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 75
1Count24V/100kHz
2.7 Measurement Modes

Limit-Value Monitoring
The following value ranges are permitted for limit-value monitoring:

Low limit nu High limit no


0 to 24 999 999 x10-3 /min nu+1 to 25 000 000 x10-3 /min

Possible Measuring Ranges with Error Indication

Table 2-14 Possible Measuring Ranges with Error Indication (Number of Pulses per Encoder
Revolution = 60)

Rotational speed n Absolute error


1 /min ±0.04 /min
10 /min ±0.04 /min
100 /min ±0.05 /min
1 000 /min ±0.21 /min
10 000 /min ±1.82 /min
25 000 /min ±4.50 /min

Function of the Digital Input


For the "Function DI" parameter, select one of the following functions for the digital input:
● Input
● HW gate

Function of the Digital Output DO1


For the "Function DO1" parameter, select one of the following functions for the DO1 digital
output:
● Output (no switching by the limit-value monitoring)
● Measured value outside the limits
● Measured value under the low limit
● Measured value over the high limit

Technological Functions
76 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.7 Measurement Modes

Values that Can Be Changed During Operation


● Low limit (LOAD_PREPARE)
● High limit (LOAD_VAL)
● Function of the digital output DO1 (C_DOPARAM)
● Integration time/update time (C_INTTIME)

See also
Gate Functions in Measurement Modes (Page 83)
Behavior of the Output in Measurement Modes (Page 84)
Assignment of the Feedback and Control Interfaces for the Measurement Modes (Page 86)

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 77
1Count24V/100kHz
2.7 Measurement Modes

2.7.7 Period Measurement

Definition
In period measurement mode, the 1Count24V/100kHz measures the time between two
positive edges of the counting signal by counting the pulses of an internal quartz-accurate
reference frequency (16 MHz) within a preset integration time.

Integration Time
You preset the integration time with the Integration Time parameter (see table).

Table 2-15 Calculation of the Integration Time

Boundary conditions Integration time Range of n


nmin nmax
Non-isochrone mode Any TDP n x 10 ms 1 12000
Isochrone mode TDP < 10 ms n x TDP 10 ms/TDP [ms] +1 1 12000
TDP ≥ 10 ms n x TDP 1 120000 ms/TDP [ms] 1
1 Any digits after the decimal point that come about after dividing by TDP are omitted.
These limits must not be violated. If these limits are violated, the 1Count24V/100kHz generates a parameter assignment
error and will not go into isochrone mode.

Period Measurement
The value of the calculated period is given in the unit 1 µs and 1/16 µs. The measured period
can be read in the feedback interface (byte 0 to 3).

,QWHJUDWLRQWLPH ,QWHJUDWLRQWLPH
3HULRG

&RXQWSXOVHV

,QWHUQDOJDWH

6WDUWRISHULRG (QGRISHULRG
PHDVXUHPHQW PHDVXUHPHQW

Figure 2-27 Period Measurement with Gate Function

Limit-Value Monitoring
The following value ranges are permitted for limit-value monitoring:

Technological Functions
78 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.7 Measurement Modes

1 µs resolution

Low limit Tu High limit To


0 to 119 999 999 µs Tu+1 to 120 000 000 µs

1/16 µs resolution

Low limit Tu High limit To


0 to 1 919 999 999 µs Tu+1 to 1 920 000 000 µs

Possible Measuring Ranges with Error Indication

1 µs resolution

Integration time Tmin ± absolute error T ± absolute error


100 s 1 µs* (10 ± 0) 1 µs* (100 000 000 ± 10 000)
10 s 1 µs* (10 ± 0) 1 µs* (10 000 000 ± 1 000)
1s 1 µs* (10 ± 0) 1 µs* (1 000 000 ± 100)
0.1 s 1 µs* (10 ± 0) 1 µs* (100 000 ± 10)
0.01 s 1 µs* (10 ± 0) 1 µs* (10 000 ± 1)

1/16 µs resolution

Integration time Tmin ± absolute error T ± absolute error


100 s 1/16 µs* (160 ± 0) 1/16 µs* (1 600 000 000 ± 160 000)
10 s 1/16 µs* (160 ± 0) 1/16 µs* (160 000 000 ± 16 000)
1s 1/16 µs* (160 ± 0) 1/16 µs* (16 000 000 ± 1 600)
0.1 s 1/16 µs* (160 ± 0) 1/16 µs* (1 600 000 ± 160)
0.01 s 1/16 µs* (160 ± 0) 1/16 µs* (160 000 ± 16)

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 79
1Count24V/100kHz
2.7 Measurement Modes

2.7.8 Continuous Period Measurement

Definition
In period measurement mode, the 1Count24V/100kHz indicates the dynamic measuring time
as a period. If the period is less than the update time, then an average is calculated for the
period.

Update Time
The 1Count24V/100kHz updates the measured values cyclically. You preset the update time
with the Update Time parameter (see table). You can change the update time during
operation.

Table 2-16 Calculation of the Update Time

Boundary conditions Update time Range of n


nmin nmax
Non-isochrone mode Any TDP n x 10 ms 1 12000
Isochrone mode TDP < 10 ms n x TDP 10 ms/TDP [ms] +1 1 12000
TDP ≥ 10 ms n x TDP 1 120000 ms/TDP [ms] 1
1 Any digits after the decimal point that come about after dividing by TDP are omitted.
These limits must not be violated. If these limits are violated, the 1Count24V/100kHz generates a parameter assignment
error and will not go into isochrone mode.

Period Measurement
The value of the calculated period is given in the unit 1 µs and 1/16 µs. The measured period
can be read in the feedback interface (byte 0 to 3).

8SGDWHWLPH 8SGDWHWLPH
3HULRG

&RXQWSXOVHV

,QWHUQDOJDWH

6WDUWRISHULRGPHDVXUH (QGRISHULRGPHDVXUH
PHQW PHQW

Figure 2-28 Period Measurement with Gate Function

Limit-Value Monitoring
The following value ranges are permitted for limit-value monitoring:

Technological Functions
80 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.7 Measurement Modes

1 µs resolution

Low limit Tu High limit To


0 to 119 999 999 µs Tu+1 to 120 000 000 µs

1/16 µs resolution

Low limit Tu High limit To


0 to 1 919 999 999 µs Tu+1 to 1 920 000 000 µs

Possible Measuring Ranges with Error Indication

1 µs resolution

Period Tmin ± Absolute error Period Tmin ± Absolute error


1 µs* (10 ± 0) 1 µs* (100 000 ± 10)
1 µs* (100 ± 0) 1 µs* (1 000 000 ± 100)
1 µs* (1 000 ± 0) 1 µs* (10 000 000 ± 1 002)
1 µs* (10 000 ± 0) 1 µs* (100 000 000 ± 10 020)

1/16 µs resolution

Period Tmin ± Absolute error Period Tmin ± Absolute error


1/16 µs* (160 ± 1) 1/16 µs* (1 600 000 ± 160)
1/16 µs* (1 600 ± 1) 1/16 µs* (16 000 000 ± 1 600)
1/16 µs* (16 000 ± 3) 1/16 µs* (160 000 000 ± 16 000)
1/16 µs* (160 000 ± 20) 1/16 µs* (1 600 000 000 ± 160 000)

Function of the Digital Input


For the "Function DI" parameter, select one of the following functions for the digital input:
● Input
● HW gate

Function of the Digital Output DO1


For the "Function DO1" parameter, select one of the following functions for the digital output:
● Output (no switching by the limit-value monitoring)
● Measured value outside the limits
● Measured value under the low limit
● Measured value over the high limit

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 81
1Count24V/100kHz
2.7 Measurement Modes

Values that Can Be Changed During Operation


● Low limit (LOAD_PREPARE)
● High limit (LOAD_VAL)
● Function of the Digital Output DO1 (C_DOPARAM)
● Integration time/update time (C_INTTIME)

See also
Gate Functions in Measurement Modes (Page 83)
Behavior of the Output in Measurement Modes (Page 84)
Assignment of the Feedback and Control Interfaces for the Measurement Modes (Page 86)

Technological Functions
82 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.7 Measurement Modes

2.7.9 Gate Functions in Measurement Modes

Software Gate and Hardware Gate


The 1Count24V/100kHz has two gates
● A software gate (SW gate), which is controlled by the SW_GATE control bit.
The software gate can only be opened by a positive edge of the SW_GATE control bit. It
is closed when this bit is reset. Note the transfer times and run times of your control
program.
● A hardware gate (HW gate), which is controlled by the digital input on the
1Count24V/100kHz. You assign the hardware gate as the function of the digital input
(Function DI "HW Gate"). It is opened on a positive edge at the digital input and closed on
a negative edge.

Internal gate
The internal gate is the logical AND operation of the HW gate and SW gate. Counting is only
active when the HW gate and the SW gate are open. The STS_GATE feedback bit (internal
gate status) indicates this. If a HW gate has not been assigned, the setting of the SW gate is
decisive.

Gate Control
Gate control by means of the SW gate only
The opening/closing of the SW gate starts/stops measurement.
If the SW gate is opened in isochrone mode in bus cycle "n" by setting the SW_GATE control
bit, measurement starts at time Ti in cycle "n+1".
Gate control by SW gate and HW hate
The opening and closing of the SW gate with the HW gate open starts/stops measurement.
The opening and closing of the HW gate with the SW gate open starts/stops measurement.
The SW gate is opened/closed by means of the control interface with the SW_GATE bit.
The HW gate is opened/closed by means of a 24-V signal on the digital input.
In isochrone mode, when the SW gate is open, measurement starts at time Ti, immediately
after the HW gate has opened. The measurement ends at time Ti, which occurs immediately
after the HW gate has closed.
When the HW gate is open, the measurement starts at time Ti in the cycle, immediately after
the SW has opened, and ends at time Ti in the cycle, which occurs immediately after the SW
gate has closed.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 83
1Count24V/100kHz
2.7 Measurement Modes

2.7.10 Behavior of the Output in Measurement Modes

Introduction
The various ways of setting the behavior of the output are described in this section.

Behavior of the Output in Measuring Modes


You can assign parameters for the digital output of the 1Count24V/100kHz.
You can store a high and a low limit for frequency measurement, rotational speed
measurement or period measurement. If the limits are violated, digital output DO1 is
activated. These limit values can be assigned and changed with the load function.
You can change the function and the behavior of the digital output during operation. The new
function takes effect immediately. In isochrone mode it always takes effect at time Ti.
You can choose from the following functions:
● Output
● Measured value outside the limits (limit-value monitoring)
● Measured value under the low limit (limit-value monitoring)
● Measured value over the high limit (limit-value monitoring)

Output
If you want to switch the output on or off, you must enable it with the CTRL_DO1 control bit.
You can switch the output on and off with the SET_DO1 control bit.
You can query the status of the output with the STS_DO1 status bit in the feedback
interface.
In isochrone mode, the output is switched at time To.

Technological Functions
84 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.7 Measurement Modes

Limit-Value Monitoring

8)/: 2)/:


*DWHVWDUW
0HDVXUHGYDOXH
/RZ +LJK
OLPLW OLPLW

Figure 2-29 Limit-Value Monitoring

After the integration time elapses, the measured value obtained (frequency, rotational speed,
or period) is compared with the assigned limit values.
If the current measured value is under the assigned low limit (measured value <low limit), the
STS_UFLW = 1 bit is set in the feedback interface.
If the current measured value is over the assigned high limit (measured value > high limit),
the STS_OFLW = 1 bit is set in the feedback interface.
You must acknowledge these bits with the RES_STS control bit.
If the measured value is still outside or again outside the limits after acknowledgment, the
corresponding status bit is set again.
If you set the low limit at 0, you switch off dynamic monitoring of violation of the low limit
value.
Depending on the parameter assignment, the enabled digital output DO1 can be set by the
limit-value monitoring:

"Function DO1" parameter DO1 is Set ...


Measured value outside the limits Measured value < low limit
OR
measured value > high limit
Measured value under the low limit Measured value < low limit
Measured value over the high limit Measured value > high limit
In isochrone mode the output is switched at the end of measurement at time Ti.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 85
1Count24V/100kHz
2.7 Measurement Modes

2.7.11 Assignment of the Feedback and Control Interfaces for the Measurement Modes

Note
The following data of the control and feedback interfaces are consistent for the
1Count24V/100kHz:
Bytes 0 to 3
Bytes 4 to 7
Bytes 8 to 11 (modified user data interface)
Use the access or addressing mode for data consistency over the entire control and
feedback interface on your master (only for configuration using the GSD file).

Assignment Tables

Table 2-17 Feedback Interface (Inputs)

Address Assignment Designation


Bytes 0 to 3 Measured value
Byte 4 Bit 7: Short circuit of the encoder supply ERR_24V
Bit 6: Short circuit / wire break / overtemperature ERR_DO
Bit 5: Parameter assignment error ERR_PARA
Bit 4: Reserve = 0
Bit 3: Reserve = 0
Bit 2: Resetting of status bits active RES_STS_A
Bit 1: Load function error ERR_LOAD
Bit 0: Load function is running STS_LOAD
Byte 5 Bit 7: Down direction status STS_C_DN
Bit 6: Up direction status STS_C_UP
Bit 5: Reserve = 0
Bit 4: Reserve = 0
Bit 3: DO1 status STS_DO1
Bit 2: Reserve = 0
Bit 1: DI status STS_DI
Bit 0: Internal gate status STS_GATE
Byte 6 Bit 7: Reserve = 0
Bit 6: Low limit of measuring range STS_UFLW
Bit 5: High limit of measuring range STS_OFLW
Bit 4: Reserve = 0
Bit 3: Measurement completed STS_CMP1
Bit 2: Reserve = 0
Bit 1: Reserve = 0
Bit 0: Reserve = 0

Technological Functions
86 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.7 Measurement Modes

Address Assignment Designation


Byte 7 Reserve = 0
Bytes 8 to 11 Count value 1
1 Modified user data interface

Table 2-18 Control Interface (Outputs)

Address Assignment
Bytes 0 to 3 Low limit or high limit
Function of DO1
Byte 0: Bit 1 Bit 0 Function DO1
0 0 Output
0 1 Measured value outside the limits
1 0 Measured value under the low limit
1 1 Measured value over the high limit
Bytes 1 to 3: Reserve = 0
Integration time
Byte 0, 1: Integration time [n*10ms]
(Range 1 to 1000/12000)
Byte 2, 3: Reserve = 0
Byte 4 Bit 7: Error diagnostics acknowledgement EXTF_ACK
Bit 6: Reserve = 0
Bit 5: Reserve = 0
Bit 4: Enable DO1 CTRL_DO1
Bit 3: Control bit DO1 SET_DO1
Bit 2: Start resetting of status bit RES_STS
Bit 1: Reserve = 0
Bit 0: SW gate control bit SW_GATE
Byte 5 Bit 7: Reserve = 0
Bit 6: Reserve = 0
Bit 5: Reserve = 0
Bit 4: Change function of DO1, C_DOPARAM
Bit 3: Reserve = 0
Bit 2: Change integration time, C_INTTIME
Bit 1: Load high limit LOAD_PREPARE
Bit 0: Load low limit LOAD_VAL
Bytes 6 to 7 Reserve = 0 1

1 Not used for modified user interface

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 87
1Count24V/100kHz
2.7 Measurement Modes

Notes on the Control Bits

Table 2-19 Notes on the Control Bits

Control bits Notes


C_DOPARAM Change function of DO1 (see figure below)
The value from byte 0 is adopted as the new function of DO1.
C_INTTIME Change integration time (see figure below)
The value from bytes 0 and 1 is adopted as the new integration time for the next measurement.
CTRL_DO1 Enable DO1
You use this bit to enable the DO1 output.
EXTF_ACK Error acknowledgment
The error bits must be acknowledged with the EXTF_ACK control bit after the cause is removed. (see
figure below)
LOAD_PREPARE Load high limit (see figure below)
The value from bytes 0 to 3 is adopted as the new high limit.
LOAD_VAL Load low limit (see figure below)
The value from bytes 0 to 3 is adopted as the new low limit.
RES_STS Start resetting of status bit
The status bits are reset through the acknowledgment process between the RES_STS bit and the
RES_STS_A bit. (see figure below)
SET_DO1 Control bit DO1
Switches the DO1 digital output on and off when CTRL_DO1 is set.
SW_GATE SW gate control bit
The SW gate is opened/closed via the control interface with the SW_GATE bit.

Technological Functions
88 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.7 Measurement Modes

Notes on the Feedback Bits

Table 2-20 Notes on the Feedback Bits

Feedback bits Notes


ERR_24V Short circuit of the encoder supply
The error bit must be acknowledged by the EXTF_ACK control bit (see figure below)
Diagnostic message if assigned.
ERR_DO1 Short circuit/wire break/overtemperature at output DO1
The error bit must be acknowledged by the EXTF_ACK control bit (see figure below)
Diagnostic message if assigned.
ERR_LOAD Load function error (see figure below)
The LOAD_VAL, LOAD_PREPARE, C_DOPARAM, and C_INTTIME bits cannot be set
simultaneously during transfer. This results in setting the ERR_LOAD status bit, similar to loading an
incorrect value (which is not accepted).
ERR_PARA Parameter assignment error ERR_PARA
RES_STS_A Resetting of the status bits active (see figure below)
STS_C_DN Down direction status
STS_C_UP Up direction status
STS_CMP1 Measurement completed
After every elapsed time interval (update time/integration time), the measured value is updated.
Measurement with integration time
The end of a measurement (after the interval has elapsed) is indicated with the STS_CMP1 status
bit.
Continuous measurement
At the end of the update time, the end of the measurement is signaled with status bit STS_CMP1 if a
measured value is output. The bit remains 0 if an estimated measured value is output.
This bit is reset by the RES_STS control bit in the control interface.
STS_DI DI status
The status of the DI is indicated in all modes with the STS_DI bit in the feedback interface.
STS_DO1 DO1 status
STS_GATE Internal gate status: Measuring
STS_LOAD Load function running (see figure below)
STS_OFLW High measuring limit violated
STS_UFLW Low measuring limit violated
Both bits must be reset.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 89
1Count24V/100kHz
2.7 Measurement Modes

Access to the Control and Feedback Interface in STEP 7 Programming

Table 2-21 Access to the Control and Feedback Interface in STEP 7 Programming

Configuring with STEP 7 Configuring with STEP 7


using the GSD file 1) using HW Config
(Hardware catalog\PROFIBUS-DP\Additional (Hardware catalog\PROFIBUS-DP\
FIELD DEVICES\I/O\ET 200S) ET 200S)
Feedback interface Read with SFC 14 "DPRD_DAT" Load command (e.g. L PID)
Control interface Write with SFC 15 "DPWR_DAT" Transfer command (e.g. T PQD)
1Load and transfer commands are also possible with CPU 3xxC, CPU 3xx with MMC, CPU 4xx (V3.0 and later), and
WinLC RTX (PC CPU).

Resetting of the Status Bits


STS_CMP1, STS_OFLW, STS_UFLW

(YHQWVWLOOSHQGLQJRQUHVHW

)HHGEDFNVLJQDOV
RQHRIWKHVWDWXVELWV

&RQWUROELW
5(6B676

)HHGEDFNELW
5(6B676B$
W

5HVHWH[HFXWHG

5HTXHVWFDQFHOHG

&RXQW9N+]H[HFXWHVWKHUHVHW

5HTXHVWUHVHW

Figure 2-30 Resetting of the Status Bits

Technological Functions
90 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.7 Measurement Modes

Acceptance of Values with the Load Function

(UURUELW
(55B/2$'

&RQWUROELW
/2$'B9$/
/2$'B35(3$5(
&B'23$5$0
&B,177,0(

)HHGEDFNELW
676B/2$'
W

9DOXHLVDSSOLHG(QGRIWUDQVIHU

&DQFHOUHTXHVWDQGDQGNHHSYDOXH
DYDLODEOH
&RXQW9N+]KDVXQGHUVWRRGWKHUHTXHVW

5HTXHVWYDOXHWUDQVIHUDQGPDNHYDOXHDYDLODEOH

Figure 2-31 Acceptance of Values with the Load Function

Note
Only one of the following control bits can be set at a particular time:
LOAD_VAL or LOAD_PREPARE or C_DOPARAM or C_INTTIME.
Otherwise, the ERR_LOAD error is reported until all the specified control bits are deleted
again.
The ERR_LOAD error bit is only deleted when a correct value is transferred as follows.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 91
1Count24V/100kHz
2.7 Measurement Modes

Acknowledgment Principle in Isochrone Mode


In isochrone mode, exactly 4 bus cycles are always required to reset the status bits and to
accept values during the load function.

VW'3F\FOH QG'3F\FOH UG'3F\FOH WK'3F\FOH

&RQWUROELW
LQXVHU
SURJUDP

6WDWXVELW
RIPRGXOH

7L 7L 7L 7L 7L

7'3 7'3 7'3 7'3 7'3

Figure 2-32 Acknowledgment Principle in Isochrone Mode

Error Detection
The diagnostic errors must be acknowledged. They have been detected by the
1Count24V/100kHz and are indicated in the feedback interface. A channel-specific diagnosis
is carried out if you have enabled group diagnostics in your parameter assignment (see the
ET 200S Distributed I/O System Manual).
The parameter assignment error bit is acknowledged by means of correct parameter
assignment.

$QHUURUKDVRFFXUUHGWKH&RXQW9N+]VHWVDQHUURU
ELWDGLDJQRVWLFPHVVDJHPD\DSSHDUHUURUGHWHFWLRQ
FRQWLQXHV

(UURUHOLPLQDWHGZKHQ(;7)B$&.LVVHWE\WKHXVHU
SURJUDPWKH&RXQW9N+]GHOHWHVWKHHUURUELWD
GLDJQRVWLFPHVVDJHPD\DSSHDU

HJHUURUELW
(55B9

(UURUDFNQRZOHGJPHQW
(;7)B$&.

Figure 2-33 Error Acknowledgment

In the case of continuous error acknowledgment (EXTF_ACK=1) or at CPU/Master Stop, the


1Count24V/100kHz signals the errors as soon as they are detected and deletes them as
soon as they have been eliminated.

Technological Functions
92 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.7 Measurement Modes

2.7.12 Parameter Assignment for Measurement Modes

Introduction
You can use either of the following to assign parameters for the 1Count24V/100kHz:
● A GSD file (http://www.ad.siemens.de/csi/gsd)
● STEP 7 V5.3 SP2 or later

Parameter List for Measuring Modes

Table 2-22 Parameter List for Measuring Modes

Parameter Value Range Default


Enable
Group diagnostics Disable/enable Disable
Behavior in the event of the parent controller failing
Behavior at CPU/Master-STOP Turn off DO1/ Turn off DO1
Continue working mode/
DO1 substitute a value/
DO1 keep last value
Encoder parameters
Signal evaluation A, B Pulse and direction/ Pulse and Direction
Rotary encoder (single)
Encoder and input filter
- At count input (track A) 2.5 µs/25 µs 2.5 µs
- At direction input (track B) 2.5 µs/25 µs 2.5 µs
- At digital input DI 2.5 µs/25 µs 2.5 µs
Sensor A, B, DI 24V P switch, normal mode/ 24V P switch, normal mode
24V M switch
Direction input B Normal/Inverted Normal
Output parameters
Diagnostics DO11 Off/on Off
Function DO1 Output/ Output
Outside the limits/
Under the low limit/
Over the high limit
Substitute value DO1 0/1 0

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 93
1Count24V/100kHz
2.7 Measurement Modes

Parameter Value Range Default


Mode
Measuring mode Frequency measurement/ Frequency measurement
Rotational speed measurement/
Period measurement
Measuring method With integration time/continuous With integration time
Resolution of period 1 µs 1 µs
1/16 µs
Function DI Input/HW gate Input
Input signal HW gate Normal/Inverted Normal
Low limit Frequency measurement:
0...fmax-1 0
Rotational speed measurement:
0...nmax-1 0
Period measurement:
0...Tmax-1 0
High limit Frequency measurement:
low limit+1...fmax fmax
Rotational speed measurement:
low limit+1...nmax nmax
Period measurement:
low limit+1...Tmax tmax
Integration time [n*10ms] (update time) Frequency measurement:
1 to 1000 10
Rotational speed measurement:
1 to 1000 10
Period measurement:
1 to 12000 10
Encoder pulses per revolution2 1...65535 1
1 DO1 diagnostics (wire break, short circuit) is possible only with pulse lengths of > 90 ms on digital output DO1.
2 Only relevant in rotational speed measurement mode

Parameter Assignment Error


The following parameter assignment errors may occur:
● Incorrect mode
● Low limit incorrect
● High limit incorrect
● Integration time incorrect
● Encoder pulses incorrect

What to Do in the Event of Errors


Check the set value ranges.

Technological Functions
94 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.8 Fast mode

2.8 Fast mode

2.8.1 Overview

Introduction
This mode is suitable for position detection is especially short isochronous cycles.
This mode represents a subset of the functionality of the continuous counting mode.
It is intended for isochronous mode and differs from continuous counting by having a lower
TDP Modulemin and a TWA equal to zero. The module is operated in this mode as a pure
input module, i.e., there is no control interface in this operating mode.
This mode is available starting with FW Version V2.0 of the module. The module must be
configured as "1Count24V Fast Mode V2.0" in HW Config.

Maximum Count Range


A total of 25 bits are available for the count value.

Load Value
You can specify a load value for the 1Count24V.
This load value is applied directly as the start value.

Gate Control
To control the 1Count24V, you can use the HW gate.

State according to Parameter Assignment


Count value corresponds to the load value set in HW Config.

Isochronous Mode
In each cycle, the 1Count24V transfers the count and the status bits that were valid at time
T i.

See also
Assigning parameters for fast mode (Page 100)

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 95
1Count24V/100kHz
2.8 Fast mode

2.8.2 Fast mode

Definition
In this mode, the 1Count24V counts continuously starting from the start value:
When counting up, if the 1Count24V reaches the maximum value that can be represented
with 25 bits (all bits of the counter are set) and another count pulse arrives, the count value
jumps to "0" and resumes counting from there without losing a pulse.
When counting down, if the 1Count24V reaches the value "0" and another count pulse
arrives, the count value jumps to the maximum value that can be represented with 25 bits (all
bits of the counter are set) and resumes counting without losing a pulse.

Function of the Digital Input


For the "Function DI" parameter, select between the following functions:
Digital input off.
● Input
● HW gate
● Synchronization on positive edge

See also
Assigning parameters for fast mode (Page 100)
Synchronization (Page 97)
Gate function in the case of fast mode (Page 96)

2.8.3 Gate function in the case of fast mode

Hardware Gate
The 1Count24V has a HW gate, which can be controlled via the digital input on the
1Count24V.
You assign the hardware gate as the function of the digital input (Function DI "HW Gate"). It
is opened on a positive edge at the digital input and closed on a negative edge.
If no HW gate is assigned, counting becomes active immediately.
The STS_GATE checkback signal indicates whether counting is active.
When the HW gate is opened, this causes counting to continue starting from the current
count.

Technological Functions
96 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.8 Fast mode

2.8.4 Synchronization

Introduction
In order to use this function, you must first select it with the "Synchronize on Positive Edge"
Function DI parameter.

,QWHUQDOFRXQWSXOVHV
XSRUGRZQ

'LJLWDO,QSXW
]HURPDUN

&RXQWYDOXH
6WDUWYDOXH

If you have assigned synchronization, the positive edge of a reference signal on the input
sets the 1Count24V to the start value.
The following conditions apply:
● Fast mode must be active (HW gate).
– When synchronization is activated, the first edge and each additional edge loads the
1Count24V with the start value.
● The signal of a bounce-free switch or the zero mark of a rotary encoder can serve as the
reference signal.
● The STS_DI feedback bit indicates the level of the reference signal.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 97
1Count24V/100kHz
2.8 Fast mode

2.8.5 Assignment of feedback interface for fast mode

Note
For the 1Count24V, the following data of the feedback interface are consistent:
• Bytes 0 to 3
Use the access or addressing mode for data consistency over the entire control and
feedback interface on your master (only for configuration using the GSD file).

Assignment Tables

Address Assignment Name


Bytes 0 to 3 Bit 31 Sign of life LZ
Bit 30 Isochronous mode applied STS_TIC
Bit 29 Parameter assignment error ERR_PARA
Bit 28 Group error EXTF
• Encoder supply short circuit
Bit 27 DI status STS_DI
Bit 26 Status of direction up/down STS_DIR
Bit 25 Status of (internal) gate STS_GATE
Bits 0 to 24 Count value

Notes on the Feedback Bits

Feedback bit Notes


LZ The sign of life is toggled on each update of the feedback interface, i.e. the last sent value is inverted.
STS_TIC Isochronous mode (if assigned) was applied.
ERR_PARA The assigned module parameters are faulty.
EXTF Group error
Possible cause:
• Encoder supply short circuit
EXTF is reset when the causes of the errors are eliminated.
STS_DI The bit displays the status of the digital input DI.
STS_DIR Status of direction;
for encoder value change from larger to smaller encoder positions (including zero crossover) → "1 "
for encoder value change from larger to smaller encoder positions (including zero crossover) → "0 "
STS_GATE Status of (internal) gate: Counting

Technological Functions
98 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.8 Fast mode

Access to the Feedback Interface in STEP 7 Programming

Configuring with STEP 7 using HW Config


Feedback interface Load command, e.g. L PID

Error Detection in Fast Mode


The encoder supply short circuit error is detected by the 1Count24V and indicated in the
feedback interface (EXTF).
The fault indication in the feedback interface is extinguished as soon as this error is no
longer detected by the 1Count24V.
The parameter error bit is acknowledged by means of a correct parameter assignment.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 99
1Count24V/100kHz
2.8 Fast mode

2.8.6 Assigning parameters for fast mode

Introduction
You use the following to assign parameters for the 1Count24V:
● STEP 7 Version 5.4 or higher; if necessary, the HSP (hardware support package) must
be downloaded from the Internet

Parameter List for Fast Mode

Parameter Value Range Default


Behavior in the event of higher-level controller failure
Behavior at CPU/Master STOP Stop operating mode Stop operating mode
Continue operating mode
Basic parameters
Signal evaluation A, B Pulse and direction/ Pulse and direction
Rotary encoder
single/double/quadruple
Encoder and input filter
• At counter input (track A) 2.5 µs/25 µs 2.5 µs
• At direction input (track B) 2.5 µs/25 µs 2.5 µs
• At digital input DI 2.5 µs/25 µs 2.5 µs
Sensor A, B, DI 24V P switch, push-pull/ 24V P switch, push-pull
24V M switch
Direction input B Normal/inverted Normal
Mode
Fast mode Fast mode Fast mode
Gate function Cancel counting/ Cancel counting
Interrupt counting
Input signal HW gate Normal/inverted Normal
Function DI Input / Input
HW gate/
Synchronization on positive edge
Load value -16777216 ... +16777215 0

Parameter Assignment Error


● The "Input signal HW gate" parameter is set to inverted and the "Function DI" parameter
is not set to HW gate.

What to Do in the Event of Errors


Check the set value ranges.

Technological Functions
100 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.9 Position Detection

2.9 Position Detection

2.9.1 Overview

Description
This mode encompasses a subset of the functionality of the continuous counting mode. It is
intended for isochrone mode and differs from continuous counting by a smaller TDP
Modulemin and a TWA equal to zero. This TWA equal to zero makes it possible to operate the
module as an input module only. In this case, however, the possible controls are no longer
synchronized with To but rather are executed in the TDP cycle before or after Ti.
To execute this mode, you must assign parameters to the 1Count24V/100kHz.

Maximum Count Range


The high counting limit is +2147483647 (231 – 1).
The low counting limit is –2147483648 (–231).

Load value
You can specify a load value for the 1Count24V/100kHz.
This load value is either applied directly as the new count value (LOAD_VAL) or it is applied
as the new count value when the following events occur (LOAD_PREPARE):
● The counting operation is started by a SW gate or HW gate (if the counting operation is
continued, the load value is not applied).
● Synchronization
● Latch and retrigger

Gate Control
To control the 1Count24V/100kHz, you have to use the gate functions.

RESET States of the Following Values after Parameter Assignment

Table 2-23 RESET States

Value RESET state


Load value 0
Count value 0
Latch value 0

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 101
1Count24V/100kHz
2.9 Position Detection

Isochrone mode
In isochrone mode the 1Count24V/100kHz accepts control bits and control values from the
control interface in each bus cycle and reports back the response in this mode in the same
cycle or in the next cycle.
In each cycle the 1Count24V/100kHz transfers the count and latch value that were valid at
time Ti and the status bits valid at time Ti.
A count controlled by hardware input signals can only be transferred in the same cycle if the
input signal occurred before time Ti.

Technological Functions
102 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.9 Position Detection

2.9.2 Position Detection

Definition
In this mode, the 1Count24V/100kHz counts continuously starting from the load value:
● If the 1Count24V/100kHz reaches the high counting limit when counting up, and another
count pulse then comes, it will jump to the low counting limit and continue counting from
there without losing a pulse.
● If the 1Count24V/100kHz reaches the low counting limit when counting down, and
another count pulse then comes, it will jump to the high counting limit and continue
counting from there without losing a pulse.
● The high counting limit is set at +2147483647 (231 – 1).
● The low counting limit is set to –2147483648 (–231).

&RXQWHUVWDWXV

+LJKFRXQWLQJOLPLW

/RDGYDOXH

/RZFRXQWLQJOLPLW

0HDVXUHGYDOXH *DWHVWRS 7LPH

Figure 2-34 Count Continuously with Gate Function

Function of the Digital Input


For the "Function DI" parameter, select one of the following functions for the digital input:
● Input
● HW gate
● Latch function
● Synchronization

See also
Assigning Parameters for Position Feedback (Page 118)
Gate Functions for Position Detection (Page 104)
Latch Function (Page 107)
Synchronization (Page 110)

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 103
1Count24V/100kHz
2.9 Position Detection

2.9.3 Gate Functions for Position Detection

Software Gate and Hardware Gate


The 1Count24V/100kHz has two gates
● A software gate (SW gate), which is controlled by the SW_GATE control bit.
The software gate can only be opened by a positive edge of the SW_GATE control bit. It
is closed when this bit is reset. Note the transfer times and run times of your control
program.
● A hardware gate (HW gate), which is controlled by the digital input on the
1Count24V/100kHz.
You assign the hardware gate as the function of the digital input (Function DI "HW Gate").
It is opened on a positive edge at the digital input and closed on a negative edge.

Internal Gate
The internal gate is the logical AND operation of the HW gate and SW gate. Counting is only
active when the HW gate and the SW gate are open. The STS_GATE feedback bit (internal
gate status) indicates this. If a HW gate has not been assigned, the setting of the SW gate is
decisive. Counting is activated, interrupted, continued, and canceled by means of the
internal gate.

Technological Functions
104 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.9 Position Detection

Canceling- and Interrupting-Type Gate Function


When assigning the gate function, you can specify whether the internal gate is to cancel or
interrupt counting. When counting is canceled, after the gate is closed and restarted,
counting starts again from the beginning. When counting is interrupted, after the gate is
closed and restarted, counting continues from the previous value.
The diagrams below indicate how the interrupting and canceling gate functions work:

&RXQW

+LJKFRXQWLQJOLPLW

/RDGYDOXH

/RZFRXQWLQJOLPLW

*DWHVWDUW *DWHVWRS *DWHVWDUW 7LPH

Figure 2-35 Position Detection, Up, Interrupting Gate Function

&RXQWHUVWDWXV

8SSHUFRXQWOLPLW

/RDGYDOXH

/RZHUFRXQWOLPLW

0HDVXUHG *DWHVWRS 0HDVXUHG 7LPH


YDOXH YDOXH

Figure 2-36 Position Detection, Down, Interrupting Gate Function

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 105
1Count24V/100kHz
2.9 Position Detection

Gate Control

Gate control by means of the SW gate only


When the gate is opened, one of the following occurs, depending on the parameter
assignment:
● Counting continues from the current count
or
● Counting starts from the load value
If the SW gate is opened in isochrone mode in bus cycle "n" by setting the SW_GATE control
bit, counting starts before or after Ti, depending on the position of Ti.

Gate control by means of the SW gate and HW gate


If the SW gate opens when the HW gate is already open, counting continues starting from
the current count.
When the HW gate is opened, one of the following occurs, depending on the parameter
assignment:
● Counting continues from the current count
or
● Counting starts from the load value
If the SW gate is opened in isochrone mode in bus cycle "n" by setting the SW_GATE control
bit, counting starts in cycle "n+1" before or after Ti, if the HW gate is already open at this
time. If the HW gate opens after the SW gate has been opened, then counting does not start
until the HW gate opens.

Technological Functions
106 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.9 Position Detection

2.9.4 Latch Function

Overview
There are two latch functions:
● The Latch and Retrigger function
● The Latch function

The Latch and Retrigger Function


In order to use this function, you must first select it with the "Latch and Retrigger on Positive
Edge" Function DI parameter.

&RXQWSXOVHV

6:B*$7(

',GLJLWDOLQSXW

&RXQWHUVWDWXV

/DWFKYDOXH

Figure 2-37 Latch and Retrigger with Load Value = 0

This function stores the current internal count of the 1Count24V/100kHz and retriggers
counting when there is a positive edge on the digital input. This means that the current
internal count at the time of the positive edge is stored (latch value), and the
1Count24V/100kHz is then loaded again with the load value, from which counting resumes.
The counting mode must be enabled with the SW gate before the function can be executed.
It is started with the first positive edge on the digital input.
The stored count rather than the current count is indicated in the feedback interface. The
STS_DI bit indicates the status of the latch and retrigger signal.
The latch value is preassigned with its RESET state (see corresponding table). It is not
changed when the SW gate is opened.
Direct loading of the counter does not cause the indicated stored count to be changed.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 107
1Count24V/100kHz
2.9 Position Detection

If you close the SW gate, it only interrupts counting; this means that when you open the SW
gate again, counting is continued. The digital input DI remains active even when the SW
gate is closed.
Counting is also latched and triggered in isochrone mode with each edge on the digital input.
The count that was valid at the time of the last edge before Ti is displayed in the feedback
interface.

The Latch Function


In order to use this function, the Function DI parameter "Latch on Positive Edge" must be
selected for the digital input.

&RXQWSXOVHV

6:B*$7(

',GLJLWDOLQSXW

&RXQWHUVWDWXV

/DWFKYDOXH

Figure 2-38 Latch with a Load Value of 0

Count and latch value are preset with their RESET states (see corresponding table).
The counting function is started when the SW gate is opened. The 1Count24V/100kHz
begins at the load value.
The latch value is always the exact count at the time of the positive edge on the digital input
DI.
The stored count rather than the current count is indicated in the feedback interface. The
STS_DI bit indicates the level of the latch signal.
Direct loading of the counter does not cause the indicated stored count to be changed.
In isochrone mode, the count that was latched at the time of the last positive edge before Ti
is displayed in the feedback interface.
When you close the SW gate, the effect is either canceling or interrupting, depending on the
parameter assignment. The digital input DI remains active even when the SW gate is closed.
Further possible causes of parameter assignment errors with the latch function:
● Incorrect parameter assignment of the digital output function (Function DI)

Technological Functions
108 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.9 Position Detection

Modified User Data Interface


If the 1Count24V/100kHz is inserted behind an IM 151 that supports the reading and writing
of broader user data interfaces, the current count value can be read from bytes 8-11 of the
feedback interface.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 109
1Count24V/100kHz
2.9 Position Detection

2.9.5 Synchronization

Synchronization
In order to use this function, you must first select it with the "Synchronize on Positive Edge"
Function DI parameter.

,QWHUQDOFRXQWSXOVHV
XSRUGRZQ

'LJLWDOLQSXW
]HURPDUN

6\QFKURQL]DWLRQ
RQFHRQO\
(QDEOH
&57/B6<1

&RXQWYDOXH

/RDGYDOXH

6\QFKURQL]DWLRQ
SHULRGLF

(QDEOH
&57/B6<1

&RXQWYDOXH

/RDGYDOXH

Figure 2-39 Once-Only and Periodic Synchronization

Technological Functions
110 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.9 Position Detection

If you have assigned synchronization, the positive edge of a reference signal on the input
sets the 1Count24V/100kHz to the load value.
You can select between once-only and periodic synchronization ("Synchronization"
parameter).
The following conditions apply:
● The counting mode must have been started with the SW gate.
● The "Enable synchronization CTRL_SYN" control bit must be set.
● In once-only synchronization, the first edge loads the 1Count24V/100kHz with the load
value after the enable bit is set.
● In periodic synchronization, the first edge and each subsequent edge load the
1Count24V/100kHz with the load value after the enable bit is set.
● After successful synchronization, the STS_SYN feedback bit is set. It must be reset by
the RES_STS control bit.
● The signal of a bounce-free switch or the zero mark of a rotary encoder can serve as the
reference signal.
● The STS_DI feedback bit indicates the level of the reference signal.
In isochrone mode, the set feedback bit STS_SYN indicates that the positive edge on the
digital input was between time Ti in the current cycle and Ti in the previous cycle.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 111
1Count24V/100kHz
2.9 Position Detection

2.9.6 Assignment of the Feedback and Control Interface for Position Feedback

Note
The following data of the control and feedback interfaces are consistent for the
1Count24V/100kHz:
Bytes 0 to 3
Bytes 4 to 7
Bytes 8 to 11 (modified user data interface)
Use the access or addressing mode for data consistency over the entire control and
feedback interface on your master (only for configuration using the GSD file).

Assignment Tables

Table 2-24 Feedback Interface (Inputs)

Address Assignment Designation


Bytes 0 to 3 Count value or stored count value in the case of the latch function on the digital
input
Byte 4 Bit 7: Short circuit of the encoder supply ERR_24V
Bit 6: Reserve = 0
Bit 5: Parameter assignment error ERR_PARA
Bit 4: Reserve = 0
Bit 3: Reserve = 0
Bit 2: Resetting of status bits active RES_STS_A
Bit 1: Load function error ERR_LOAD
Bit 0: Load function is running STS_LOAD
Byte 5 Bit 7: Down direction status STS_C_DN
Bit 6: Up direction status STS_C_UP
Bit 5: Reserve = 0
Bit 4: Reserve = 0
Bit 3: Reserve = 0
Bit 2: Reserve = 0
Bit 1: DI status STS_DI
Bit 0: Internal gate status STS_GATE
Byte 6 Bit 7: Zero crossing STS_ND
Bit 6: Low counting limit STS_UFLW
Bit 5: High counting limit STS_OFLW
Bit 4: Reserve = 0
Bit 3: Reserve = 0
Bit 2: Reserve = 0
Bit 1: Reserve = 0
Bit 0: Synchronization status STS_SYN

Technological Functions
112 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.9 Position Detection

Address Assignment Designation


Byte 7 Reserve = 0
Bytes 8 to 11 Count value 1
1 Modified user data interface

Table 2-25 Control Interface (Outputs)

Address Assignment
Bytes 0 to 3 Load value direct, preparatory, comparison value 1 or 2
Byte 0 Behavior of DO1, DO2 of the 1Count24V/100kHz
Bit 2 Bit 1 Bit 0 Function DO1
0 0 0 Output
0 0 1 Switch on at count ≥ comparison value
0 1 0 Switch on at count ≤ comparison value
0 1 1 Pulse on reaching the comparison value
1 0 0 Switch at comparison values
1 0 1 blocked
1 1 0 blocked
1 1 1 blocked
Bit 5 Bit 4 Function DO2
0 0 Output
0 1 Switch on at count ≥ comparison value
1 0 Switch on at count ≤ comparison value
1 1 Pulse on reaching the comparison value
Bits 3, 6, and 7: Reserve = 0
Bytes 1 to 3 Byte 1: Hysteresis DO1, DO2 (range 0 to 255)
Byte 2: Pulse duration [2ms] DO1, DO2 (range 0 to 255)
Byte 3: Reserve = 0
Byte 4 EXTF_ACK Bit 7: Error diagnostics acknowledgment
Bit 6: Reserve = 0
Bit 5: Reserve = 0
Bit 4: Reserve = 0
Bit 3: Reserve = 0
RES_STS Bit 2: Start resetting of status bit
CTRL_SYN Bit 1: Enable synchronization
SW_GATE Bit 0: SW gate control bit
Byte 5 Bit 7: Reserve = 0
Bit 6: Reserve = 0
Bit 5: Reserve = 0
Bit 4: Reserve = 0
Bit 3: Reserve = 0
Bit 2: Reserve = 0
LOAD_PREPARE Bit 1: Load counter preparatory
LOAD_VAL Bit 0: Load counter direct

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 113
1Count24V/100kHz
2.9 Position Detection

Address Assignment
Bytes 6 to 7 Reserve = 0 1
1 Not used for modified user interface

Notes on the Control Bits

Table 2-26 Notes on the Control Bits

Control bits Notes


CTRL_SYN You use this bit to enable synchronization.
EXTF_ACK Error acknowledgment
The error bits must be acknowledged with the EXTF_ACK control bit after the cause is removed. (see
figure below)
LOAD_PREPARE Load counter preparatory (see figure below)
The value from bytes 0 to 3 is applied as the load value.
LOAD_VAL The value from bytes 0 to 3 is loaded directly as the new count value.
RES_STS Start resetting of status bit
The status bits are reset through the acknowledgment process between the RES_STS bit and the
RES_STS_A bit. (see figure below)
SW GATE The SW gate is opened/closed via the control interface with the SW_GATE bit.

Notes on the Feedback Bits

Table 2-27 Notes on the Feedback Bits

Feedback bits Notes


ERR_24V Short circuit of the encoder supply
The error bit must be acknowledged by the EXTF_ACK control bit (see figure below)
Diagnostic message if assigned.
ERR_LOAD Load function error (see figure below)
The LOAD_VAL, LOAD_PREPARE, CMP_VAL1, CMP_VAL2, and C_DOPARAM bits cannot be set
simultaneously during transfer. This results in setting the ERR_LOAD status bit, similar to loading an
incorrect value (which is not accepted).
ERR_PARA Parameter assignment error ERR_PARA
RES_STS_A Resetting of the status bits active (see figure below)
STS_C_DN Down direction status
STS_C_UP Up direction status
STS_DI DI status
The status of the DI is indicated in all modes with the STS_DI bit in the feedback interface.
STS_GATE Internal gate status: Counting
STS_LOAD Load function running (see figure below)
STS_ND Zero-crossing in the count range when counting without a main counting direction. The bit must be
reset by the RES_STS control bit.

Technological Functions
114 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.9 Position Detection

Feedback bits Notes


STS_OFLW High counting limit violated
STS_UFLW Low counting limit violated
Both bits must be reset.
STS_SYN Synchronization status:
After successful synchronization, the STS_SYN bit is set. It must be reset by the RES_STS control
bit.

Access to the Control and Feedback Interface in STEP 7 Programming

Table 2-28 Access to the Control and Feedback Interface in STEP 7 Programming

Configuring with STEP 7 Configuring with STEP 7


using the GSD file 1) using HW Config
(Hardware catalog\PROFIBUS-DP\Additional (Hardware catalog\PROFIBUS-DP\
FIELD DEVICES\I/O\ET 200S) ET 200S)
Feedback interface Read with SFC 14 "DPRD_DAT" Load command (e.g. L PID)
Control interface Write with SFC 15 "DPWR_DAT" Transfer command (e.g. T PQD)
1Load and transfer commands are also possible with CPU 3xxC, CPU 3xx with MMC, CPU 4xx (V3.0 and later), and
WinLC RTX (PC CPU).

Resetting of the Status Bits


STS_SYN, STS_OFLW, STS_UFLW, STS_ND

(YHQWVWLOOSHQGLQJRQUHVHW

)HHGEDFNVLJQDOV
RQHRIWKHVWDWXVELWV

&RQWUROELW
5(6B676

)HHGEDFNELW
5(6B676B$
W

5HVHWH[HFXWHG

5HTXHVWFDQFHOHG

&RXQW9N+]H[HFXWHVWKHUHVHW

5HTXHVWUHVHW

Figure 2-40 Resetting of the Status Bits

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 115
1Count24V/100kHz
2.9 Position Detection

Acceptance of Values with the Load Function

(UURUELW
(55B/2$'
&RQWUROELW
/2$'B9$/
/2$'B35(3$5(


)HHGEDFNELW
676B/2$'
W

9DOXHLVDSSOLHG(QGRIWUDQVIHU

&DQFHOUHTXHVWDQGDQGNHHSYDOXH
DYDLODEOH
&RXQW9N+]KDVXQGHUVWRRGWKHUHTXHVW

5HTXHVWYDOXHWUDQVIHUDQGPDNHYDOXHDYDLODEOH

Figure 2-41 Acceptance of Values with the Load Function

Note
Only one of the following control bits can be set at a particular time:
LOAD_VAL or LOAD_PREPARE.
Otherwise, the ERR_LOAD error is reported until all the specified control bits are deleted
again.
The ERR_LOAD error bit is only deleted when a correct value is transferred as follows.

Technological Functions
116 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.9 Position Detection

Acknowledgment Principle in Isochrone Mode


In isochrone mode, exactly 4 or 6 bus cycles are always required to reset the status bits and
to accept values during the load function.

VW'3F\FOH QG'3F\FOH UG'3F\FOH WK'3F\FOH

&RQWUROELW
LQXVHU
SURJUDP

6WDWXVELW
RIPRGXOH

7L 7L 7L 7L 7L

7'3 7'3 7'3 7'3 7'3

Figure 2-42 Acknowledgment Principle in Isochrone Mode

Error Detection
The program errors must be acknowledged. They have been detected by the
1Count24V/100kHz and are indicated in the feedback interface. A channel-specific diagnosis
is carried out if you have enabled group diagnostics in your parameter assignment (see the
ET 200S Distributed I/O System Manual).
The parameter assignment error bit is acknowledged by means of correct parameter
assignment.

$QHUURUKDVRFFXUUHGWKH&RXQW9N+]VHWVDQHUURU
ELWDGLDJQRVWLFPHVVDJHPD\DSSHDUHUURUGHWHFWLRQ
FRQWLQXHV

(UURUHOLPLQDWHGZKHQ(;7)B$&.LVVHWE\WKHXVHU
SURJUDPWKH&RXQW9N+]GHOHWHVWKHHUURUELWD
GLDJQRVWLFPHVVDJHPD\DSSHDU

HJHUURUELW
(55B9

(UURUDFNQRZOHGJPHQW
(;7)B$&.

Figure 2-43 Error Acknowledgment

In the case of continuous error acknowledgment (EXTF_ACK=1) or at CPU/Master Stop, the


1Count24V/100kHz signals the errors as soon as they are detected and deletes them as
soon as they have been eliminated.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 117
1Count24V/100kHz
2.9 Position Detection

2.9.7 Assigning Parameters for Position Feedback

Introduction
You can use either of the following to assign parameters for the 1Count24V/100kHz:
● A GSD file (http://www.ad.siemens.de/csi/gsd)
● STEP 7 V5.3 SP2 or later

Parameter List for Position Feedback

Table 2-29 Parameter List for Position Feedback

Parameter Value Range Default


Enable
Group diagnostics Disable/enable Disable
Behavior in the event of the parent controller failing
Behavior at CPU/Master-STOP Turn off Turn off
Continue working mode
Encoder parameters
Signal evaluation A, B Pulse and direction/ Pulse and direction
Rotary encoder
single/double/quadruple
Encoder and input filter
• At count input (track A) 2.5 µs/25 µs 2.5 µs
• At direction input (track B) 2.5 µs/25 µs 2.5 µs
• At digital input DI 2.5 µs/25 µs 2.5 µs
Sensor A, B, DI 24V P switch, normal mode/ 24V P switch, normal mode
24V M switch
Direction input B Normal/Inverted Normal
Mode
Position feedback Position detection Position detection
Gate function Cancel counting/ Cancel counting
Interrupt counting
Input signal HW gate Normal/Inverted Normal
Function DI Input/ Input
HW gate/
Latch and retrigger on positive edge/
Synchronization on positive edge
Synchronization1 Once-only/Periodic Once-only
1 Only relevant if Function DI = Synchronization on positive edge

Technological Functions
118 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.9 Position Detection

Parameter Assignment Error


● The "Input signal HW gate" parameter is set to inverted and the "Function DI" parameter
is not set to HW gate.

What to Do in the Event of Errors


Check the set value ranges.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 119
1Count24V/100kHz
2.10 Evaluation of count and direction signal

2.10 Evaluation of count and direction signal

Signal Evaluation A, B
Signal evaluation by means of A, B allows you to count directionally. Different evaluation
modes are possible depending on the parameter assignment:
● Pulse and direction
● Rotary encoder
In the case of 24-V pulse generators with a direction indicator, there must be a time span of
at least 5 µs/50 µs between the direction signal (B*) and the count signal (A*), depending on
the input filter that has been assigned parameters.

6LJQDO$

6LJQDO%DV
GLUHFWLRQLQGLFDWRU
7LPH
wVwVGHSHQGLQJ
RQWKHILOWHUWLPH

Figure 2-44 Time Span between the Direction Signal and the Count Signal

If you connect a 24-V rotary encoder with two tracks that are 90 degrees out of phase at the
count and direction inputs, you can assign parameters to a single evaluation in all the
measurement and count modes.
You can also assign parameters to dual or quad evaluation in all count modes.
In all evaluation modes, you can invert direction detection at input B by parameter
assignment.
The count and direction inputs can be operated with different sensors (P switch and series
mode or M switch).

Note
If you have selected the 24V M switch setting with the 1Count24V/100kHz for the "Sensor A,
B, DI" parameter, you must use the M-switching sensors.

Technological Functions
120 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.10 Evaluation of count and direction signal

Pulse and Direction


The level at direction input B is used as the direction setting.
An unwired input corresponds to the "Up" count direction if you have selected
"Pulse/direction" for the "Signal evaluation" parameter.

6LJQDO$
GRZQ
6LJQDO%DV XS
GLUHFWLRQLQGLFDWRU

8SFRXQWSXOVHV

'RZQFRXQWSXOVHV

Figure 2-45 Signals of a 24-V Pulse Generator with Direction Indicator

Rotary Encoder
The 1Count24V/100kHz can count the edges of the signals. Normally, only the edge at A is
evaluated (single evaluation). To obtain a higher resolution, when assigning parameters
("Signal Evaluation" parameter), you can select whether the signals are to be subjected to
single, double, or quadruple evaluation.
Multiple evaluation is only possible with asymmetric incremental encoders with A and B
signals that are 90 degrees out of phase.

Single Evaluation
Single evaluation means that only one edge of A is evaluated; up count pulses are recorded
at a positive edge at A and low level at B, and down count pulses are recorded at a negative
edge at A and low level at B.
The diagram below illustrates the single evaluation of the signals.

6LJQDO$

6LJQDO%

8SFRXQWSXOVHV

'RZQFRXQWSXOVHV
XS GRZQ

Figure 2-46 Single Evaluation

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 121
1Count24V/100kHz
2.10 Evaluation of count and direction signal

Double Evaluation
Double evaluation means that the positive and negative edge of the A signal are evaluated.
Whether up or down count pulses are generated depends on the level of the B signal.
The diagram below illustrates the double evaluation of the signals.

6LJQDO$

6LJQDO%

8SFRXQWSXOVHV

'RZQFRXQWSXOVHV
XS GRZQ

Figure 2-47 Double Evaluation

Quadruple Evaluation
Quadruple evaluation means that the positive and negative edges of the A and B signals are
evaluated. Whether up or down count pulses are generated depends on the levels of the A
and B signals.
The diagram below illustrates the quadruple evaluation of the signals.

6LJQDO$

6LJQDO%

8SFRXQWSXOVHV

'RZQFRXQWSXOVHV
XS GRZQ

Figure 2-48 Quadruple Evaluation

Note
A counting frequency of 100 kHz refers to the maximum frequency of the A and B signals.
With double evaluation, a maximum frequency of 200 kHz is produced for the counting
pulses; with quadruple evaluation, the maximum frequency is 400 kHz.

Technological Functions
122 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.11 Behavior at CPU-Master-STOP

2.11 Behavior at CPU-Master-STOP

Setting the Behavior at CPU/Master-STOP


You can assign the behavior of the 1Count24V/100kHz in the event of the failure of the
parent controller.

Parameter Status of the 1Count24V/100kHz at What Happens if


CPU/Master STOP New Parameters Have Been Assigned?
Turn off DO1 The current mode is canceled, the gate The changed parameters are accepted and
closed, and the digital output blocked; take effect.
comparison values 1 and 2 and the load
value are reset; the high and low limit
values, function and behavior of the digital
outputs and the integration time are handled
in accordance with the parameter
assignments.
Continue working mode1 The current mode continues, and the gate The gate is closed, the current mode is
and digital output retain their status. terminated, the digital output is blocked, and
the changed parameters are accepted and
take effect.
DO 1 substitute a value The current mode is canceled, the gate The changed parameters are accepted and
closed, and the digital output blocked; take effect.
comparison values 1 and 2 and the load
value are reset; the high and low limit
values, function and behavior of the digital
outputs and the integration time are handled
in accordance with the parameter
assignments.
When a pulse is output when the
comparison value is reached, the substitute
value is 1 only for the duration of the pulse.
DO 1 keep last value The current mode is canceled, the gate The changed parameters are accepted and
closed, and the digital output blocked; take effect.
comparison values 1 and 2 and the load
value are reset; the high and low limit
values, function and behavior of the digital
outputs and the integration time are handled
in accordance with the parameter
assignments.
1If the mode is to continue during a change from CPU-/Master-STOP to RUN (startup), the CPU/Master must not clear the

outputs.
Possible solution: In the part of the user program that is processed during startup, set the SW gate control bit and transfer
the values to the 1Count24V/100kHz.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 123
1Count24V/100kHz
2.11 Behavior at CPU-Master-STOP

Leaving the Assigned State


Under what conditions does the 1Count24V/100kHz leave the assigned state?
The CPU or master must be in RUN mode, and you have to make a change at the control
interface.

Automatic New Parameter Assignment


A new parameter assignment of the ET 200S station is made by your CPU/ DP master:
● Upon power on of the CPU/DP master
● Upon power on of the IM 151/IM 151 FO
● After failure of the DP transmission
● After loading a modified parameter assignment or configuration of the ET 200S station to
the CPU/DP master
● When the 1Count24V/100kHz is inserted
● Upon power on or inserting of the appropriate power module

Technological Functions
124 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.12 Technical Specifications

2.12 Technical Specifications

Technical Specifications

General technical specifications


Dimensions and Weight
Dimensions W x H x D (mm) 15x81x52
Weight Approx. 40 g
Data for Specific Modules
Number of Channels 1
Counter range 32 bits
Voltages, Currents, Potentials
Rated load voltage L+ 24 VDC
• Range 20.4 ... 28.8 V
• Reverse polarity protection Yes
Galvanic isolation
• Between backplane bus and counter function Yes
• Between counter function and load voltage No
Encoder supply
• Output voltage L+ (-0.8 V)
• Output current max. 500 mA, short circuit-proof
Current consumption
• From the backplane bus max. 10 mA
• From load voltage L+ (no load) max. 42 mA
Power dissipation Typ. 1 W
Data on the counting signals and the digital input
Galvanic isolation No, from shield only
Input voltage
• Rated value 24 VDC
• 0 signal -30 V to 5 V
• 1 signal 11 V to 30 V
Input current
• 0 signal ≤2 mA (quiescent current)
• 1 signal 9 mA (typical)
Minimum pulse width (maximum counting
frequency) ≥ 25 µs
• Filter on ≥ 2.5 µs
• Filter off
Connection of a two-wire BERO type 2 Possible
Input characteristic In accordance with IEC 1131, Part 2, Type 2
Shielded cable length
• Filter 200 kHz 50 m
• Filter 20 kHz 100 m

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 125
1Count24V/100kHz
2.12 Technical Specifications

General technical specifications


Data for the Digital Output
Output voltage
• Rated value 24 VDC
• 0 signal ≤ 3V
• 1 signal ≥ L+ (-1V)
Output current
• 0 signal (residual current) ≤ 0.5 mA
• 1 signal
Permitted range 5 mA to 2.0 A
Rated value
40°C 2A
50°C 1A
60°C 0.5 A
Switching frequency
• Resistive load 100 Hz
• Inductive load 2 Hz
• Lamp load ≤ 10 Hz
Lamp load ≤5W
Output delay (resistive load) 100 µs
Short-circuit protection for output Yes
Response threshold 2.6 A to 4 A
Inductive extinction Yes; L+ -(50 to 60 V)
Digital input control Yes
Cable lengths
• Unshielded 600 m
• Shielded 1000 m
Status, Diagnostics
Digital input DI status display LED 8 (green)
Digital output DO status display LED 4 (green)
Up count value change UP LED (green)
Down count value change DN LED (green)
Fault indicator SF LED (red)
Diagnostic information Yes
Measuring Ranges in the Measuring Modes
Maximum measuring range
• Frequency measurement 0.1 Hz to 100 kHz
• Rotational speed measurement 1/min to 25000 /min
• Period measurement 10 µs to 120 s
Response times
Update rate of the counting modes
• Non-isochronous mode 1 ms
• Isochronous mode TDP

Technological Functions
126 Operating Instructions, 04/2008, A5E00124867-06
1Count24V/100kHz
2.12 Technical Specifications

General technical specifications


Isochronous Times of the Module
in counting modes
TCI 380 µs
TCO 320 µs
ToiMin 55 µs
TDPMin 900 µs
in measuring modes
TCI 465 µs
TCO 280 µs
ToiMin 50 µs
TDPMin 995 µs
in position feedback
TCI 370 µs
TCO -
ToiMin -
TDPMin 815 µs

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 127
1Count24V/100kHz
2.12 Technical Specifications

Technological Functions
128 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz 3
3.1 Product Overview

Order Number:
6ES7 138-4DE02-0AB0

Compatibility
The 1Count5V/500kHz with the order number 6ES7 138-4DE02-0AB0 replaces the
1Count5V/500kHz with the order number 6ES7 138-4DE01-0AB0 and is fully compatible. In
STEP 7 version V5.3 SP2 and later, you can use it in non-isochronous and isochronous
modes.

Features
● A 5 V incremental encoder can be connected in order to count 5 V RS422 signals up to a
frequency of 500 kHz.
● The 1Count5V/500kHz is a double-width module and can only be used with a 4-row
TM-E30S44-01 terminal module.
● Isochronous mode
● Modified user data interface 1
1 Insteadof 8 bytes of input data and 8 bytes of output data, 12 bytes of input data and
6 bytes of output data are used, provided the IM 151 supports this.
The following IM 151 modules support this function:
– IM151-1/Standard order no. 6ES7151-1AA04-0AB0 and higher
– IM151-1/HF order no. 6ES7151-1BA01-0AB0 and higher
● Modes of the 1Count5V/500kHz:
Counting modes:
– Count continuously
– Count once
– Count periodically

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 129
1Count5V/500kHz
3.1 Product Overview

Measuring modes:
– Frequency measurement
– Rotational speed measurement
– Period measurement
Position feedback:
– Position detection
– Fast mode
● Gate control, synchronization or latch function via digital inputs
● 2 digital outputs for direct control or output of the comparison results.
● Firmware update 1
● Identification data 1
1 The following IM 151 modules support this function: IM 151-1 Standard:
6ES7151-1AA04-0AB0 and later and IM 151-1 High Feature: 6ES7151-1BA01-0AB0 and
later.

Connectable Counting Signals


The 1Count5V/500kHz can count the signals of the encoders:
● 5 V incremental encoder with two tracks that are 90o out of phase at the count inputs.

Adjustment During Operation


● Counting modes
– You can change the function and behavior of the digital outputs during operation.
● Measuring modes
– You can change the function of the DO1 digital output during operation
– You can change the integration time/update time during operation

Configuration
You can use either of the following to configure 1Count5V/500kHz:
● STEP 7 V5.3 SP2 or higher
● HSP hardware support package (available online) as of STEP 7 V5.2 SP1

Technological Functions
130 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.1 Product Overview

Firmware Update
To add functions and for troubleshooting, it is possible to load firmware updates to the
operating system memory of the 1Count5V/500kHz using STEP 7 HW Config.

Note
When you launch the firmware update, the old firmware is deleted. If the firmware update is
interrupted or canceled for any reason, the 1Count5V/500kHz will no longer function
correctly as a result. Re-launch the firmware update and wait until this has completed
successfully.

Identification Data 1
● Hardware release status
● Firmware release status
● Serial number
1 See also ET 200S Distributed I/O System Manual, section: Identification Data

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 131
1Count5V/500kHz
3.2 Clocked Mode

3.2 Clocked Mode

Note
The principles of isochronous mode are described in a separate manual.
See Isochrone Mode function manual (A5E00223279).

Hardware Requirements
You will require the following for the 1Count5V/500kHz in isochronous mode:
● A CPU that supports isochronous mode
● A master that supports the equidistant bus cycle
● An IM 151 that supports isochronous mode

Features
Depending on the system parameter assignment, the 1Count5V/500kHz works in either non-
isochronous or isochronous mode.
In isochronous mode, data exchange between the master and 1Count5V/500kHz is
isochronous to the bus cycle (PROFIBUS DP/PROFINET).
In isochronous mode, all 8 bytes/12 bytes of the feedback interface are consistent.
If an error occurs during parameter assignment, the 1Count5V/500kHz does not go into
isochronous mode.
If isochronous mode fails due to faults or failure/delay of global control (GC), the
1Count5V/500kHz will return to isochronous mode during the next cycle without an error
response.
If isochronous mode fails, the feedback interface is not updated.
The Ti/To overlap is supported by the module in firmware version V1.0.1 and later.

See also
Synchronization (Page 156)

Technological Functions
132 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.3 Example: Start 1Count5V/500kHz

3.3 Example: Start 1Count5V/500kHz

Task
These instructions guide you to a functioning application that will enable you to count the
pulses of an encoder and become familiar with and check the basic hardware and software
functions of your 1Count5V/500kHz. The counting mode used in this example is
"Count continuously".

Requirements
The following requirements must be satisfied:
● You have commissioned an ET 200S station on an S7 station with a master.
● You must have the following:
– A TM-E30S44-01 terminal module
– A 1Count5V/500kHz
– A 5 V encoder with a 24 V encoder supply and the material required for wiring

Installation, Wiring and Fitting


1. Install and wire the TM-E30S44-01 terminal module (see Figure).
2. Connect the 1Count5V/500kHz to the terminal module (you will find detailed instructions
on how to do this in the ET 200S Distributed I/O System Manual).

&RXQW
9N+] 70(6DQG
6) &RXQW9N+]

9LQFUHPHQWDO 83 '1


 
HQFRGHU 6<1 
(6'($%


 $ $     '2 '2
 
 9 0     0 0

 
 % %     9'& 9'&

 
 1 1     ',

Figure 3-1 Terminal Assignment for the Example

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 133
1Count5V/500kHz
3.3 Example: Start 1Count5V/500kHz

Configuring with STEP 7 using HW Config


You must first adapt the hardware configuration of your existing ET 200S station.
1. Open the relevant project in SIMATIC Manager.
2. Open the HW Config configuration table in your project.
3. Select the 1Count5V/500kHz Counting Mode from the hardware catalog. The number
6ES7 138-4DE02-0AB0 C appears in the infotext.
4. Drag the entry to the slot at which you have installed your 1Count5V/500kHz.
5. Double-click this number to open the 1Count5V/500kHz C (R-S Slot Number) tab.
On the Addresses tab, you will find the addresses of the slot to which you have dragged
the 1Count5V/500kHz. Make a note of these addresses for subsequent programming.
On the Parameters tab you will find the default settings for the 1Count5V/500kHz. Leave
the default settings unchanged.
6. Save and compile your configuration, and download the configuration in STOP mode of
the CPU by choosing "PLC > Download to Module".

Technological Functions
134 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.3 Example: Start 1Count5V/500kHz

Integration into the User Program (Not for Modified User Data Interface)
Create block FC101 and integrate it in your control program (in OB1, for example). This
block requires the data block DB1 with a length of 16 bytes. The start address of the module
in the following example is 256.

STL Description
Block: FC101

Network 1: Presettings

L 0 //Delete control bits


T DB1.DBD0
T DB1.DBD4
SET
S DB1.DBX4.0 //Open SW gate

Network 2: Write to the control interface

L DB1.DBD0 //Write 6 bytes to the 1Count5V/500kHz


T PAD 256 //Configured start address of the outputs
L DB1.DBW4
T PAW 260

Network 3: Read from the feedback interface


//Read 8 bytes from the 1Count5V/500kHz
L PED 256 //Configured start address of the inputs
T DB1.DBD8
L PED 260
T DB1.DBD12

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 135
1Count5V/500kHz
3.3 Example: Start 1Count5V/500kHz

Testing
Use "Monitor/Modify Variables" to monitor the count value and the gate.
1. Select the "Block" folder in your project. Choose the "Insert > S7 Block > Variable Table"
menu command to insert the VAT 1 variable table, and then confirm with OK.
2. Open the VAT 1 variable table, and enter the following variables in the "Address" column:
DB1.DBD8 (current count value)
DB1.DBx13.0 (internal gate status)
3. Choose "PLC > Connect To > Configured CPU" to switch to online.
4. Choose "Variable > Monitor" to switch to monitoring.
5. Switch the CPU to RUN mode.
The "internal gate status" bit must be set.
6. Use your encoder to generate pulses.

Result
You can now see that:
● The UP LED on the 1Count5V/500kHz is on. The status of the UP LED changes with
each new pulse.
● The count value in the block changes.

Technological Functions
136 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.4 Terminal Assignment Diagram

3.4 Terminal Assignment Diagram

Wiring Rules
The cables (terminals 1 and 8 and terminals 15 and 16) must be shielded. The shield must
be supported at both ends. To do this use the shield contact (see the ET 200S Distributed
I/O System manual in the Appendix).

Table 3-1 Terminal Assignment of the 1Count5V/500kHz

View Terminal Assignment Remarks

&RXQW
A, /A: Track A
9N+] 70(6DQG B, /B: Track B
6) &RXQW9N+]
N, /N: Track N
24 VDC: Sensor supply
M: Chassis ground
DI: Digital input
DO1: Digital output
DO2: Digital output
9LQFUHPHQWDO 83 '1
 
HQFRGHU 6<1 
(6'($%


 $ $     '2 '2
 
 9 0     0 0

 
 % %     9'& 9'&

 
 1 1     ',

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 137
1Count5V/500kHz
3.5 Operating mode of the 1Count5V/500kHz

3.5 Operating mode of the 1Count5V/500kHz

Introduction
To begin with, decide how you want to use the 1Count5V/500kHz. You can choose from the
following operating modes:

Counting modes Measuring modes Position feedback Fast mode


Count continuously Frequency measurement Position detection Position feedback in short
(isochronous) cycles
Count once Rotational speed measurement
Count periodically Period measurement
Parameters are assigned to the various modes. You will find the parameter lists in the descriptions of the modes.
You can integrate the 1Count5V/500kHz into your project in two different ways. Decide whether you want to work with a
GSD file or with STEP 7.

Integrating 1Count5V/500kHz with STEP 7

Integrating the 1Count5V/500kHz with STEP 7


(in isochronous and non-isochronous mode)
Select an entry from the hardware catalog that corresponds to the operating mode you want.
For counting modes, For measuring modes, For position detection, For fast mode,
select the "1Count5V select the "1Count5V select the "1Count5V select the "1COUNT5V Fast
Counting Mode V2.0" entry Measuring Mode V2.0" entry Position Detection V2.0" Mode V2.0" entry
entry
The number The number The number The number
6ES7138-4DE02-0AB0 C 6ES7138-4DE02-0AB0 M 6ES7138-4DE02-0AB0 W 6ES7138-4DE02-0AB0 F
appears appears appears appears
in the infotext. Drag the entry in the infotext. Drag the entry in the infotext. Drag the entry in the infotext. Drag the entry
to the slot at which you have to the slot at which you have to the slot at which you have to the slot at which you have
installed your installed your installed your installed your
1Count5V/500kHz. 1Count5V/500kHz. 1Count5V/500kHz. 1Count5V/500kHz.
Select the parameters.

Technological Functions
138 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.5 Operating mode of the 1Count5V/500kHz

Integrating 1Count5V/500kHz with GSD File

Integrating the 1Count5V/500kHz with STEP 7


(in non-isochronous mode only)
Select an entry in the GSD file that corresponds
to the operating mode you want.
Select the entry Select the entry Select the entry
C 6ES7138-4DE02-0AB0 1CNT5V M 6ES7138-4DE02-0AB0 1CNT5V W 6ES7138-4DE02-0AB0 1CNT5V
for counting modes for measuring modes for position feedback
Select the parameters.

Note
Fast mode is designed for use in especially short isochronous cycles. You need STEP 7 to
configure isochronous operation.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 139
1Count5V/500kHz
3.6 Count Modes

3.6 Count Modes

3.6.1 Overview

Introduction
The counting modes are used in counting applications (for counting of items, for example).
For the "Counting Mode" parameter, you can select from the following modes:
● Count continuously (for position detection with incremental encoders, for example)
● Count once (for counting items up to a maximum limit, for example)
● Count periodically (in applications with recurring counting operations, for example)
To execute one of these modes, you have to assign parameters to the 1Count5V/500kHz.

Maximum Count Range


The high counting limit is +2147483647 (231 - 1).
The low counting limit is -2147483648 (-231).

Load Value
You can specify a count value through a load value for the 1Count5V/500kHz.
This load value is either applied directly as the new count value (LOAD_VAL) or it is applied
as the count value when one of the following events occurs (LOAD_PREPARE):
● In the Count once and Count periodically counting modes
– The low or high counting limit is reached when a main count direction is not assigned.
– The assigned high counting limit is reached when the main count direction is up.
– Zero is reached when the main count direction is down.
● In all counting modes
– The counting operation is started by a SW gate or HW gate (if the counting operation
is continued, the load value is not applied).
– Synchronization
– Latch and retrigger

Technological Functions
140 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.6 Count Modes

Gate Control
To control the 1Count5V/500kHz, you have to use the gate functions.

Main Count Direction


With the main count direction, you assign which RESET states (status following parameter
assignment) the load value and count value can take on. It is thus possible to create
incrementing or decrementing count applications. The assigned main count direction has no
effect on the direction evaluation when the count pulses are detected.

RESET States of the Following Values after Parameter Assignment

Table 3-2 RESET States

Value Main count direction RESET state


Load value None 0
Up 0
Down Assigned high counting limit
Count value None 0
Up 0
Down Assigned high counting limit
Comparison value 1 and 2 None 0
Up 0
Down Assigned high counting limit
Latch value None 0
Up 0
Down Assigned high counting limit

Isochrone Mode
In isochrone mode, the 1Count5V/500kHz accepts control bits and control values from the
control interface in each bus cycle and reports back the response in the same cycle.
In each cycle, the 1Count5V/500kHz transfers the count or latch value that was valid at time
Ti and the status bits valid at time Ti.
A count controlled by hardware input signals can only be transferred in the same cycle if the
input signal occurred before time Ti.
(see Isochrone Mode Manual)

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 141
1Count5V/500kHz
3.6 Count Modes

3.6.2 Endless Counting

Definition
In this mode, the 1Count5V/500kHz counts endlessly as of the load value:
● If the 1Count5V/500kHz reaches the upper count limit when counting up, and another
count pulse then comes, it will jump to the lower count limit and continue counting from
there without losing the pulse.
● If the 1Count5V/500kHz reaches the lower count limit when counting down, and another
count pulse then comes, it will jump to the upper count limit and continue counting from
there without losing the pulse.
● The upper count limit is set at +2147483647 (= 231 - 1).
● The lower count limit is set at -2147483648 (= -231).

&RXQWHUVWDWXV

+LJKFRXQWLQJOLPLW

/RDGYDOXH

/RZFRXQWLQJOLPLW

0HDVXUHGYDOXH *DWHVWRS 7LPH

Figure 3-2 Endless Counting with Gate Function

Function of the Digital Input


Select one of the following functions for the digital input:
● Input
● Hardware gate
● Latch Function
● Synchronization

Function of the Digital Outputs


Select one of the following functions for each digital output:
● Output, no switching through comparator
● Activation at a counter status greater than or equal to the comparison value
● Activation at a counter status less than or equal to the comparison value
● Pulse on reaching the comparison value
● Switching at comparison values (DO1 only)

Technological Functions
142 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.6 Count Modes

Influencing the Behavior of the Digital Outputs through:


The behavior of the digital outputs can be influenced as follows:
● Hysteresis
● Pulse duration

Changing values during operation


The following values can be changed during operation:
● Load value (LOAD_PREPARE)
● Counter status (LOAD_VAL)
● Comparison value 1 (CMP_VAL1)
● Comparison value 2 (CMP_VAL2)
● Function and behavior of the digital outputs (C_DOPARAM)

See also
Gate Functions in Count Modes (Page 150)
Latch Function (Page 153)
Synchronization (Page 156)
Behavior of the Outputs in Count Modes (Page 160)
Assignment of the Feedback and Control Interface for the Count Modes (Page 168)

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 143
1Count5V/500kHz
3.6 Count Modes

3.6.3 Once-Only Counting

Definition
In this mode, the 1Count5V/500kHz counts once only, depending on the main count direction
set.
● When there is no main count direction:
– Counts as of the load value.
– Counts up or down.
– The count limits are fixed at the maximum count range.
– In the event of overflow or underflow at the respective count limit, the gate is closed
automatically.
● When the main count direction is up:
– Counts as of the load value.
– Counts up or down.
– When the upper count limit is reached, the counter jumps to the load value and the
gate is closed.
– The upper limit can be assigned parameters, and the load value has a RESET status
of 0 and can be changed.
● When the count direction is down:
– Counts as of the load value.
– Counts up or down.
– When the lower count limit is reached, the 1Count5V/500kHz jumps to the load value
and the gate is closed.
– The lower limit is fixed at 0, and the load value can be assigned parameters
(parameter: upper count limit) and can be changed.

Technological Functions
144 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.6 Count Modes

The internal gate is automatically closed in the event of an overflow/underflow at the count
limits. To restart counting, you have to open the gate again.

&RXQWHUVWDWXV

8SSHU 676B2)/:
FRXQWOLPLW

/RDGYDOXH
 676B1'

/RZHU 676B8)/:
FRXQWOLPLW

0HDVXUHG $XWRPDWLF 0HDVXUHG $XWRPDWLF 7LPH


YDOXH JDWHVWRS YDOXH JDWHVWRS

Figure 3-3 Once-Only Counting Without Main Count Direction; Terminating Gate Function

With an interrupting gate function, the count remains at the underflow when the gate is
started.

&RXQWHUVWDWXV

8SSHU 676B2)/:
FRXQWOLPLW

/RDGYDOXH

/RZHU
FRXQWOLPLW

0HDVXUHG $XWRPDWLF 0HDVXUHG $XWRPDWLF


YDOXH JDWHVWRS YDOXH JDWHVWRS 7LPH

Figure 3-4 Once-Only Counting with Up as the Main Count Direction

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 145
1Count5V/500kHz
3.6 Count Modes

Function of the Digital Input


Select one of the following functions for the digital input:
● Input
● Hardware gate
● Latch Function
● Synchronization

Function of the Digital Outputs


Select one of the following functions for each digital output:
● Output, no switching through comparator
● Activation at a counter status greater than or equal to the comparison value
● Activation at a counter status less than or equal to the comparison value
● Pulse on reaching the comparison value
● Switching at comparison values (DO1 only)

Influencing the Behavior of the Digital Outputs through:


The behavior of the digital outputs can be influenced as follows:
● Hysteresis
● Pulse duration

Changing values during operation


The following values can be changed during operation:
● Load value (LOAD_PREPARE)
● Counter status (LOAD_VAL)
● Comparison value 1 (CMP_VAL1)
● Comparison value 2 (CMP_VAL2)
● Function and behavior of the digital outputs (C_DOPARAM)

See also
Gate Functions in Count Modes (Page 150)
Latch Function (Page 153)
Synchronization (Page 156)
Behavior of the Outputs in Count Modes (Page 160)
Assignment of the Feedback and Control Interface for the Count Modes (Page 168)

Technological Functions
146 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.6 Count Modes

3.6.4 Periodic Counting

Definition
In this mode, the 1Count5V/500kHz counts periodically, depending on the main count
direction set.
● When there is no main count direction:
– Counts as of the load value.
– Counts up or down.
– The count limits are fixed at the maximum count range.
– In the event of an overflow or underflow at the respective count limit, the
1Count5V/500kHz jumps to the load value and continues counting from there.
● When the main count direction is up:
– Counts as of the load value.
– Counts up or down.
– The upper limit can be assigned parameters, and the load value has a RESET status
of 0 and can be changed.
– When the upper count limit is reached, the 1Count5V/500kHz jumps to the load value
and continues counting from there.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 147
1Count5V/500kHz
3.6 Count Modes

● When the count direction is down:


– Counts as of the load value.
– Counts up or down.
– When the lower count limit is reached, the 1Count5V/500kHz jumps to the load value
and continues counting from there.
– The lower limit is fixed at 0, and the load value can be assigned parameters
(parameter: upper count limit) and can be changed.

&RXQW

+LJKFRXQWLQJ 676B2)/:
OLPLW

/RDGYDOXH
 676B1'

/RZFRXQWLQJ
676B8)/:
OLPLW 
*DWHVWDUW *DWHVWRS 7LPH

Figure 3-5 Periodic Counting without a Main Count Direction

&RXQW

+LJK
676B2)/:
FRXQWLQJOLPLW

/RDGYDOXH



/RZ
FRXQWLQJOLPLW

*DWHVWDUW *DWHVWRS 7LPH

Figure 3-6 Periodic Counting with Up as the Main Count Direction

Technological Functions
148 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.6 Count Modes

Function of the Digital Input


Select one of the following functions for the digital input:
● Input
● Hardware gate
● Latch Function
● Synchronization

Function of the Digital Outputs


Select one of the following functions for each digital output:
● Output, no switching through comparator
● Activation at a counter status greater than or equal to the comparison value
● Activation at a counter status less than or equal to the comparison value
● Pulse on reaching the comparison value
● Switching at comparison values (DO1 only)

Influencing the Behavior of the Digital Outputs through:


The behavior of the digital outputs can be influenced as follows:
● Hysteresis
● Pulse duration

Changing values during operation


The following values can be changed during operation:
● Load value (LOAD_PREPARE)
● Counter status (LOAD_VAL)
● Comparison value 1 (CMP_VAL1)
● Comparison value 2 (CMP_VAL2)
● Function and behavior of the digital outputs (C_DOPARAM)

See also
Gate Functions in Count Modes (Page 150)
Latch Function (Page 153)
Synchronization (Page 156)
Behavior of the Outputs in Count Modes (Page 160)
Assignment of the Feedback and Control Interface for the Count Modes (Page 168)

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 149
1Count5V/500kHz
3.6 Count Modes

3.6.5 Behavior of the Digital Inputs

Digital Input of the 1Count5V/500kHz


The DI digital input can be operated with 24 V sensors (P switch and series mode).
In the case of the input and HW gate functions, the level of the digital input can be inverted
by means of parameter assignment.
The STS_DI feedback bit indicates the level of the digital input.

3.6.6 Gate Functions in Count Modes

Software Gate and Hardware Gate


The 1Count5V/500kHz has two gates
● A software gate (SW gate), which is controlled by the SW_GATE control bit.
The software gate can only be opened by a positive edge of the SW_GATE control bit. It
is closed when this bit is reset. Note the transfer times and run times of your control
program.
● A hardware gate (HW gate), which is controlled by means of the digital input on the
1Count5V/500kHz. You assign the hardware gate as the function of the digital input
(Function DI "HW Gate"). It is opened on a positive edge at the digital input and closed on
a negative edge.

Internal gate
The internal gate is the logical AND operation of the HW gate and SW gate. Counting is only
active when the HW gate and the SW gate are open. The STS_GATE feedback bit (internal
gate status) indicates this. If a HW gate has not been assigned, the setting of the SW gate is
decisive. Counting is activated, interrupted, continued, and canceled by means of the
internal gate. In the Count once counting mode, the internal gate is closed automatically
when there is an overflow/underflow at the counting limits.

Technological Functions
150 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.6 Count Modes

Canceling- and Interrupting-Type Gate Function


When assigning the gate function ("Gate Function" parameter), you can specify whether the
internal gate is to cancel or interrupt counting. When counting is canceled, after the gate is
closed and restarted, counting starts again from the beginning. When counting is interrupted,
after the gate is closed and restarted, counting continues from the previous value.
The diagrams below indicate how the interrupting and canceling gate functions work:

&RXQW

+LJKFRXQWLQJOLPLW

/RDGYDOXH

/RZFRXQWLQJOLPLW

*DWHVWDUW *DWHVWRS *DWHVWDUW 7LPH

Figure 3-7 Count Continuously, Up, Interrupting Gate Function

&RXQWHUVWDWXV

8SSHUFRXQWOLPLW

/RDGYDOXH

/RZHUFRXQWOLPLW

0HDVXUHG *DWHVWRS 0HDVXUHG 7LPH


YDOXH YDOXH

Figure 3-8 Count Continuously, Down, Canceling Gate Function

Gate control by means of the SW gate only


When the gate is opened, one of the following occurs, depending on the parameter
assignment:
● Counting continues from the current count, or
● Counting starts from the load value
If the SW gate is opened in isochrone mode in bus cycle "n" by setting the SW_GATE control
bit, counting starts at time To in cycle "n+1". In the same cycle "n+1", the 1Count24V/100kHz
delivers the current count value from time Ti. (see Isochronous Mode Manual).

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 151
1Count5V/500kHz
3.6 Count Modes

Gate control by means of the SW gate and HW gate


If the SW gate opens when the HW gate is already open, counting continues starting from
the current count.
When the HW gate is opened, one of the following occurs, depending on the parameter
assignment:
● Counting continues from the current count, or
● Counting starts from the load value
If the SW gate is opened in isochrone mode in bus cycle "n" by setting the SW_GATE control
bit, counting starts at time To in cycle "n+1" if the HW gate is already open at this time. If the
HW gate opens between To and Ti in cycle "n+1", counting only starts once the HW gate is
open. In both cases, the 1Count24V/100kHz delivers the current count value in cycle "n+1"
starting from time Ti.

Technological Functions
152 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.6 Count Modes

3.6.7 Latch Function

Introduction
There are two latch functions:
● The Latch and Retrigger function
● The Latch function

The Latch and Retrigger Function


In order to use this function, you must first select it with the "Latch and Retrigger on Positive
Edge" Function DI parameter.

&RXQWSXOVHV

6:B*$7(

',GLJLWDOLQSXW

&RXQWHUVWDWXV

/DWFKYDOXH

Figure 3-9 Latch and Retrigger with Load Value = 0

This function stores the current internal count of the 1Count5V/500kHz and retriggers
counting when there is a positive edge on the digital input.
This means that the current internal counter status at the time of the positive edge is stored
(latch value), and the 1Count5V/500kHz is then loaded again with the load value, from which
counting resumes.
The counting mode must be enabled with the SW gate before the function can be executed.
It is started with the (first) positive edge on the digital input.
The stored count rather than the current count is indicated in the feedback interface. The
STS_DI bit indicates the level of the latch and retrigger signal.
The latch value is preassigned with its RESET state (see RESET states table). It is not
changed when the SW gate is opened.
Direct loading of the counter does not cause the indicated stored count to be changed.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 153
1Count5V/500kHz
3.6 Count Modes

If you close the SW gate, counting is only interrupted; this means that when you open the
SW gate again, counting is continued. The DI digital input remains active even when the
SW gate is closed.
Counting is also latched and triggered in isochrone mode with each edge on the digital input.
The count that was valid at the time of the last edge before Ti is displayed in the feedback
interface.

The Latch Function


In order to use this function, the Function DI parameter must be set to "Latch on Positive
Edge".

&RXQWSXOVHV

6:B*$7(

',GLJLWDOLQSXW

&RXQWHUVWDWXV

/DWFKYDOXH

Figure 3-10 Latch with a Load Value of 0

Count and latch value are preset with their RESET states (see RESET states table).
The counting function is started when the SW gate is opened. The 1Count5V/500kHz begins
at the load value.
The latch value is always the exact count at the time of the positive edge on the digital input
DI.
The stored count rather than the current count is indicated in the feedback interface. The
STS_DI bit indicates the level of the latch signal.
Direct loading of the counter does not cause the indicated stored count to be changed.
In isochrone mode, the count that was latched at the time of the last positive edge before Ti
is displayed in the feedback interface.
When you close the SW gate, the effect is either canceling or interrupting, depending on the
parameter assignment. The digital input DI remains active even when the SW gate is closed.
Further possible causes of parameter assignment errors with the latch function:
● Incorrect parameter assignment of the digital output function (Function DI)

Technological Functions
154 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.6 Count Modes

Expanded Feedback Interface


If the 1Count5V/500kHz is inserted behind an IM 151 that supports the reading and writing of
broader user data interfaces, the current count value can be read from bytes 8 to 11 of the
feedback interface.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 155
1Count5V/500kHz
3.6 Count Modes

3.6.8 Synchronization

Introduction
There are two methods of synchronizing the 1Count5V/500kHz:
● Synchronization with DI
● Synchronization with DI and zero mark

Synchronization with DI
In order to use this function, you must first select it with the "Synchronize on Positive Edge"
Function DI parameter.

,QWHUQDOFRXQWSXOVHV
XSRUGRZQ

'LJLWDOLQSXW
]HURPDUN

6\QFKURQL]DWLRQ
RQFHRQO\
(QDEOH
&57/B6<1

&RXQWYDOXH

/RDGYDOXH

6\QFKURQL]DWLRQ
SHULRGLF

(QDEOH
&57/B6<1

&RXQWYDOXH

/RDGYDOXH

Figure 3-11 Once-Only and Periodic Synchronization

Technological Functions
156 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.6 Count Modes

If you have assigned synchronization, the positive edge of a reference signal on the input
sets the 1Count5V/500kHz to the load value.
You can select between once-only and periodic synchronization ("Synchronization"
parameter).
The following conditions apply:
● The counting mode must have been started with the SW gate.
● The "Enable synchronization CTRL_SYN" control bit must be set.
● In once-only synchronization, the first edge loads the1Count5V/500kHz with the load
value after the enable bit is set.
● In periodic synchronization, the first edge and each subsequent edge load the
1Count5V/500kHz with the load value after the enable bit is set.
● After successful synchronization, the STS_SYN feedback bit is set and the SYN LED
comes on. The RES_STS control bit resets the feedback bit and switches the LED off.
● The signal of a bounce-free switch can serve as the reference signal.
● The STS_DI feedback bit indicates the level of the reference signal.
In isochrone mode, the set feedback bit STS_SYN indicates that the positive edge on the
digital input was between time Ti in the current cycle and Ti in the previous cycle.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 157
1Count5V/500kHz
3.6 Count Modes

Synchronization with DI and Zero Mark


In order to be able to use this function, you must have selected it from the digital input
function parameters.

,QWHUQDOFRXQWSXOVHV
XSRUGRZQ

'LJLWDOLQSXW',

=HURPDUN

6\QFKURQL]DWLRQ
RQFHRQO\
(QDEOH
&57/B6<1

&RXQWYDOXH

/RDGYDOXH

6\QFKURQL]DWLRQ
SHULRGLFDOO\

(QDEOH
&57/B6<1

&RXQWYDOXH

/RDGYDOXH

Figure 3-12 Once-Only and Periodic Synchronization

Technological Functions
158 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.6 Count Modes

If you have assigned synchronization with DI and zero mark, the DI serves as the HW
enable. When the HW enable is active, the 1Count5V/500kHz is loaded with the load value
by the zero mark of the encoder.
You can select between once-only and periodic synchronization.
The following conditions apply:
● The counting mode must have been started with the SW gate.
● The "Enable synchronization CTRL_SYN" control bit must be set.
● In once-only synchronization, the first zero mark loads the 1Count5V/500kHz with the
load value after the enable bit and the HW enable are set.
● In periodic synchronization, the first and each subsequent zero mark load the
1Count5V/500kHz with the load value after the enable bit and the HW enable are set.
● After successful synchronization, the STS_SYN feedback bit is set and the SYN LED
comes on. The RES_STS control bit resets the feedback bit and switches the LED off.
● The signal of a bounce-free switch can serve as the reference signal.
● The STS_DI feedback bit indicates the level of the reference signal.
In isochrone mode, the set feedback bit STS_SYN indicates that the positive edge on the
digital input was between time Ti in the current cycle and Ti in the previous cycle.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 159
1Count5V/500kHz
3.6 Count Modes

3.6.9 Behavior of the Outputs in Count Modes

Introduction
The 1Count5V/500kHz lets you store two comparison values, which are assigned to the
digital outputs. The outputs can be activated, depending on the count and comparison
values. The various ways of setting the behavior of the outputs are described in this section.

Behavior Types of the Digital Outputs


The 1Count5V/500kHz has two digital outputs.
Parameters can be assigned for both outputs ("Function DO1" and "Function DO2"
parameters).
You can change the function and the behavior of the digital outputs during operation.
You can choose from the following functions:
● Output
● Count ≥ comparison value
● Count ≤ comparison value
● Pulse on reaching the comparison value
● Switch at comparison values (DO1 only)

Output
You can switch the outputs on and off with the control bits SET_DO1 and SET_DO2.
The control bits CTRL_DO1 or CTRL_DO2 must be set for this.
You can query the status of the outputs with the status bits STS_DO1 and STS_DO2 in the
feedback interface.
The status bits STS_CMP1 and STS_CMP2 indicate that the relevant output is or was
switched on. These status bits retain their status until they are acknowledged. If the output is
still switched, the corresponding bit is set again immediately. These status bits are also set
when the control bit SET_DO1 or SET_DO2 is operated without DO1 or DO2 being enabled.
Isochrone mode: In isochrone mode, the outputs DO1 and DO2 are switched at time To.

Count ≤ Comparison Value and Count ≥≤ Comparison Value


If the comparison conditions are fulfilled, the respective comparator switches on the output.
The status of the output is indicated by STS_DO1 and STS_DO2.
The control bits CTRL_DO1 or CTRL_DO2 must be set for this.
The comparison result is indicated by the status bits STS_CMP1 or STS_CMP2. You cannot
acknowledge and thus reset these bits until the comparison conditions are no longer fulfilled.
Isochrone mode: In isochrone mode as well, the DO1 and DO2 outputs are switched as soon
as the comparison condition is fulfilled and are therefore independent of the bus cycle.

Technological Functions
160 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.6 Count Modes

Comparison Value Reached, Output Pulse


If the count reaches the comparison value, the comparator switches on the respective digital
output for the assigned pulse duration.
The control bit CTRL_DO1 or CTRL_DO2 must be set for this.
The status bits STS_DO1 and STS_DO2 always have the status of the corresponding digital
output.
The comparison result is indicated by the status bit STS_CMP1 or STS_CMP2 and cannot
be reset by acknowledgment until the pulse duration has elapsed.
If a main count direction is assigned, the comparator switches only when the comparison
value in the main count direction is reached.
If a main count direction is not assigned, the comparator switches when the comparison
value is reached from either direction.
If the digital output is set by control bit SET_DO1 or SET_DO2, it is reset when the pulse
duration has elapsed.
Isochrone mode: In isochrone mode as well, the DO1 and DO2 outputs are switched as soon
as the comparison condition is fulfilled and are therefore independent of the bus cycle.

Pulse Duration when the Comparison Value is Reached


The pulse duration begins when the respective digital output is set. The inaccuracy of the
pulse duration is less than 2 ms.
The pulse duration can be set to suit the actuators used. The pulse duration specifies how
long the output is to be set for. The pulse duration can be preselected between 0 ms and
510 ms in increments of 2 ms.
If the pulse duration = 0, the output is set until the comparison condition is no longer fulfilled.
Note that the count pulse times must be greater than the minimum switching times of the
digital output.
Isochrone mode: In isochrone mode as well, the DO1 and DO2 outputs are switched as soon
as the comparison condition is fulfilled and are therefore independent of the bus cycle.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 161
1Count5V/500kHz
3.6 Count Modes

Switch at comparison values


The comparator switches the output when the following conditions are met:
● The two comparison values must be loaded using the load functions CMP_VAL1 and
CMP_VAL2, and
● After the comparison values are loaded, the DO1 output must be enabled with
CRTL_DO1.
The following table shows you when the DO1 is switched on or off:

DO1 is switched on when DO1 Is switched off when


V2 < V1 (see Figure below) V2 ≤ count ≤ V1 V2 > count
or
count > V1
V2 = V1 V2 = count = V1 V2 ≠ count ≠ V1
V2 > V1 (see Figure below) V1 > count V1 ≤ count ≤ V2
or
count > V2
The comparison result is indicated by the status bit STS_CMP1. You can only acknowledge
and thus reset this bit when the comparison condition is no longer fulfilled.
There is no hysteresis in the case of this output behavior.
It is not possible to control the DO1 output with the SET_DO1 control bit in the case of this
output behavior.

Technological Functions
162 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.6 Count Modes

Isochrone mode: In isochrone mode, as well, the DO1 output is switched as soon as the
comparison condition is fulfilled and is therefore independent of the bus cycle.

&RXQW

9

9

 W

'2
W

Figure 3-13 V2 < V1 at the Start of Counting

&RXQW

9

9

 W

'2
W

Figure 3-14 V2 > V1 at the Start of Counting

Setting or Modifying the Function and Behavior of the Digital Output DO1
When setting or modifying the behavior of DO1, you must take all assignable
interdependencies into account. Failure to do so will generate a parameter assignment error
or a loading error.

Boundary conditions:
If you assign "Switch at Comparison Values" for DO1, you must:
● Set hysteresis = 0, and
● Assign "Output" for the DO2 output

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 163
1Count5V/500kHz
3.6 Count Modes

Hysteresis
An encoder can remain at a particular position and then fluctuate around this position. This
state causes the count to fluctuate around a particular value. If there is a comparison value
in this fluctuation range, for example, the associated output is switched on and off in
accordance with the rhythm of the fluctuations. To prevent switching occurring in the case of
small fluctuations, the 1Count5V/500kHz is equipped with an assignable hysteresis. You can
assign a range between 0 and 255 (0 means: hysteresis switched off).
Hysteresis also works with overflow and underflow.

Method of Operation with Count ≤ Comparison Value and Count ≥ Comparison Value
The diagram below provides an example of how hysteresis works. The figure shows the
differences in the behavior of an output when hysteresis of 0 (= switched off) is assigned as
opposed to hysteresis of 3. In the example, the comparison value is 5.
The following settings are assigned for the counter: "Main count direction" = "Up" and
"Switch on at count ≥ comparison value".
When the comparison condition is met, hysteresis becomes active. While the hysteresis is
active, the comparison result remains unchanged.
If the count value goes outside the hysteresis range, hysteresis is no longer active. The
comparator switches again according to its comparison conditions.

&RXQW











+\V

+\V
Figure 3-15 Example of How Hysteresis Works

Note
If the count direction changes on the comparison value when hysteresis is active, the output
is reset.

Technological Functions
164 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.6 Count Modes

Method of Operation when the Comparison Value Is Reached and the Pulse Duration = 0
The diagram below provides an example of how hysteresis works. The figure shows the
differences in the behavior of an output when hysteresis of 0 (= switched off) is assigned as
opposed to hysteresis of 3. In the example, the comparison value is 5.
The following settings are assigned for the counter: "Pulse on reaching the comparison
value", "No main count direction" and "Pulse duration = 0".
When the comparison conditions are met, hysteresis becomes active. While the hysteresis is
active, the comparison result remains unchanged. If the count value goes outside the
hysteresis range, hysteresis is no longer active. The comparator deletes the result of the
comparison.

&RXQW











+\V

+\V

Figure 3-16 Example of How Hysteresis Works

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 165
1Count5V/500kHz
3.6 Count Modes

Method of Operation when the Comparison Value Is Reached, Output Pulse Duration
The diagram below provides an example of how hysteresis works. The figure shows the
differences in the behavior of an output when hysteresis of 0 (= switched off) is assigned as
opposed to hysteresis of 3. In the example, the comparison value is 5.
The following settings are assigned for the counter: "Pulse on reaching the comparison
value", "No main count direction" and "pulse duration > 0".
When the comparison conditions have been met, hysteresis becomes active and a pulse of
the assigned duration is output.
If the count value goes outside the hysteresis range, hysteresis is no longer active.
When hysteresis becomes active, the 1Count5V/500kHz stores the count direction. If the
hysteresis range is exited in a different direction to the one stored, a pulse is output.

&RXQW











+\V

+\V
Figure 3-17 Example of How Hysteresis Works

Technological Functions
166 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.6 Count Modes

Controlling the Outputs Simultaneously with the Comparators


If you have selected a comparison function for the outputs, you can continue to control the
outputs with SET_DO1 or SET_DO2. This allows you to simulate the effect of the
comparison functions on your control program:
● The output is set with the positive edge of SET_DO1 or SET_DO2. However, if the "Pulse
on Reaching the Comparison Value" function is selected, only one pulse with the
specified duration is output. When pulse duration = 0, the output can be set with
SET_DO1 or SET_DO2, as long as the count value is located on the comparison value or
hysteresis is active. The SET_DO1 control bit is not permitted with the "Switch at
Comparison Values" output behavior.
● A negative edge of SET_DO1 or SET_DO2 resets the output.
Note that the comparators are still active and can set or reset the output if the comparison
result changes.

Note
An output set with SET_DO1 or SET_DO2 is not reset at the comparison value (by the
comparator).

Loading Comparison Values


You transfer the comparison values to the 1Count5V/500kHz. The counting is not affected by
this.

Table 3-3 Valid Range for the Two Comparison Values

Main count direction: Main count direction: Main count direction:


None Up Down
Low counting limit -2147483648 1
to to to
high counting limit high counting limit -1 2147483647

Modifying the Function and Behavior of Digital Outputs


You can modify the functions and behavior of the outputs during operation using the control
interface. The 1Count5V/500kHz deletes the outputs and accepts the values as follows:
● Function of digital outputs DO1 and DO2: If you change this function so that the
comparison condition is satisfied, the output is not set until after the next count pulse.
However, if hysteresis is active, the 1Count5V/500kHz does not make any changes at the
output.
● Hysteresis: An active hysteresis (see How Hysteresis Works) continues to be active
following the change. The new hysteresis range is applied the next time the comparison
value is reached.
● Pulse duration: The new pulse duration takes effect with the next pulse.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 167
1Count5V/500kHz
3.6 Count Modes

3.6.10 Assignment of the Feedback and Control Interface for the Count Modes

Note
The following data of the control and feedback interfaces are consistent for the
1Count5V/500kHz:
Bytes 0 to 3
Bytes 4 to 7
Bytes 8 to 11 (modified user data interface)
Use the access or addressing mode for data consistency over the entire control and
feedback interface on your DP master (only for configuration using the GSD file).

Assignment Tables
The tables show the assignment of the feedback and control interface for the counting
modes.

Table 3-4 Feedback Interface (Inputs)

Address Assignment Designation


Bytes 0 to 3 Count value or stored count value in the case of the latch function on the digital input
Byte 4 Bit 7: Short circuit of the encoder supply ERR_24V
Bit 6: Short circuit / wire break / overtemperature ERR_DO1
Bit 5: Parameter assignment error ERR_PARA
Bit 4: Short circuit / wire break / overtemperature ERR_DO2
Bit 3: Short circuit / wire break / encoder signal ERR_ENCODER
Bit 2: Resetting of status bits active RES_STS_A
Bit 1: Load function error ERR_LOAD
Bit 0: Load function is running STS_LOAD
Byte 5 Bit 7: Down direction status STS_C_DN
Bit 6: Up direction status STS_C_UP
Bit 5: Reserve = 0
Bit 4: DO2 status STS_DO2
Bit 3: DO1 status STS_DO1
Bit 2: Reserve = 0
Bit 1: DI status STS_DI
Bit 0: Internal gate status STS_GATE

Technological Functions
168 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.6 Count Modes

Address Assignment Designation


Byte 6 Bit 7: Zero-crossing in the count range when counting without a main count direction STS_ND
Bit 6: Low counting limit STS_UFLW
Bit 5: High counting limit STS_OFLW
Bit 4: Comparator 2 status STS_CMP2
Bit 3: Comparator 1 status STS_CMP1
Bit 2: Reserve = 0
Bit 1: Reserve = 0
Bit 0: Synchronization status STS_SYN
Byte 7 Reserve = 0
Bytes 8 to 11 Count value 1
1 Modified user data interface

Table 3-5 Control Interface (Outputs)

Address Assignment
Bytes 0 to 3 Load value direct, preparatory, comparison value 1 or 2
Byte 0 Behavior of DO1, DO2 of the 1Count5V/500kHz
Bit 2 Bit 1 Bit 0 Function DO1
0 0 0 Output
0 0 1 Switch on at count ≥ comparison value
0 1 0 Switch on at count ≤ comparison value
0 1 1 Pulse on reaching the comparison value
1 0 0 Switch at comparison values
1 0 1 blocked
1 1 0 blocked
1 1 1 blocked
Bit 5 Bit 4 Function DO2
0 0 Output
0 1 Switch on at count ≥ comparison value
1 0 Switch on at count ≤ comparison value
1 1 Pulse on reaching the comparison value
Bits 3, 6, and 7: Reserve = 0
Bytes 1 to 3 Byte 1: Hysteresis DO1, DO2 (range 0 to 255)
Byte 2: Pulse duration [2ms] DO1, DO2 (range 0 to 255)
Byte 3: Reserve = 0
Byte 4 EXTF_ACK Bit 7: Error diagnostics acknowledgment
CTRL_DO2 Bit 6: Enable DO2
SET_DO2 Bit 5: Control bit DO2
CTRL_DO1 Bit 4: Enable DO1
SET_DO1 Bit 3: Control bit DO1
RES_STS Bit 2: Start resetting of status bit
CTRL_SYN Bit 1: Enable synchronization
SW_GATE Bit 0: SW gate control bit

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 169
1Count5V/500kHz
3.6 Count Modes

Address Assignment
Byte 5 Bit 7: Reserve = 0
Bit 6: Reserve = 0
Bit 5: Reserve = 0
C_DOPARAM Bit 4: Change function and behavior of DO1, DO2
CMP_VAL2 Bit 3: Load comparison value 2
CMP_VAL1 Bit 2: Load comparison value 1
LOAD_PREPARE Bit 1: Load counter preparatory
LOAD_VAL Bit 0: Load counter direct
Bytes 6 to 7 Reserve = 0 1
1 Not used for modified user interface

Notes on the Control Bits

Table 3-6 Notes on the Control Bits

Control bits Notes


C_DOPARAM Change function and behavior of DO1, DO2 (see figure below)
The values from bytes 0 to 2 are applied as new function, hysteresis, and pulse duration of DO1,
DO2. This may result in the following error: The conditions for the "Switch at comparison values"
behavior are not fulfilled.
CMP_VAL1 Load comparison value 1 (see figure below)
The value from bytes 0 to 3 is transferred to comparison value 1 with the control bit "Load
comparison value CMP_VAL1".
CMP_VAL2 Load comparison value 2 (see figure below)
The value from bytes 0 to 3 is transferred to comparison value 2 with the control bit "Load
comparison value CMP_VAL2".
CTRL_DO1 Enable DO1
You use this bit to enable the DO1 output.
CTRL_DO2 Enable DO2
You use this bit to enable the DO2 output.
CTRL_SYN You use this bit to enable synchronization.
EXTF_ACK Error acknowledgment
The error bits must be acknowledged with the EXTF_ACK control bit after the cause is removed. (see
figure below)
LOAD_PREPARE Load counter preparatory (see figure below)
The value from bytes 0 to 3 is applied as the load value.
LOAD_VAL The value from bytes 0 to 3 is loaded directly as the new counter value (see figure below).
RES_STS Start resetting of status bit
The status bits are reset by means of the acknowledgment process between the RES_STS bit and
the RES_STS_A bit. (see figure below)
SET_DO1 Control bit DO1
Switches the DO1 digital output on and off when CTRL_DO1 is set.

Technological Functions
170 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.6 Count Modes

Control bits Notes


SET_DO2 Control bit DO2
Switches the DO2 digital output on and off when CTRL_DO2 is set.
SW_GATE SW gate control bit
The SW gate is opened/closed via the control interface with the SW_GATE bit.

Notes on the Feedback Bits

Table 3-7 Notes on the Feedback Bits

Feedback bits Notes


ERR_24V Short circuit of the encoder supply
The error bit must be acknowledged with the EXTF_ACK control bit (see figure below).
Diagnostic message, if assigned.
ERR_DO1 Short circuit/wire break/overtemperature due to overload at output DO1
The error bit must be acknowledged with the EXTF_ACK control bit (see figure below).
Diagnostic message, if assigned.
ERR_DO2 Short circuit/wire break/overtemperature at output DO2
The error bit must be acknowledged with the EXTF_ACK control bit (see figure below).
Diagnostic message, if assigned.
ERR_ENCODER Short circuit / wire break of 5 V encoder signal
The error bit must be acknowledged with the EXTF_ACK control bit (see figure below).
Diagnostic message, if assigned.
ERR_LOAD Load function error (see figure below)
The LOAD_VAL, LOAD_PREPARE, CMP_VAL1, CMP_VAL2, and C_DOPARAM bits cannot be set
simultaneously during transfer. This results in setting the ERR_LOAD status bit, similar to loading an
incorrect value (which is not accepted).
ERR_PARA Parameter assignment error ERR_PARA
RES_STS_A Resetting of the status bits active (see figure below)
STS_C_DN Down direction status
STS_C_UP Up direction status
STS_CMP1 Comparator 1 status
The STS_CMP1 status bit indicates that the output is or was switched on. It must be acknowledged
with the RES_STS control bit. If the status bit is acknowledged when the output is still switched on,
the bit is set again immediately. This bit is also set if the SET_DO1 control bit is used when DO1 is
not enabled.
STS_CMP2 Comparator 2 status
The STS_CMP2 status bit indicates that the output is or was switched on. It must be acknowledged
with the RES_STS control bit. If the status bit is acknowledged when the output is still switched on,
the bit is set again immediately. This bit is also set if the SET_DO2 control bit is used when DO2 is
not enabled.
STS_DI DI status
The status of the DI is indicated in all modes with the STS_DI bit in the feedback interface.
STS_DO1 DO1 status
The STS_DO1 status bit indicates the status of the DO1 digital output.
STS_DO2 DO2 status
The STS_DO2 status bit indicates the status of the DO2 digital output.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 171
1Count5V/500kHz
3.6 Count Modes

Feedback bits Notes


STS_GATE Internal gate status: Counting
STS_LOAD Load function running (see figure below)
STS_ND Zero-crossing in the count range when counting without a main counting direction. The bit must be
reset by the RES_STS control bit.
STS_OFLW High counting limit violated
STS_UFLW Low counting limit violated
Both bits must be reset.
STS_SYN Synchronization status
After successful synchronization, the STS_SYN bit is set. It must be reset by the RES_STS control
bit.

Access to the Control and Feedback Interface in STEP 7 Programming

Table 3-8 Access to the Control and Feedback Interface in STEP 7 Programming

Configuring with STEP 7 Configuring with STEP 7


using the GSD file 1) using HW Config
(Hardware catalog\PROFIBUS-DP\Additional (Hardware catalog\PROFIBUS-DP\
FIELD DEVICES\I/O\ET 200S) ET 200S)
Feedback interface Read with SFC 14 "DPRD_DAT" Load command (e.g. L PID)
Control interface Write with SFC 15 "DPWR_DAT" Transfer command (e.g. T PQD)
1 Load and transfer commands are also possible with CPU 3xxC, CPU 3xx with MMC, and CPU 4xx (V3.0 and later).

Technological Functions
172 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.6 Count Modes

Resetting of the Status Bits


STS_SYN, STS_CMP1, STS_CMP2, STS_OFLW, STS_UFLW, STS_ND

(YHQWVWLOOSHQGLQJRQUHVHW

)HHGEDFNVLJQDOV
RQHRIWKHVWDWXVELWV

&RQWUROELW
5(6B676

)HHGEDFNELW
5(6B676B$
W

5HVHWH[HFXWHG

5HTXHVWFDQFHOHG

&RXQW9N+]H[HFXWHVWKHUHVHW

5HTXHVWUHVHW

Figure 3-18 Resetting of the Status Bits

Acceptance of Values with the Load Function

(UURUELW
(55B/2$'
&RQWUROELW
/2$'B9$/
/2$'B35(3$5(
&03B9$/
&03B9$/
&B'23$5$0

)HHGEDFNELW
676B/2$'
W

9DOXHLVDSSOLHG(QGRIWUDQVIHU

&DQFHOUHTXHVWDQGDQGNHHSYDOXH
DYDLODEOH
&RXQW9N+]KDVXQGHUVWRRGWKHUHTXHVW

5HTXHVWYDOXHWUDQVIHUDQGPDNHYDOXHDYDLODEOH

Figure 3-19 Acceptance of Values with the Load Function

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 173
1Count5V/500kHz
3.6 Count Modes

Note
Only one of the following control bits can be set at a particular time:
CMP_VAL1 or CMP_VAL2 or LOAD_VAL or LOAD_PREPARE or C_DOPARAM.
Otherwise, the ERR_LOAD error is reported until all the specified control bits are deleted
again.
The ERR_LOAD error bit is only deleted when the following is carried out correctly.

Acknowledgment Principle in Isochrone Mode


In isochrone mode, exactly 4 bus cycles are always required to reset the status bits and to
accept values during the load function.

VW'3F\FOH QG'3F\FOH UG'3F\FOH WK'3F\FOH

&RQWUROELW
LQXVHU
SURJUDP

6WDWXVELW
RIPRGXOH

7L 7L 7L 7L 7L

7'3 7'3 7'3 7'3 7'3

Figure 3-20 Acknowledgment Principle in Isochrone Mode

Technological Functions
174 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.6 Count Modes

Error Detection
The program errors must be acknowledged. They have been detected by the
1Count5V/500kHz and are indicated at the feedback interface.
A channel-specific diagnosis is carried out if you have enabled group diagnostics in your
parameter assignment (see the ET 200S Distributed I/O System Manual).
The parameter assignment error bit is acknowledged by means of correct parameter
assignment.

$QHUURUKDVRFFXUUHGWKH&RXQW9N+]VHWVDQHUURU
ELWDGLDJQRVWLFPHVVDJHPD\DSSHDUHUURUGHWHFWLRQ
FRQWLQXHV

(UURUHOLPLQDWHGZKHQ(;7)B$&.LVVHWE\WKHXVHU
SURJUDPWKH&RXQW9N+]GHOHWHVWKHHUURUELWD
GLDJQRVWLFPHVVDJHPD\DSSHDU

HJHUURUELW
(55B9

(UURUDFNQRZOHGJ
(;7)B$&.

Figure 3-21 Error Acknowledgment

In the case of continuous error acknowledgment (EXTF_ACK=1) or at CPU/Master Stop, the


1Count5V/500kHz signals errors as soon as they are detected and resets them as soon as
they have been eliminated.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 175
1Count5V/500kHz
3.6 Count Modes

3.6.11 Parameter Assignment for the Count Modes

Introduction
You can use either of the following to assign parameters for the 1Count5V/500kHz:
● A GSD file (http://www.ad.siemens.de/csi/gsd)
● STEP 7 V5.3 SP2 or later

Parameter List for Counting Modes

Table 3-9 Parameter List for Counting Modes

Parameter Value Range Default


Enable
Group diagnostics Disable/enable Disable
Behavior in the event of higher-level controller failure
Behavior at CPU/Master STOP Turn off DO/ Turn off DO
Continue working mode/
DO substitute a value/
DO keep last value
Encoder parameters
Signal evaluation A, B Rotary encoder single/double/quadruple Rotary encoder single
Diagnostics A and B Off/on Off
Diagnostics N Off/on Off
Direction input B Normal/inverted Normal
Output parameters
Function DO1 Output/ Output
Switch on at count ≥ comparison value/
Switch on at count ≤ comparison value/
Pulse on reaching the comparison value/
Switch at comparison values
Function DO2 Output/ Output
Switch on at count ≥ comparison value/
Switch on at count ≤ comparison value/
Pulse on reaching the comparison value
Substitute value DO1 0/1 0
Substitute value DO2 0/1 0
Diagnostics DO11 Off/on Off
Diagnostics DO21 Off/on Off
Hysteresis DO1, DO2 0...255 0
Pulse duration [2 ms] DO1, DO2 0...255 0

Technological Functions
176 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.6 Count Modes

Parameter Value Range Default


Mode
Counting mode Continuous counting/ Count continuously
One-time counting/
Periodic counting
Gate function Cancel counting/ Cancel counting
Interrupt counting
Input signal HW gate Normal/inverted Normal
Function DI Input/ Input
HW gate/
Latch and retrigger at positive edge/
Synchronization at positive edge/
Latch at positive edge/
HW enable for synchronization
Synchronization2 Once only/Periodic Once-only
Main count direction None/Up/Down None
High counting limit 2 … 7FFF FFFF 7FFF FFFF
1 DO1/DO2 diagnostics (wire break) is possible only with pulse lengths of > 90 ms on digital output DO1/DO2.
2Only relevant if Function DI = Synchronization on positive edge or HW enable for synchronization

Parameter Assignment Error


● Incorrect mode
● Incorrect main count direction
● The "Input signal HW gate" parameter is set to inverted and the "Function DI" parameter
is not set to HW gate.
● High counting limit incorrect
● The value for the behavior of DO2 is not set to output although "Switch at comparison
values" has been assigned for DO1.
● The value for hysteresis does not equal 0 although "Switch at comparison values" has
been assigned for DO1.
● Function DI incorrect
● "On" is set for diagnostics N although "Off" was set for diagnostics A and B.

What to Do in the Event of Errors


Check the set value ranges.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 177
1Count5V/500kHz
3.7 Measurement Modes

3.7 Measurement Modes

3.7.1 Overview

Introduction
You can choose between the following modes:
● Frequency Measurement
● Period Measurement
● Rotational Speed Measurement
To execute one of these modes, you have to assign parameters to the 1Count5V/500kHz.

Measurement Process
The measurement is carried out during the parameter assignment integration time. When the
integration time elapses, the measured value is updated.
The end of a measurement is indicated by the STS_CMP1 status bit. This bit is reset by the
RES_STS control bit at the control interface.
If there were not at least two rising edges in the integration time which has been assigned
parameters, 0 is returned as the measured value.
A value of -1 is returned by the end of the first integration time.
You can change the integration time for the next measurement during operation.

Reversal of the direction of rotation


If the direction of rotation is reversed during an integration time, the measured value for this
measurement period is uncertain. If you evaluate the STS_C_UP and STS_C_DN feedback
bits (direction evaluation), you can respond to any process irregularities.

Gate Control
To control the 1Count5V/500kHz, you have to use the gate functions.

Clocked Mode
In clocked mode the 1Count5V/500kHz accepts the control bits and control values from the
control interface in each PROFIBUS DP cycle and reports back the response to them in the
same cycle.
In each cycle the 1Count5V/500kHz transfers a measured value and the status bits that were
valid at the time Ti.
The measurement starts and ends at the time Ti.

Technological Functions
178 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.7 Measurement Modes

Integration Time in Clocked Mode


If the integration time lasts several TDP cycles, you can recognize the new measurement
value in the user program on status bit STS_CMP1 (measurement completed) of the
feedback interface. This makes it possible to monitor the measurement procedure or for it to
be synchronized. It takes 4 TDP cycles, however, for this message to be acknowledged. The
minimum integration time in this case is (4 x TDP).
If the application can tolerate a jitter in the integration time of a TDP and a measured value
that remains constant for several cycles, you don't have to continually evaluate status bit
STS_CMP1. Integration times of (1 x TDP) to (3 x TDP) are then possible.
Because clocking was lost in the last TDP cycle of the integration time, the integration time is
increased by one TDP cycle. This does not corrupt the measured value.

NOTICE
The value range limits for the integration time must not be exceeded (see table for every
separate measuring mode).
If the range limits are violated, this results in a parameter assignment error, and the
1Count5V/500kHz does not go into clocked mode.

Note
When you change the configuration from non-clocked to clocked mode and vice versa, you
must always adjust the integration time parameter if you want to keep the length of the
integration time.

See also
Parameter Assignment for Measurement Modes (Page 209)

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 179
1Count5V/500kHz
3.7 Measurement Modes

3.7.2 Sequence of continuous-action measurement

Measuring Principle
The 1Count5/500kHz counts each positive edge of a pulse and assigns it a time value in µs.
The update time indicates the time interval at which the measured value is updated by the
module in the feedback interface.
The following applies for a pulse train with one or more pulse trains per update time:

Dynamic measuring time = Time of last pulse in the current update time interval
minus
Time of last pulse in the previous update time interval
When the update time has elapsed, a new measured value is calculated and output with the
dynamic measuring time.
If the current update time does not contain a pulse, the following dynamic measuring time
results:

Dynamic measuring time = Time of current, elapsed update time


minus
Time of last pulse
When the update time has elapsed, an estimated measured value is calculated with the
dynamic measuring time under the assumption that a pulse occurred at the end of the
update time.

Technological Functions
180 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.7 Measurement Modes

If the "1 Pulse per dynamic measuring time" estimated measured value is less than the last
measured value during the frequency and speed measurement, this estimated measured
value is output as the new measured value. With the period measurement, the dynamic
measuring time is output as the estimated period if the dynamic measuring time is greater
than the last measured period.

8SGDWHWLPH 8SGDWHWLPH 8SGDWHWLPH

'\QDPLF '\QDPLF '\QDPLF


PHDVXULQJWLPH PHDVXULQJWLPH PHDVXULQJWLPH

8SGDWHWLPH 8SGDWHWLPH 8SGDWHWLPH

'\QDPLF
PHDVXULQJWLPH

'\QDPLF
PHDVXULQJWLPH

'\QDPLF
PHDVXULQJWLPH

Figure 3-22 Measuring Principle

The 1Count5V/500kHz measures continuously. When assigning parameters, you specify an


update time.
During the time until the end of the first elapsed update time, a value of "-1" is returned.
The continuous measurement begins after the gate is opened with the first pulse of the pulse
train to be measured. The first measured value can be calculated after the second pulse, at
the earliest.
A measured value (frequency, period, or speed) is output in the feedback interface each time
the update time elapses. The end of a measurement is indicated with the STS_CMP1 status
bits. This bit is reset with the RES_STS and RES_STS_A bits according to the complete
acknowledgement principle.
If the direction of rotation is reversed during an update time, the measured value for this
measurement period is undefined. By evaluating the STS_C_DN and STS_C_UP feedback
bits (direction evaluation), you can respond to any process irregularities.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 181
1Count5V/500kHz
3.7 Measurement Modes

The following figure illustrates the principle of continuous measurement using frequency
measurement as an example.

*DWH

3XOVHWUDLQ

0HDVXUHG
YDOXH








 8SGDWHWLPH

Figure 3-23 Principle of Continuous Measurement (Frequency Measurement Example)

Gate Control
To control the 1Count5V/500kHz, you have to use the gate functions.

Isochrone Mode
In isochrone mode, the 1Count5V/500kHz accepts control bits and control values from the
control interface in each bus cycle and reports back the response in the same cycle.
In each cycle, the 1Count5V/500kHz transfers a measured value and the status bits that
were valid at the time Ti.
The measurement starts and ends at time Ti.

Technological Functions
182 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.7 Measurement Modes

Integration Time/Update Time in Isochrone Mode


If the integration time/update time lasts several TDP cycles, you can recognize the new
measured value in the user program at the bit STS_CMP1 status bit (measurement
completed) of the feedback interface. This enables monitoring of the measuring operation or
a synchronization with the measuring operation. It takes 4 TDP cycles, however, for this
message to be acknowledged. The minimum integration time/update time in this case is
(4 x TDP).
If the application can tolerate a jitter in the integration time of a TDP and a measured value
that remains constant for several cycles, you don't have to continually evaluate status bit
STS_CMP1. Integration times/update times of (1 x TDP) to (3 x TDP) are then possible.
Because isochronous operation was lost in the last TDP cycle of the integration time, the
integration time is increased by one TDP cycle. This does not corrupt the measured value.

Note
The value range limits for the integration time/update time must not be exceeded (see tables
for the individual measuring modes).
A violation of the value range limits will result in a parameter assignment error, and the
1Count5V/500kHz will not go into isochrone mode.

Note
When you change the configuration from non-isochrone to isochrone mode and vice versa,
you must always adjust the integration time/update time parameter if you want to keep the
length of the integration time/update time.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 183
1Count5V/500kHz
3.7 Measurement Modes

3.7.3 Frequency Measurement

Definition
In frequency measurement mode, the 1Count5V/500kHz counts the pulses that arrive within
a set integration time.

Integration time
You preset the integration time with the Integration Time parameter (see table).

Table 3-10 Calculation of the Integration Time

Boundary conditions Integration time Range of n


nmin nmax
Non-isochrone mode Any TDP n x 10 ms 1 1000
Isochrone mode TDP < 10 ms n x TDP (10 ms/TDP [ms]) +1 1 1000
TDP ≥ 10 ms n x TDP 1 1000 ms/TDP [ms] 1
1 Any digits after the decimal point that come about after dividing by TDP are omitted.
These limits must not be violated. If these limits are violated, the 1Count5V/500kHz generates a parameter assignment
error and will not go into isochrone mode.

Frequency Measurement
The value of the calculated frequency is made available in the unit Hz*10-3. The measured
frequency value can be read in the feedback interface (byte 0 to 3).

,QWHJUDWLRQWLPH

Q PV Q PV

&RXQWSXOVHV

,QWHUQDOJDWH
%HJLQQLQJRIIUHTXHQF\ (QGRIIUHTXHQF\
PHDVXUHPHQW PHDVXUHPHQW

Figure 3-24 Frequency Measurement with Gate Function

Technological Functions
184 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.7 Measurement Modes

Limit-Value Monitoring
The following value ranges are permitted for limit-value monitoring:

Low limit fu High limit fo


0 to 499,999,999 Hz*10-3 fu+1 to 500,000,000 Hz*10-3

Possible Measuring Ranges with Error Indication

Integration time fmin ± absolute error fmax ± absolute error


10 s 0.1 Hz ± 0.001 Hz 500 000 Hz ± 90 Hz
1s 1 Hz ± 0.001 Hz 500 000 Hz ± 55 Hz
0.1 s 10 Hz ± 0.002 Hz 500 000 Hz ± 52 Hz
0.01 s 100 Hz ± 0.013 Hz 500 000 Hz ± 63 Hz

See also
Gate Functions in Measurement Modes (Page 199)
Behavior of the Outputs in Measurement Modes (Page 200)
Assignment of the Feedback and Control Interfaces for the Measurement Modes (Page 202)

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 185
1Count5V/500kHz
3.7 Measurement Modes

3.7.4 Continuous Frequency Measurement

Definition
In frequency measurement mode, the 1Count5V/500kHz counts the pulses that arrive within
a dynamic measuring time.

Update time
The 1Count5V/500kHz updates the measured values cyclically. You preset the update time
with the Update Time parameter (see table). You can change the update time during
operation.

Table 3-11 Calculation of the Update Time

Boundary conditions Update time Range of n


nmin nmax
Non-isochrone mode Any TDP n x 10 ms 1 1000
Isochrone mode TDP < 10 ms n x TDP (10 ms/TDP [ms]) +1 1 1000
TDP ≥ 10 ms n x TDP 1 1000 ms/TDP [ms] 1
1 Any digits after the decimal point that come about after dividing by TDP are omitted.
These limits must not be violated. If these limits are violated, the 1Count5V/500kHz generates a parameter assignment
error and will not go into isochrone mode.

Frequency Measurement
The value of the calculated frequency is made available in the unit Hz*10-3. The measured
frequency value can be read in the feedback interface (byte 0 to 3).

8SGDWHWLPH 8SGDWHWLPH

&RXQWSXOVHV

,QWHUQDOJDWH

6WDUWRIIUHTXHQF\ (QGRI
PHDVXUHPHQW IUHTXHQF\PHDVXUHPHQW

Figure 3-25 Frequency Measurement with Gate Function

Technological Functions
186 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.7 Measurement Modes

Limit-Value Monitoring
The following value ranges are permitted for limit-value monitoring:

Encoder type Low limit fu High limit fo


5-V encoders 0 to 499,999,999 Hz*10-3 fu+1 to 500,000,000 Hz*10-3

Possible Measuring Ranges with Error Indication

Frequency f Absolute error


0.1 Hz ±0.001 Hz
1 Hz ±0.001 Hz
10 Hz ±0.003 Hz
100 Hz ±0.02 Hz
1 000 Hz ±0.18 Hz
10 000 Hz ±1.8 Hz
100 000 Hz ±18 Hz
500 000 Hz ±90 Hz

Function of the Digital Input


For the "Function DI" parameter, select one of the following functions for the digital input:
● Input
● HW gate

Function of the Digital Output DO1


For the "Function DO1" parameter, select one of the following functions for the DO1 digital
output:
● Output (no switching by the limit-value monitoring)
● Measured value outside the limits
● Measured value under the low limit
● Measured value over the high limit

Function of the Digital Output DO2


● Output

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 187
1Count5V/500kHz
3.7 Measurement Modes

Changing Values during Operation


The following values can be changed during operation:
● Low limit (LOAD_PREPARE)
● High limit (LOAD_VAL)
● Function of the Digital Output DO1 (C_DOPARAM)
● Integration time/update time (C_INTTIME)

See also
Gate Functions in Measurement Modes (Page 199)
Behavior of the Outputs in Measurement Modes (Page 200)
Assignment of the Feedback and Control Interfaces for the Measurement Modes (Page 202)

Technological Functions
188 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.7 Measurement Modes

3.7.5 Rotational Speed Measurement

Definition
In rotational speed measurement mode, the 1Count5V/500kHz counts the pulses that arrive
from a tachometer generator within a set integration time and calculates the speed of the
connected motor.

Integration time
You preset the integration time with the Integration Time parameter.

Table 3-12 Calculation of the Integration Time

Boundary conditions Integration time Range of n


nmin nmax
Non-isochrone mode Any TDP n x 10 ms 1 1000
Isochrone mode TDP < 10 ms n x TDP (10 ms/TDP [ms]) +1 1 1000
TDP ≥ 10 ms n x TDP 1 1000 ms/TDP [ms] 1
1 Any digits after the decimal point that come about after dividing by TDP are omitted.
These limits must not be violated. If these limits are violated, the 1Count5V/500kHz generates a parameter assignment
error and will not go into isochrone mode.

Rotational Speed Measurement


For rotational speed measurement mode, you also have to assign the pulses per encoder or
motor revolution.
The rotational speed is returned in the unit 1x10-3 /min.

,QWHJUDWLRQWLPH ,QWHJUDWLRQWLPH

&RXQWSXOVHV

,QWHUQDO*DWH

%HJLQQLQJRIURWDWLRQDO (QGRIURWDWLRQDO
VSHHGPHDVXUHPHQW VSHHGPHDVXUHPHQW

Figure 3-26 Rotational Speed Measurement with Gate Function

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 189
1Count5V/500kHz
3.7 Measurement Modes

Limit-Value Monitoring
The following value ranges are permitted for limit-value monitoring:

Low limit nu High limit no


0 to 24 999 999 x10-3 /min nu+1 to 25 000 000 *10-3 /min

Possible Measuring Ranges with Error Indication

Table 3-13 Possible Measuring Ranges with Error Indication (Number of Pulses per Encoder
Revolution = 60)

Integration time nmin ± absolute error nmax ± absolute error


10 s 1 /min ± 0.03 /min 25 000 /min ± 4.5 /min
1s 1 /min ± 0.03 /min 25 000 /min ± 2.8 /min
0.1 s 10 /min ± 0.03 /min 25 000 /min ± 2.6 /min
0.01 s 100 /min ± 0.04 /min 25 000 /min ± 3.2 /min

Technological Functions
190 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.7 Measurement Modes

3.7.6 Continuous Rotational Speed Measurement

Definition
In rotational speed measurement mode, the 1Count5V/500kHz counts the pulses that are
received from a tachometer generator within a dynamic measuring time, and calculates the
speed from this value with the number of pulses per encoder revolution.

Update Time
The 1Count5V/500kHz updates the measured values cyclically. You preset the update time
with the Update Time parameter (see table). You can change the update time during
operation.

Table 3-14 Calculation of the Integration Time

Boundary conditions Update time Range of n


nmin nmax
Non-isochrone mode Any TDP n x 10 ms 1 1000
Isochrone mode TDP < 10 ms n x TDP (10 ms/TDP [ms]) +1 1 1000
TDP ≥ 10 ms n x TDP 1 ms/TDP [ms] 1
1 Any digits after the decimal point that come about after dividing by TDP are omitted.
These limits must not be violated. If these limits are violated, the 1Count5V/500kHz generates a parameter assignment
error and will not go into isochrone mode.

Rotational Speed Measurement


For rotational speed measurement mode, you also have to assign the pulses per encoder or
motor revolution.
The rotational speed is returned in the unit 1x10-3 /min.

8SGDWHWLPH 8SGDWHWLPH

&RXQWSXOVHV

,QWHUQDOJDWH

6WDUWRIURWDWLRQDOVSHHG (QGRI
PHDVXUHPHQW URWDWLRQDOVSHHGPHDVXUHPHQW

Figure 3-27 Rotational Speed Measurement with Gate Function

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 191
1Count5V/500kHz
3.7 Measurement Modes

Limit-Value Monitoring
The following value ranges are permitted for limit-value monitoring:

Low limit nu High limit no


0 to 24 999 999 x10-3 /min nu+1 to 25 000 000 *10-3 /min

Possible Measuring Ranges with Error Indication (Number of Pulses per Encoder Revolution = 60)

Rotational speed n Absolute error


1 /min ±0.04 /min
10 /min ±0.04 /min
100 /min ±0.05 /min
1 000 /min ±0.21 /min
10 000 /min ±1.82 /min
25 000 /min ±4.5 /min

Function of the Digital Input


For the "Function DI" parameter, select one of the following functions for the digital input:
● Input
● HW gate

Function of the Digital Output DO1


For the "Function DO1" parameter, select one of the following functions for the DO1 digital
output:
● Output (no switching by the limit-value monitoring)
● Measured value outside the limits
● Measured value under the low limit
● Measured value over the high limit

Function of the Digital Output DO2


● Output

Technological Functions
192 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.7 Measurement Modes

Changing Values during Operation


The following values can be changed during operation:
● Low limit (LOAD_PREPARE)
● High limit (LOAD_VAL)
● Function of the Digital Output DO1 (C_DOPARAM)
● Integration time/update time (C_INTTIME)

See also
Gate Functions in Measurement Modes (Page 199)
Behavior of the Outputs in Measurement Modes (Page 200)
Assignment of the Feedback and Control Interfaces for the Measurement Modes (Page 202)

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 193
1Count5V/500kHz
3.7 Measurement Modes

3.7.7 Period Measurement

Definition
In period measurement mode, the 1Count5V/500kHz measures the time between two
positive edges of the counting signal by counting the pulses of an internal quartz-accurate
reference frequency (16 MHz) within a set integration time.

Integration Time
You preset the integration time with the Integration Time parameter (see the table below).

Boundary conditions Integration time Range of n


nmin nmax
Non-isochrone mode Any TDP n x 10 ms 1 12000
Isochrone mode TDP < 10 ms n x TDP 10 ms/TDP [ms] +1 1 12000
TDP ≥ 10 ms n x TDP 1 120 000 ms/TDP [ms] 1
1 Any digits after the decimal point that come about after dividing by TDP are omitted.
These limits must not be violated. If these limits are violated, the 1Count5V/500kHz generates a parameter assignment
error and will not go into isochrone mode.

Period Measurement
The value of the calculated period is given in the unit 1 µs and 1/16 µs. The measured period
can be read in the feedback interface (byte 0 to 3).

,QWHJUDWLRQWLPH ,QWHJUDWLRQWLPH
3HULRG

&RXQWSXOVHV

,QWHUQDOJDWH

6WDUWRISHULRG (QGRISHULRG
PHDVXUHPHQW PHDVXUHPHQW

Figure 3-28 Period Measurement with Gate Function

Technological Functions
194 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.7 Measurement Modes

Limit-Value Monitoring
The following value ranges are permitted for limit-value monitoring:

1 μs resolution

Low limit Tu High limit To


0 to 119 999 999 µs Tu+1 to 120 000 000 µs

1/16 µs resolution

Low limit Tu High limit To


0 to 1 919 999 999 µs Tu+1 to 1 920 000 000 µs

Possible Measuring Ranges with Error Indication

1 µs resolution

Integration time Tmin ± absolute error T ± absolute error


100 s 1 µs* (10 ± 0) 1 µs* (100 000 000 ± 10 000)
10 s 1 µs* (10 ± 0) 1 µs* (10 000 000 ± 1 000)
1s 1 µs* (10 ± 0) 1 µs* (1 000 000 ± 100)
0.1 s 1 µs* (10 ± 0) 1 µs* (100 000 ± 10)
0.01 s 1 µs* (10 ± 0) 1 µs* (10 000 ± 1)

1/16 µs resolution

Integration time Tmin ± absolute error T ± absolute error


100 s 1/16 µs* (160 ± 0) 1/16 µs* (1 600 000 000 ± 160 000)
10 s 1/16 µs* (160 ± 0) 1/16 µs* (160 000 000 ± 16 000)
1s 1/16 µs* (160 ± 0) 1/16 µs* (16 000 000 ± 1 600)
0.1 s 1/16 µs* (160 ± 0) 1/16 µs* (1 600 000 ± 160)
0.01 s 1/16 µs* (160 ± 0) 1/16 µs* (160 000 ± 16)

See also
Gate Functions in Measurement Modes (Page 199)
Behavior of the Outputs in Measurement Modes (Page 200)
Assignment of the Feedback and Control Interfaces for the Measurement Modes (Page 202)

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 195
1Count5V/500kHz
3.7 Measurement Modes

3.7.8 Continuous Period Measurement

Definition
In period measurement mode, the 1Count5V/500kHz indicates the dynamic measuring time
as a period. If the period is less than the update time, then an average is calculated for the
period.

Update Time
The 1Count5V/500kHz updates the measured values cyclically. You preset the update time
with the Update Time parameter (see table). You can change the update time during
operation.

Boundary conditions Update time Range of n


nmin nmax
Non-isochrone mode Any TDP n x 10 ms 1 12000
Isochrone mode TDP < 10 ms n x TDP 10 ms/TDP [ms] +1 1 12000
TDP ≥ 10 ms n x TDP 1 120 000 ms/TDP [ms] 1
1 Any digits after the decimal point that come about after dividing by TDP are omitted.

These limits must not be violated. If these limits are violated, the 1Count5V/500kHz generates a parameter assignment
error and will not go into isochrone mode.

Period Measurement
The value of the calculated period is given in the unit 1 µs and 1/16 µs. The measured period
can be read in the feedback interface (byte 0 to 3).

8SGDWHWLPH 8SGDWHWLPH
3HULRG

&RXQWSXOVHV

,QWHUQDOJDWH

6WDUWRISHULRGPHDVXUH (QGRISHULRGPHDVXUH
PHQW PHQW

Figure 3-29 Period Measurement with Gate Function

Technological Functions
196 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.7 Measurement Modes

Limit-Value Monitoring
The following value ranges are permitted for limit-value monitoring:

1 μs resolution

Low limit Tu High limit To


0 to 119 999 999 µs Tu+1 to 120 000 000 µs

1/16 µs resolution

Low limit Tu High limit To


0 to 1 919 999 999 µs Tu+1 to 1 920 000 000 µs

Possible Measuring Ranges with Error Indication

1 µs resolution

Period Period
Tmin ± absolute error Tmin ± absolute error
1 µs* (10 ± 0) 1 µs* (100 000 ± 10)
1 µs* (100 ± 0) 1 µs* (1 000 000 ± 100)
1 µs* (1 000 ± 0) 1 µs* (10 000 000 ± 1 002)
1 µs* (10 000 ± 1) 1 µs* (100 000 000 ± 10 020)

1/16 µs resolution

Period Period
Tmin ± absolute error Tmin ± absolute error
1/16 µs* (160 ± 1) 1/16 µs* (1 600 000 ± 160)
1/16 µs* (1 600 ± 1) 1/16 µs* (16 000 000 ± 1 600)
1/16 µs* (16 000 ± 3) 1/16 µs* (160 000 000 ± 16 000)
1/16 µs* (160 000 ± 20) 1/16 µs* (1 600 000 000 ± 160 000)

Function of the Digital Input


For the "Function DI" parameter, select one of the following functions for the digital input:
● Input
● HW gate

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 197
1Count5V/500kHz
3.7 Measurement Modes

Function of the Digital Output DO1


For the "Function DO1" parameter, select one of the following functions for the digital output:
● Output (no switching by the limit-value monitoring)
● Measured value outside the limits
● Measured value under the low limit
● Measured value over the high limit

Function of the Digital Output DO2


● Output

Changing Values during Operation


The following values can be changed during operation:
● Low limit (LOAD_PREPARE)
● High limit (LOAD_VAL)
● Function of the digital output DO1 (C_DOPARAM)
● Integration time/update time (C_INTTIME)

See also
Gate Functions in Measurement Modes (Page 199)
Behavior of the Outputs in Measurement Modes (Page 200)
Assignment of the Feedback and Control Interfaces for the Measurement Modes (Page 202)

Technological Functions
198 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.7 Measurement Modes

3.7.9 Gate Functions in Measurement Modes

Software Gate and Hardware Gate


The 1Count5V/500kHz has two gates
● A software gate (SW gate), which is controlled by the SW_GATE control bit.
The software gate can only be opened by a positive edge of the SW_GATE control bit. It
is closed when this bit is reset. Note the transfer times and run times of your control
program.
● A hardware gate (HW gate), which is controlled by means of the digital input on the
1Count5V/500kHz. You assign the hardware gate as the function of the digital input
(Function DI "HW gate"). It is opened on a positive edge at the digital input and closed on
a negative edge.

Internal gate
The internal gate is the logical AND operation of the HW gate and SW gate. Counting is only
active when the HW gate and the SW gate are open. The STS_GATE feedback bit (internal
gate status) indicates this. If a HW gate has not been assigned, the setting of the SW gate is
decisive.

Gate Control
Gate control by means of the SW gate only
The opening/closing of the SW gate starts/stops measurement.
If the SW gate is opened in isochrone mode in bus cycle "n" by setting the SW_GATE control
bit, measurement starts at time Ti in cycle "n+1".
Gate control by means of the SW gate and HW gate
The opening and closing of the SW gate with the HW gate open starts/stops measurement.
The opening and closing of the HW gate with the SW gate open starts/stops measurement.
The SW gate is opened/closed by means of the control interface with the SW_GATE bit.
The HW gate is opened/closed by means of a 24-V signal on the digital input.
In isochrone mode, when the SW gate is open, measurement starts at time Ti, immediately
after the HW gate has opened. The measurement ends at time Ti, which occurs immediately
after the HW gate has closed.
When the HW gate is open, the measurement starts at time Ti in the cycle, immediately after
the SW has opened, and ends at time Ti in the cycle, which occurs immediately after the SW
gate has closed.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 199
1Count5V/500kHz
3.7 Measurement Modes

3.7.10 Behavior of the Outputs in Measurement Modes

Introduction
The various ways of setting the behavior of the outputs are described in this section.

Behavior of the Outputs in Measurement Modes


You can assign parameters to the digital outputs of the 1Count5V/500kHz.
You can store a high and a low limit for frequency measurement, rotational speed
measurement or period measurement. If the limits are violated, digital output DO1 is
activated. These limit values can be assigned and changed with the load function.
You can change the function and the behavior of the digital outputs during operation. The
new function takes effect immediately. In isochrone mode it always takes effect at time Ti.
You can choose from the following functions:
● Output
● Measured value outside the limits (limit-value monitoring)
● Measured value under the low limit (limit-value monitoring)
● Measured value over the high limit (limit-value monitoring)

Output
If you want to switch the outputs on or off, you must enable them with the CTRL_DO1 and
CTRL_DO2 control bits.
You can switch the outputs on and off with the control bits SET_DO1 and SET_DO2.
You can query the status of the outputs with the status bits STS_DO1 and STS_DO2 in the
feedback interface.
In isochrone mode, the outputs are switched at time To.

Technological Functions
200 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.7 Measurement Modes

Limit-Value Monitoring

8)/: 2)/:


*DWHVWDUW
0HDVXUHGYDOXH
/RZ +LJK
OLPLW OLPLW

Figure 3-30 Limit-Value Monitoring

After the integration time elapses, the measured value obtained (frequency, rotational speed,
or period) is compared with the assigned limit values.
If the current measured value is under the assigned low limit (measured value < low limit), bit
STS_UFLW = 1 is set in the feedback interface.
If the current measured value is over the assigned high limit (measured value > high limit),
bit STS_OFLW = 1 is set in the feedback interface.
You must acknowledge these bits with the RES_STS control bit.
If the measured value is still outside or again outside the limits after acknowledgment, the
corresponding status bit is set again.
If you set the low limit at 0, you switch off dynamic monitoring of violation of the low limit
value.
Depending on the parameter assignment, the enabled digital output DO1 can be set by the
limit-value monitoring:

"Function DO1" parameter DO1 is set ...


Measured value outside the limits Measured value < low limit
OR
measured value > high limit
Measured value under the low limit Measured value < low limit
Measured value over the high limit Measured value > high limit
In isochrone mode, the output is switched at time Ti.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 201
1Count5V/500kHz
3.7 Measurement Modes

3.7.11 Assignment of the Feedback and Control Interfaces for the Measurement Modes

Note
The following data of the control and feedback interfaces are consistent for the
1Count5V/500kHz:
Bytes 0 to 3
Bytes 4 to 7
Bytes 8 to 11 (modified user data interface)
Use the access or addressing mode for data consistency over the entire control and
feedback interface on your master (only for configuration using the GSD file).

Assignment Tables

Table 3-15 Feedback Interface (Inputs)

Address Assignment Designation


Bytes 0 to 3 Measured value
Byte 4 Bit 7: Short circuit of the encoder supply ERR_24V
Bit 6: Short circuit / wire break / overtemperature ERR_DO
Bit 5: Parameter assignment error ERR_PARA
Bit 4: Short circuit / wire break / overtemperature ERR_DO2
Bit 3: Short circuit / wire break / encoder signal ERR_ENCODER
Bit 2: Resetting of status bits active RES_STS_A
Bit 1: Load function error ERR_LOAD
Bit 0: Load function is running STS_LOAD
Byte 5 Bit 7: Down direction status STS_C_DN
Bit 6: Up direction status STS_C_UP
Bit 5: Reserve = 0
Bit 4: DO2 status STS_DO2
Bit 3: DO1 status STS_DO1
Bit 2: Reserve = 0
Bit 1: DI status STS_DI
Bit 0: Internal gate status STS_GATE
Byte 6 Bit 7: Reserve = 0
Bit 6: Low limit of measuring range STS_UFLW
Bit 5: High limit of measuring range STS_OFLW
Bit 4: Reserve = 0
Bit 3: Measurement completed STS_CMP1
Bit 2: Reserve = 0
Bit 1: Reserve = 0
Bit 0: Reserve = 0

Technological Functions
202 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.7 Measurement Modes

Address Assignment Designation


Byte 7 Reserve = 0
Bytes 8 to 11 Count value 1
1 Modified user data interface

Table 3-16 Control Interface (Outputs)

Address Assignment
Bytes 0 to 3 Low limit or high limit
Function of DO1
Byte 0: Bit 1 Bit 0 Function DO1
0 0 Output
0 1 Measured value outside the limits
1 0 Measured value under the low limit
1 1 Measured value over the high limit
Bytes 1 to 3: Reserve = 0
Integration time/update time
Byte 0, 1: Integration time [n*10ms]
(Range 1 to 1000/12000)
Byte 2, 3: Reserve = 0
Byte 4 Bit 7: Error diagnostics acknowledgement EXTF_ACK
Bit 6: Enable DO2 CTRL_DO2
Bit 5: Control bit DO2 SET_DO2
Bit 4: Enable DO1 CTRL_DO1
Bit 3: Control bit DO1 SET_DO1
Bit 2: Start resetting of status bit RES_STS
Bit 1: Reserve = 0
Bit 0: SW gate control bit SW_GATE
Byte 5 Bit 7: Reserve = 0
Bit 6: Reserve = 0
Bit 5: Reserve = 0
Bit 4: Change function of DO1, C_DOPARAM
Bit 3: Reserve = 0
Bit 2: Change integration time, C_INTTIME
Bit 1: Load high limit LOAD_PREPARE
Bit 0: Load low limit LOAD_VAL
Bytes 6 to 7 Reserve = 01
1 Not used for modified user interface

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 203
1Count5V/500kHz
3.7 Measurement Modes

Notes on the Control Bits

Table 3-17 Notes on the Control Bits

Control bits Notes


C_DOPARAM Change function of DO1 (see figure below)
The value from byte 0 is adopted as the new function of DO1.
C_INTTIME Change integration time (see figure below)
The value from bytes 0 and 1 is adopted as the new integration time for the next measurement.
CTRL_DO1 Enable DO1
You use this bit to enable the DO1 output.
CTRL_DO2 Enable DO2
You use this bit to enable the DO2 output.
EXTF_ACK Error acknowledgment
The error bits must be acknowledged with the EXTF_ACK control bit after the cause is removed. (see
figure below)
LOAD_PREPARE Load high limit (see figure below)
The value from bytes 0 to 3 is adopted as the new high limit.
LOAD_VAL Load low limit (see figure below)
The value from bytes 0 to 3 is adopted as the new low limit.
RES_STS Start resetting of status bit
The status bits are reset by means of the acknowledgment process between the RES_STS bit and
the RES_STS_A bit. (see figure below)
SET_DO1 Control bit DO1
Switches the DO1 digital output on and off when CTRL_DO1 is set.
SET_DO2 Control bit DO2
Switches the DO2 digital output on and off when CTRL_DO2 is set.
SW_GATE SW gate control bit
The SW gate is opened/closed via the control interface with the SW_GATE bit.

Technological Functions
204 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.7 Measurement Modes

Notes on the Feedback Bits

Table 3-18 Notes on the Feedback Bits

Feedback bits Notes


ERR_24V Short circuit of the encoder supply
The error bit must be acknowledged by the EXTF_ACK control bit (see figure below)
Diagnostic message if assigned.
ERR_DO1 Short circuit/wire break/overtemperature at output DO1
The error bit must be acknowledged by the EXTF_ACK control bit (see figure below)
Diagnostic message if assigned.
ERR_DO2 Short circuit/wire break/overtemperature at output DO2
The error bit must be acknowledged by the EXTF_ACK control bit (see figure below)
Diagnostic message if assigned.
ERR_ENCODER Short circuit / wire break / encoder signal
The error bit must be acknowledged by the EXTF_ACK control bit (see figure below)
Diagnostic message if assigned.
ERR_LOAD Load function error (see figure below)
The LOAD_VAL, LOAD_PREPARE, C_DOPARAM, and C_INTTIME bits cannot be set
simultaneously during transfer. This results in setting the ERR_LOAD status bit, similar to loading an
incorrect value (which is not accepted).
ERR_PARA Parameter assignment error ERR_PARA
RES_STS_A Resetting of the status bits active (see figure below)
STS_C_DN Down direction status
STS_C_UP Up direction status
STS_CMP1 Measurement completed
After every elapsed time interval (update time/integration time), the measured value is updated
Measurement with integration time
The end of a measurement (after the interval has elapsed) is indicated with the STS_CMP1 status
bit.
Continuous measurement
At the end of the update time, the end of the measurement is signaled with status bit STS_CMP1 if a
measured value is output. The bit remains 0 if an estimated measured value is output.
This bit is reset by the RES_STS control bit in the control interface.
STS_DI DI status
The status of the DI is indicated in all modes with the STS_DI bit in the feedback interface.
STS_DO1 DO1 status
STS_DO2 DO2 status
STS_GATE Internal gate status: Measuring
STS_LOAD Load function running (see figure below)
STS_OFLW High measuring limit violated
STS_UFLW Low measuring limit violated
Both bits must be reset.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 205
1Count5V/500kHz
3.7 Measurement Modes

Access to the Control and Feedback Interface in STEP 7 Programming

Table 3-19 Access to the Control and Feedback Interface in STEP 7 Programming

Configuring with STEP 7 Configuring with STEP 7


using the GSD file 1) using HW Config
(Hardware catalog\PROFIBUS-DP\Additional (Hardware catalog\PROFIBUS-DP\
FIELD DEVICES\I/O\ET 200S) ET 200S)
Feedback interface Read with SFC 14 "DPRD_DAT" Load command (e.g. L PID)
Control interface Write with SFC 15 "DPWR_DAT" Transfer command (e.g. T PQD)
1 Load and transfer commands are also possible with CPU 3xxC, CPU 3xx with MMC, and CPU 4xx (V3.0 and later).

Resetting of the Status Bits


STS_CMP1, STS_OFLW, STS_UFLW

(YHQWVWLOOSHQGLQJDWUHVHW

)HHGEDFNVLJQDOV
2QHRIWKHVWDWXVELWV

&RQWUROELW
5(6B676

)HHGEDFNELW
5(6B676B$
W

5HVHWH[HFXWHG

5HPRYDORIWKHUHTXHVW

7KH&RXQW9N+]H[HFXWHVUHVHWWLQJ

5HTXHVWUHVHW

Figure 3-31 Resetting of the Status Bits

Technological Functions
206 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.7 Measurement Modes

Acceptance of Values with the Load Function

(UURUELW
(55B/2$'
&RQWUROELW W
/2$'B9$/
/2$'B35(3$5(
&B'23$5$0
&B,177,0(
W

)HHGEDFNELW
676B/2$'
W

9DOXHDFFHSWHG(QGRIWUDQVIHU

5HPRYHUHTXHVWDQGNHHSYDOXHDYDLODEOH

7KH&RXQW9N+]KDVXQGHUVWRRGWKHUHTXHVW

5HTXHVWYDOXHWUDQVIHUDQGPDNHYDOXHDYDLODEOH

Figure 3-32 Acceptance of Values with the Load Function

Note
Only one of the following control bits can be set at a particular time:
LOAD_VAL or LOAD_PREPARE or C_DOPARAM or C_INTTIME.
Otherwise, the ERR_LOAD error is reported until all the specified control bits are deleted
again.
The ERR_LOAD error bit is only deleted when a correct value is transferred as follows.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 207
1Count5V/500kHz
3.7 Measurement Modes

Acknowledgment Principle in Isochrone Mode


In isochrone mode, exactly 4 bus cycles are always required to reset the status bits and to
accept values during the load function.

VW'3F\FOH QG'3F\FOH UG'3F\FOH WK'3F\FOH

&RQWUROELW
LQXVHU
SURJUDP

6WDWXVELW
RIPRGXOH

7L 7L 7L 7L 7L

7'3 7'3 7'3 7'3 7'3

Figure 3-33 Acknowledgment Principle in Isochrone Mode

Error Detection
The diagnostic errors must be acknowledged. They have been detected by the
1Count5V/500kHz and are indicated at the feedback interface. A channel-specific diagnosis
is carried out if you have enabled group diagnostics in your parameter assignment (see the
ET 200S Distributed I/O System Manual).
The parameter assignment error bit is acknowledged by means of correct parameter
assignment.

$QHUURUKDVRFFXUUHGWKH&RXQW9N+]VHWVDQHUURU
ELWDGLDJQRVWLFPHVVDJHPD\DSSHDUHUURUGHWHFWLRQ
FRQWLQXHV

(UURUHOLPLQDWHGZKHQ(;7)B$&.LVVHWE\WKHXVHU
SURJUDPWKH&RXQW9N+]GHOHWHVWKHHUURUELWD
GLDJQRVWLFPHVVDJHPD\DSSHDU

HJHUURUELW
(55B9

(UURUDFNQRZOHGJ
(;7)B$&.

Figure 3-34 Error Acknowledgment

In the case of continuous error acknowledgment (EXTF_ACK=1) or at CPU/Master Stop, the


1Count5V/500kHz signals errors as soon as they are detected and deletes them as soon as
they have been eliminated.

Technological Functions
208 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.7 Measurement Modes

3.7.12 Parameter Assignment for Measurement Modes

Introduction
You can use either of the following to assign parameters for the 1Count5V/500kHz:
● A GSD file (http://www.ad.siemens.de/csi/gsd)
● STEP 7 V5.3 SP2 or later

Parameter List for Measuring Modes

Table 3-20 Parameter List for Measuring Modes

Parameter Value Range Default


Enable
Group diagnostics Disable/enable Disable
Behavior in the event of the parent controller failing
Behavior at CPU/Master-STOP Turn off DO/ Turn off DO
Continue working mode/
DO substitute a value/
DO keep last value
Diagnostics A and B Off/on Off
Direction input B Normal/Inverted Normal
Output parameters
Diagnostics DO11 Off/on Off
Diagnostics DO21 Off/on Off
Function DO1 Output/ Output
Outside the limits/
Under the low limit/
Over the high limit
Substitute value DO1 0/1 0
Substitute value DO2 0/1 0
Mode
Measuring mode Frequency measurement/ Frequency measurement
Rotational speed measurement/
Period measurement
Measuring method With integration time/continuous With integration time/
Resolution of period 1 µs 1 µs
1/16 µs
Function DI Input/HW gate Input
Input signal HW gate Normal/Inverted Normal
Low limit Frequency measurement:
0 to fmax-1 0
Rotational speed measurement:
0 to nmax-1 0
Period measurement:
0 to Tmax-1 0

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 209
1Count5V/500kHz
3.7 Measurement Modes

Parameter Value Range Default


High limit Frequency measurement:
Low limit+1 to fmax fmax
Rotational speed measurement:
Low limit+1 to nmax nmax
Period measurement:
Low limit+1 to Tmax Tmax
Integration time [n*10ms] Frequency measurement:
1...1000 10
Rotational speed measurement:
1...1000 10
Period measurement:
1... 12000 10
Encoder pulses per revolution2 1...65535 1
1 DO1/DO2 diagnostics (wire break, short circuit) are possible only with pulse lengths of >90 ms on digital output
DO1/DO2.
2 Only relevant in rotational speed measurement mode

Parameter Assignment Error


The following parameter assignment errors may occur:
● Incorrect mode
● Low limit incorrect
● High limit incorrect
● Integration time incorrect
● Encoder pulses incorrect

What to Do in the Event of Errors


Check the set value ranges.

Technological Functions
210 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.8 Fast mode

3.8 Fast mode

3.8.1 Overview

Introduction
This mode is suitable for position detection is especially short isochronous cycles.
This mode represents a subset of the functionality of the continuous counting mode.
It is intended for isochronous mode and differs from continuous counting by having a lower
TDP Modulemin and a TWA equal to zero. The module is operated in this mode as a pure
input module, i.e., there is no control interface in this operating mode.
This mode is available starting with FW Version V2.0 of the module. The module must be
configured as "1Count5V Fast Mode V2.0" in HW Config.

Maximum Count Range


A total of 25 bits are available for the count value.

Load value
You can specify a load value for the 1Count5V.
This load value is applied directly as the start value.

Gate Control
To control the 1Count5V, you can use the HW gate.

State according to Parameter Assignment


Count value corresponds to the load value set in HW Config.

Isochronous Mode
In each cycle, the 1Count5V transfers the count and the status bits that were valid at time Ti.

See also
Assigning parameters for fast mode (Page 217)

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 211
1Count5V/500kHz
3.8 Fast mode

3.8.2 Fast mode

Definition
In this mode, the 1Count5V counts continuously starting from the start value:
When counting up, if the 1Count5V reaches the maximum value that can be represented
with 25 bits (all bits of the counter are set) and another count pulse arrives, the count value
jumps to "0" and resumes counting from there without losing a pulse.
When counting down, if the 1Count5V reaches the value "0" and another count pulse arrives,
the count value jumps to the maximum value that can be represented with 25 bits (all bits of
the counter are set) and resumes counting without losing a pulse.

Function of the Digital Input


For the "Function DI" parameter, select between the following functions:
Digital input off.
● Input
● HW gate
● Synchronization on positive edge
● HW enable for synchronization

See also
Assigning parameters for fast mode (Page 217)
Synchronization (Page 213)
Gate function in the case of fast mode (Page 212)

3.8.3 Gate function in the case of fast mode

Hardware Gate
The 1Count5V has a HW gate, which can be controlled via the digital input on the 1Count5V.
You assign the hardware gate as the function of the digital input (Function DI "HW Gate"). It
is opened on a positive edge at the digital input and closed on a negative edge.
If no HW gate is assigned, counting becomes active immediately.
The STS_GATE checkback signal indicates whether counting is active.
When the HW gate is opened, this causes counting to continue starting from the current
count.

See also
Synchronization (Page 213)

Technological Functions
212 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.8 Fast mode

3.8.4 Synchronization

Introduction
In order to use this function, you must first select it with the "Synchronize on Positive Edge"
Function DI parameter.

,QWHUQDOFRXQWSXOVHV
XSRUGRZQ

'LJLWDO,QSXW
]HURPDUN

&RXQWYDOXH
6WDUWYDOXH

If you have assigned synchronization, the positive edge of a reference signal on the input
sets the 1Count5V to the start value.
The following conditions apply:
● Fast mode must be active (HW gate).
– When synchronization is activated, the first edge and each additional edge loads the
1Count5V with the start value.
● The signal of a bounce-free switch or the zero mark of a rotary encoder can serve as the
reference signal.
● The STS_DI feedback bit indicates the level of the reference signal.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 213
1Count5V/500kHz
3.8 Fast mode

Synchronization with DI and Zero Mark


In order to use this function, you must first select it with the "HW enable for synchronization"
Function DI parameter.

,QWHUQDOFRXQWSXOVHV
XSRUGRZQ

'LJLWDOLQSXW',

=HURPDUN

&RXQWYDOXH
6WDUWYDOXH

If you have assigned synchronization with DI and zero mark, the DI serves as the HW
enable. When the HW enable is active, the 1Count5V is loaded with the load value by the
zero mark of the encoder.

Technological Functions
214 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.8 Fast mode

3.8.5 Assignment of feedback interface for fast mode

Note
For the 1Count5V, the following data of the feedback interface are consistent:
• Bytes 0 to 3
Use the access or addressing mode for data consistency over the entire control and
feedback interface on your master (only for configuration using the GSD file).

Assignment Tables

Address Assignment Name


Bytes 0 to 3 Bit 31 Sign of life LZ
Bit 30 Isochronous mode applied STS_TIC
Bit 29 Parameter Assignment Error ERR_PARA
Bit 28 Group error EXTF
• Encoder supply short circuit
• Short circuit / wire break / encoder signal
Bit 27 DI status STS_DI
Bit 26 Status of direction up/down STS_DIR
Bit 25 Status of (internal) gate STS_GATE
Bits 0 to 24 Count value

Notes on the Feedback Bits

Feedback bit Notes


LZ The sign of life is toggled on each update of the feedback interface, i.e. the last sent value is inverted.
STS_TIC Isochronous mode (if assigned) was applied.
ERR_PARA The assigned module parameters are faulty.
EXTF Group error
Possible causes:
• Encoder supply short circuit
• Short circuit or encoder signal wire break
EXTF is reset when the causes of the errors are eliminated.
STS_DI The bit displays the status of the digital input DI.
STS_DIR Status of direction;
for encoder value change from larger to smaller encoder positions (including zero crossover) → "1 "
for encoder value change from larger to smaller encoder positions (including zero crossover) → "0 "
STS_GATE Status of (internal) gate: Counting

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 215
1Count5V/500kHz
3.8 Fast mode

Access to the Feedback Interface in STEP 7 Programming

Configuring with STEP 7 using HW Config


Feedback interface Load command, e.g. L PID

Error Detection in Fast Mode


The encoder supply short circuit and short circuit/encoder signal wire break errors are
detected by the 1Count5V and indicated in the feedback interface (EXTF).
The fault indication in the feedback interface is extinguished as soon as this error is no
longer detected by the 1Count5V.
The parameter error bit is acknowledged by means of a correct parameter assignment.

Technological Functions
216 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.8 Fast mode

3.8.6 Assigning parameters for fast mode

Introduction
You use the following to assign parameters for the 1Count5V:
● STEP 7 Version 5.4 or higher; if necessary, the HSP (hardware support package) must
be downloaded from the Internet

Parameter List for Fast Mode

Parameter Value Range Default


Behavior in the event of higher-level controller failure
Behavior at CPU/Master STOP Stop operating mode Stop operating mode
Continue operating mode
Basic parameters
Diagnostics A and B Off/on Off
Diagnostics N Off/on Off
Signal evaluation A, B Rotary encoder Rotary encoder single
single/double/quadruple
Direction input B Normal/inverted Normal
Mode
Fast mode Fast mode Fast mode
Gate function Cancel counting/ Cancel counting
Interrupt counting
Input signal HW gate Normal/inverted Normal
Function DI Input / Input
HW gate/
Synchronization on positive edge/
HW enable for synchronization
Load value -16777216 ... +16777215 0

Parameter Assignment Error


● The "Input signal HW gate" parameter is set to inverted and the "Function DI" parameter
is not set to HW gate.

What to Do in the Event of Errors


Check the set value ranges.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 217
1Count5V/500kHz
3.9 Position feedback

3.9 Position feedback

3.9.1 Overview

Description
This mode encompasses a subset of the functionality of the continuous counting mode. It is
intended for isochrone mode and differs from continuous counting by a smaller TDP
Modulemin and a TWA equal to zero. This TWA equal to zero makes it possible to operate the
module as an input module only. In this case, however, the possible controls are no longer
synchronized with To but rather are executed in the TDP cycle before or after Ti.
To execute this mode, you must assign parameters to the 1Count5V/500kHz.

Maximum Count Range


The high counting limit is +2147483647 (231 – 1).
The low counting limit is –2147483648 (–231).

Load value
You can specify a load value for the 1Count5V/500kHz.
This load value is either applied directly as the new count value (LOAD_VAL) or it is applied
as the new count value when the following events occur (LOAD_PREPARE):
● The counting operation is started by a SW gate or HW gate (if the counting operation is
continued, the load value is not applied).
● Synchronization
● Latch and retrigger

Gate Control
To control the 1Count5V/500kHz, you have to use the gate functions.

RESET States of the Following Values after Parameter Assignment

Table 3-21 RESET States

Value RESET state


Load value 0
Count value 0
Latch value 0

Technological Functions
218 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.9 Position feedback

Isochrone mode
In isochrone mode, the 1Count5V/500kHz accepts control bits and control values from the
control interface in each bus cycle and reports back the response in this mode in the same
cycle or in the next cycle.
In each cycle, the 1Count5V/500kHz transfers the count or latch value that was valid at time
Ti and the status bits valid at time Ti.
A count controlled by hardware input signals can only be transferred in the same cycle if the
input signal occurred before time Ti.

See also
Assigning Parameters for Position Feedback (Page 235)

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 219
1Count5V/500kHz
3.9 Position feedback

3.9.2 Position detection

Definition
In this mode, the 1Count5V/500kHz counts continuously starting from the load value:
● If the 1Count5V/500kHz reaches the high counting limit when counting up, and another
count pulse then comes, it will jump to the low counting limit and continue counting from
there without losing a pulse.
● If the 1Count5V/500kHz reaches the low counting limit when counting down, and another
count pulse then comes, it will jump to the high counting limit and continue counting from
there without losing a pulse.
● The high counting limit is set at +2147483647 (231 – 1).
● The low counting limit is set to –2147483648 (–231).

&RXQWHUVWDWXV

+LJKFRXQWLQJOLPLW

/RDGYDOXH

/RZFRXQWLQJOLPLW

0HDVXUHGYDOXH *DWHVWRS 7LPH

Figure 3-35 Count Continuously with Gate Function

Function of the Digital Input


For the "Function DI" parameter, select one of the following functions for the digital input:
● Input
● HW gate
● Latch Function
● Synchronization
● HW enable for synchronization

See also
Gate Functions for Position Detection (Page 221)
Latch Function (Page 224)
Synchronization (Page 227)

Technological Functions
220 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.9 Position feedback

3.9.3 Gate Functions for Position Detection

Software Gate and Hardware Gate


The 1Count5V/500kHz has two gates
● A software gate (SW gate), which is controlled by the SW_GATE control bit.
The software gate can only be opened by a positive edge of the SW_GATE control bit. It
is closed when this bit is reset. Note the transfer times and run times of your control
program.
● A hardware gate (HW gate), which is controlled by means of the digital input on the
1Count5V/500kHz.
You assign the hardware gate as the function of the digital input (Function DI "HW Gate").
It is opened on a positive edge at the digital input and closed on a negative edge.

Internal Gate
The internal gate is the logical AND operation of the HW gate and SW gate. Counting is only
active when the HW gate and the SW gate are open. The STS_GATE feedback bit (internal
gate status) indicates this. If a HW gate has not been assigned, the setting of the SW gate is
decisive. Counting is activated, interrupted, continued, and canceled by means of the
internal gate.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 221
1Count5V/500kHz
3.9 Position feedback

Canceling- and Interrupting-Type Gate Function


When assigning the gate function, you can specify whether the internal gate is to cancel or
interrupt counting. When counting is canceled, after the gate is closed and restarted,
counting starts again from the beginning. When counting is interrupted, after the gate is
closed and restarted, counting continues from the previous value.
The diagrams below indicate how the interrupting and canceling gate functions work:

&RXQW

+LJKFRXQWLQJOLPLW

/RDGYDOXH

/RZFRXQWLQJOLPLW

*DWHVWDUW *DWHVWRS *DWHVWDUW 7LPH

Figure 3-36 Position Detection, Up, Interrupting Gate Function

&RXQWHUVWDWXV

8SSHUFRXQWOLPLW

/RDGYDOXH

/RZHUFRXQWOLPLW

0HDVXUHG *DWHVWRS 0HDVXUHG 7LPH


YDOXH YDOXH

Figure 3-37 Position Detection, Down, Interrupting Gate Function

Technological Functions
222 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.9 Position feedback

Gate Control

Gate control by means of the SW gate only


When the gate is opened, one of the following occurs, depending on the parameter
assignment:
● Counting continues from the current count, or
● Counting starts from the load value
If the SW gate is opened in isochrone mode in bus cycle "n" by setting the SW_GATE control
bit, counting starts before or after Ti, depending on the position of Ti.

Gate control by means of the SW gate and HW gate


If the SW gate opens when the HW gate is already open, counting continues starting from
the current count.
When the HW gate is opened, one of the following occurs, depending on the parameter
assignment:
● Counting continues from the current count
or
● Counting starts from the load value
If the SW gate is opened in isochrone mode in bus cycle "n" by setting the SW_GATE control
bit, counting starts in cycle "n+1" before or after Ti, if the HW gate is already open at this
time. If the HW gate opens after the SW gate has been opened, then counting does not start
until the HW gate opens.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 223
1Count5V/500kHz
3.9 Position feedback

3.9.4 Latch Function

Overview
There are two latch functions:
● The Latch and Retrigger function
● The Latch function

The Latch and Retrigger Function


In order to use this function, you must first select it with the "Latch and Retrigger on Positive
Edge" Function DI parameter.

&RXQWSXOVHV

6:B*$7(

',GLJLWDOLQSXW

&RXQWHUVWDWXV

/DWFKYDOXH

Figure 3-38 Latch and Retrigger with Load Value = 0

This function stores the current internal count of the 1Count5V/500kHz and retriggers
counting when there is a positive edge on the digital input. This means that the current
internal counter status at the time of the positive edge is stored (latch value), and the
1Count5V/500kHz is then loaded again with the load value, from which counting resumes.
The counting mode must be enabled with the SW gate before the function can be executed.
It is started with the first positive edge on the digital input.
The stored count rather than the current count is indicated in the feedback interface. The
STS_DI bit indicates the status of the latch and retrigger signal.
The latch value is preassigned with its RESET state (see corresponding table). It is not
changed when the SW gate is opened.

Technological Functions
224 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.9 Position feedback

Direct loading of the counter does not cause the indicated stored count to be changed.
If you close the SW gate, it only interrupts counting; this means that when you open the SW
gate again, counting is continued. The digital input DI remains active even when the SW
gate is closed.
Counting is also latched and triggered in isochrone mode with each edge on the digital input.
The count that was valid at the time of the last edge before Ti is displayed in the feedback
interface.

The Latch function


In order to use this function, the Function DI parameter "Latch on Positive Edge" must be
selected for the digital input.

&RXQWSXOVHV

6:B*$7(

',GLJLWDOLQSXW

&RXQWHUVWDWXV

/DWFKYDOXH

Figure 3-39 Latch with a Load Value of 0

Count and latch value are preset with their RESET states (see corresponding table).
The counting function is started when the SW gate is opened. The 1Count5V/500kHz begins
at the load value.
The latch value is always the exact count at the time of the positive edge on the digital input
DI.
The stored count rather than the current count is indicated in the feedback interface. The
STS_DI bit indicates the level of the latch signal.
Direct loading of the counter does not cause the indicated stored count to be changed.
In isochrone mode, the count that was latched at the time of the last positive edge before Ti
is displayed in the feedback interface.
When you close the SW gate, the effect is either canceling or interrupting, depending on the
parameter assignment. The digital input DI remains active even when the SW gate is closed.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 225
1Count5V/500kHz
3.9 Position feedback

Further possible causes of parameter assignment errors with the latch function:
● Incorrect parameter assignment of the digital output function (Function DI)

Expanded Feedback Interface


If the 1Count5V/500kHz is inserted behind an IM 151 that supports the reading and writing of
broader user data interfaces, the current count value can be read from bytes 8-11 of the
feedback interface.

Technological Functions
226 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.9 Position feedback

3.9.5 Synchronization

Synchronization
In order to use this function, you must first select it with the "Synchronize on Positive Edge"
Function DI parameter.

,QWHUQDOFRXQWSXOVHV
XSRUGRZQ

'LJLWDOLQSXW
]HURPDUN

6\QFKURQL]DWLRQ
RQFHRQO\
(QDEOH
&57/B6<1

&RXQWYDOXH

/RDGYDOXH

6\QFKURQL]DWLRQ
SHULRGLF

(QDEOH
&57/B6<1

&RXQWYDOXH

/RDGYDOXH

Figure 3-40 Once-Only and Periodic Synchronization

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 227
1Count5V/500kHz
3.9 Position feedback

If you have assigned synchronization, the positive edge of a reference signal on the input
sets the 1Count5V/500kHz to the load value.
You can select between once-only and periodic synchronization ("Synchronization"
parameter).
The following conditions apply:
● The counting mode must have been started with the SW gate.
● The "Enable synchronization CTRL_SYN" control bit must be set.
● In once-only synchronization, the first edge loads the1Count5V/500kHz with the load
value after the enable bit is set.
● In periodic synchronization, the first edge and each subsequent edge load the
1Count5V/500kHz with the load value after the enable bit is set.
● After successful synchronization, the STS_SYN feedback bit is set. It must be reset by
the RES_STS control bit.
● The signal of a bounce-free switch or the zero mark of a rotary encoder can serve as the
reference signal.
● The STS_DI feedback bit indicates the level of the reference signal.
In isochrone mode, the set feedback bit STS_SYN indicates that the positive edge on the
digital input was between time Ti in the current cycle and Ti in the previous cycle.

See also
Synchronization (Page 156)

Technological Functions
228 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.9 Position feedback

3.9.6 Assignment of the Feedback and Control Interface for Position Feedback

Note
The following data of the control and feedback interfaces are consistent for the
1Count5V/500kHz:
Bytes 0 to 3
Bytes 4 to 7
Bytes 8 to 11 (modified user data interface)
Use the access or addressing mode for data consistency over the entire control and
feedback interface on your master (only for configuration using the GSD file).

Assignment Tables

Table 3-22 Feedback Interface (Inputs)

Address Assignment Designation


Bytes 0 to 3 Count value or stored count value in the case of the latch function on the digital
input
Byte 4 Bit 7: Short circuit of the encoder supply ERR_24V
Bit 6: Reserve = 0
Bit 5: Parameter assignment error ERR_PARA
Bit 4: Reserve = 0
Bit 3: Reserve = 0
Bit 2: Resetting of status bits active RES_STS_A
Bit 1: Load function error ERR_LOAD
Bit 0: Load function is running STS_LOAD
Byte 5 Bit 7: Down direction status STS_C_DN
Bit 6: Up direction status STS_C_UP
Bit 5: Reserve = 0
Bit 4: Reserve = 0
Bit 3: Reserve = 0
Bit 2: Reserve = 0
Bit 1: DI status STS_DI
Bit 0: Internal gate status STS_GATE
Byte 6 Bit 7: Zero crossing STS_ND
Bit 6: Low counting limit STS_UFLW
Bit 5: High counting limit STS_OFLW
Bit 4: Reserve = 0
Bit 3: Reserve = 0
Bit 2: Reserve = 0
Bit 1: Reserve = 0
Bit 0: Synchronization status STS_SYN

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 229
1Count5V/500kHz
3.9 Position feedback

Address Assignment Designation


Byte 7 Reserve = 0
Bytes 8 to 11 Count value 1
1 Modified user data interface

Table 3-23 Control Interface (Outputs)

Address Designation Assignment


Bytes 0 to 3 Load value direct, preparatory, comparison value 1 or 2
Byte 4 EXTF_ACK Bit 7: Error diagnostics acknowledgment
Bit 6: Reserve = 0
Bit 5: Reserve = 0
Bit 4: Reserve = 0
Bit 3: Reserve = 0
RES_STS Bit 2: Start resetting of status bit
CTRL_SYN Bit 1: Enable synchronization
SW_GATE Bit 0: SW gate control bit
Byte 5 Bit 7: Reserve = 0
Bit 6: Reserve = 0
Bit 5: Reserve = 0
Bit 4: Reserve = 0
Bit 3: Reserve = 0
Bit 2: Reserve = 0
LOAD_PREPARE Bit 1: Load counter preparatory
LOAD_VAL Bit 0: Load counter direct
Bytes 6 to 7 Reserve = 0 1
1 Not used for modified user interface

Technological Functions
230 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.9 Position feedback

Notes on the Control Bits

Table 3-24 Notes on the Control Bits

Control bits Notes


CTRL_SYN You use this bit to enable synchronization.
EXTF_ACK Error acknowledgment
The error bits must be acknowledged with the EXTF_ACK control bit after the cause is removed. (see
figure below)
LOAD_PREPARE Load counter preparatory (see figure below)
The value from bytes 0 to 3 is applied as the load value.
LOAD_VAL The value from bytes 0 to 3 is loaded directly as the new count value.
RES_STS Start resetting of status bit
The status bits are reset by means of the acknowledgment process between the RES_STS bit and
the RES_STS_A bit. (see figure below)
SW_GATE SW gate control bit
The SW gate is opened/closed by means of the control interface with the SW_GATE bit.

Notes on the Feedback Bits

Table 3-25 Notes on the Feedback Bits

Feedback bits Notes


ERR_24V Short circuit of the encoder supply
The error bit must be acknowledged by the EXTF_ACK control bit (see figure below)
Diagnostic message if assigned.
ERR_LOAD Load function error (see figure below)
The LOAD_VAL, LOAD_PREPARE, CMP_VAL1, CMP_VAL2, and C_DOPARAM bits cannot be set
simultaneously during transfer. This results in setting the ERR_LOAD status bit, similar to loading an
incorrect value (which is not accepted).
ERR_PARA Parameter assignment error ERR_PARA
RES_STS_A Resetting of the status bits active (see figure below)
STS_C_DN Down direction status
STS_C_UP Up direction status
STS_DI DI status
The status of the DI is indicated in all modes with the STS_DI bit in the feedback interface.
STS_GATE Internal gate status: Counting
STS_LOAD Load function running (see figure below)
STS_ND Zero-crossing in the count range when counting without a main counting direction. The bit must be
reset by the RES_STS control bit.
STS_OFLW High counting limit violated
STS_UFLW Low counting limit violated
Both bits must be reset.
STS_SYN Synchronization status
After successful synchronization, the STS_SYN bit is set. It must be reset by the RES_STS control
bit.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 231
1Count5V/500kHz
3.9 Position feedback

Access to the Control and Feedback Interface in STEP 7 Programming

Table 3-26 Access to the Control and Feedback Interface in STEP 7 Programming

Configuring with STEP 7 Configuring with STEP 7


using the GSD file 1) using HW Config
(Hardware catalog\PROFIBUS-DP\Additional (Hardware catalog\PROFIBUS-DP\
FIELD DEVICES\I/O\ET 200S) ET 200S)
Feedback interface Read with SFC 14 "DPRD_DAT" Load command (e.g. L PID)
Control interface Write with SFC 15 "DPWR_DAT" Transfer command (e.g. T PQD)
1Load and transfer commands are also possible with CPU 3xxC, CPU 3xx with MMC, CPU 4xx (V3.0 and later), and
WinLC RTX (PC CPU).

Resetting of the Status Bits


STS_SYN, STS_OFLW, STS_UFLW, STS_ND

(YHQWVWLOOSHQGLQJDWUHVHW

)HHGEDFNVLJQDOV
2QHRIWKHVWDWXVELWV

&RQWUROELW
5(6B676

)HHGEDFNELW
5(6B676B$
W

5HVHWH[HFXWHG

5HPRYDORIWKHUHTXHVW

7KH&RXQW9N+]H[HFXWHVUHVHWWLQJ

5HTXHVWUHVHW

Figure 3-41 Resetting of the Status Bits

Technological Functions
232 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.9 Position feedback

Acceptance of Values with the Load Function

(UURUELW
(55B/2$'
&RQWUROELW W
/2$'B9$/
/2$'B35(3$5(
&B'23$5$0
&B,177,0(
W

)HHGEDFNELW
676B/2$'
W

9DOXHDFFHSWHG(QGRIWUDQVIHU

5HPRYHUHTXHVWDQGNHHSYDOXHDYDLODEOH

7KH&RXQW9N+]KDVXQGHUVWRRGWKHUHTXHVW

5HTXHVWYDOXHWUDQVIHUDQGPDNHYDOXHDYDLODEOH

Figure 3-42 Accepting Values with the Load Function (LOAD_VAL; LOAD_PREPARE;
C_DOPARAM; C_INTTIME)

Note
Only one of the following control bits can be set at a particular time:
LOAD_VAL or LOAD_PREPARE.
Otherwise, the ERR_LOAD error is reported until all the specified control bits are deleted
again.
The ERR_LOAD error bit is only deleted when the following is carried out correctly.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 233
1Count5V/500kHz
3.9 Position feedback

Acknowledgment Principle in Isochrone Mode


In isochrone mode, 4 or 6 bus cycles are required to reset the status bits and to accept
values during the load function in this mode.

VW'3F\FOH QG'3F\FOH UG'3F\FOH WK'3F\FOH

&RQWUROELW
LQXVHU
SURJUDP

6WDWXVELW
RIPRGXOH

7L 7L 7L 7L 7L

7'3 7'3 7'3 7'3 7'3

Figure 3-43 Acknowledgment Principle in Isochrone Mode

Error Detection
The program errors must be acknowledged. They have been detected by the
1Count5V/500kHz and are indicated at the feedback interface. A channel-specific diagnosis
is carried out if you have enabled group diagnostics in your parameter assignment (see the
ET 200S Distributed I/O System Manual).
The parameter assignment error bit is acknowledged by means of correct parameter
assignment.

$QHUURUKDVRFFXUUHGWKH&RXQW9N+]VHWVDQHUURU
ELWDGLDJQRVWLFPHVVDJHPD\DSSHDUHUURUGHWHFWLRQ
FRQWLQXHV

(UURUHOLPLQDWHGZKHQ(;7)B$&.LVVHWE\WKHXVHU
SURJUDPWKH&RXQW9N+]GHOHWHVWKHHUURUELWD
GLDJQRVWLFPHVVDJHPD\DSSHDU

HJHUURUELW
(55B9

(UURUDFNQRZOHGJ
(;7)B$&.

Figure 3-44 Error Acknowledgment

In the case of continuous error acknowledgment (EXTF_ACK=1) or at CPU/Master Stop, the


1Count5V/500kHz signals errors as soon as they are detected and deletes them as soon as
they have been eliminated.

Technological Functions
234 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.9 Position feedback

3.9.7 Assigning Parameters for Position Feedback

Introduction
You can use either of the following to assign parameters for the 1Count5V/500kHz:
● A GSD file (http://www.ad.siemens.de/csi/gsd)
● STEP 7 V5.3 SP2 or later

Parameter list for Position Feedback

Table 3-27 Parameter list for Position Feedback

Parameter Value Range Default


Enable
Group diagnostics Disable/enable Disable
Behavior in the event of higher-level controller failure
Behavior at CPU/Master STOP Turn off Turn off
Continue working mode
Encoder parameters
Diagnostics A and B Off/on Off
Diagnostics N Off/on Off
Signal evaluation A, B Rotary encoder single/double/quadruple Rotary encoder single
Direction input B Normal/inverted Normal
Mode
Position feedback Position detection Position detection
Gate function Cancel counting/ Cancel counting
Interrupt counting
Input signal HW gate Normal/inverted Normal
Function DI Input/ Input
HW gate/
Latch and retrigger on positive edge/
Synchronization on positive edge/
HW enable for synchronization
Synchronization1 Once only/Periodic Once-only
1 Only relevant if Function DI = Synchronization on positive edge

Parameter Assignment Error


● The "Input signal HW gate" parameter is set to inverted and the "Function DI" parameter
is not set to HW gate.

What to Do in the Event of Errors


Check the set value ranges.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 235
1Count5V/500kHz
3.10 Evaluation of count and direction signal

3.10 Evaluation of count and direction signal

Signal Evaluation A, B
Signal evaluation by means of A, B allows you to count directionally. Different evaluation
modes are possible depending on the parameter assignment:

Rotary Encoder
The 1Count5V/500kHz can count the edges of the signals. Normally, only the edges at A are
evaluated (single evaluation). To obtain a higher resolution, when assigning parameters
("Signal Evaluation" parameter), you can select whether the signals are to be subjected to
single, double, or quadruple evaluation.
Multiple evaluation is only possible with asymmetric incremental encoders with A and B
signals that are 90 degrees out of phase.

Single Evaluation
Single evaluation means that only one edge of A is evaluated; up count pulses are recorded
at a positive edge at A and low level at B, and down count pulses are recorded at a negative
edge at A and low level at B.
The diagram below illustrates the single evaluation of the signals.

6LJQDO$

6LJQDO%

8SFRXQWSXOVHV

'RZQFRXQWSXOVHV
XS GRZQ

Figure 3-45 Single Evaluation

Technological Functions
236 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.10 Evaluation of count and direction signal

Double Evaluation
Double evaluation means that the positive and negative edge of the A signal are evaluated.
Whether up or down count pulses are generated depends on the level of the B signal.
The diagram below illustrates the double evaluation of the signals.

6LJQDO$

6LJQDO%

8SFRXQWSXOVHV

'RZQFRXQWSXOVHV
XS GRZQ

Figure 3-46 Double Evaluation

Quadruple Evaluation
Quadruple evaluation means that the positive and negative edges of the A and B signals are
evaluated. Whether up or down count pulses are generated depends on the levels of the A
and B signals.
The diagram below illustrates the quadruple evaluation of the signals.

6LJQDO$

6LJQDO%

8SFRXQWSXOVHV

'RZQFRXQWSXOVHV
XS GRZQ

Figure 3-47 Quadruple Evaluation

Note
A counting frequency of 500 KHz refers to the maximum frequency of the A and B signals.
With double evaluation, a maximum frequency of 1 MHz is produced for the counting pulses;
with quadruple evaluation, the maximum frequency is 2 MHz.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 237
1Count5V/500kHz
3.11 Behavior at CPU-Master-STOP

3.11 Behavior at CPU-Master-STOP

Setting the Behavior at CPU/Master-STOP


You can program what the 1Count5V/500kHz is to do in the event of the failure of the parent
controller.

Parameters Status of the 1Count5V/500kHz at What Happens if


CPU/Master STOP New Parameters Have Been Assigned?
Turn off DO The current mode is terminated, the gate The changed parameters are accepted and
closed, and the digital output blocked; take effect.
comparison values 1 and 2 and the load
value are reset; the high and low limit
values, function and behavior of the digital
outputs and the integration time are handled
in accordance with the parameter
assignments.
Continue working mode1 The current mode continues, and the gate The gate is closed, the current mode is
and digital output retain their status. terminated, the digital output is blocked, and
the changed parameters are accepted and
take effect.
DO substitute a value The current mode is canceled, the gate The changed parameters are accepted and
closed, and the digital output blocked; take effect.
comparison values 1 and 2 and the load
value are reset; the high and low limit
values, function and behavior of the digital
outputs and the integration time are handled
in accordance with the parameter
assignments.
When a pulse is output when the
comparison value is reached, the substitute
value is 1 only for the duration of the pulse.
DO keep last value The current mode is canceled, the gate The changed parameters are accepted and
closed, and the digital output blocked; take effect.
comparison values 1 and 2 and the load
value are reset; the high and low limit
values, function and behavior of the digital
outputs and the integration time are handled
in accordance with the parameter
assignments.
1If the mode is to continue during a change from CPU-/Master-STOP to RUN (startup), the CPU/Master must not clear the

outputs.
Possible solution: In the part of the user program that is processed during startup, set the SW gate control bit and transfer
the values to the 1Count5V/500kHz.

Technological Functions
238 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.11 Behavior at CPU-Master-STOP

Leaving the Assigned State


Under what conditions does the 1Count5V/500kHz leave the assigned state?
The CPU or master must be in RUN mode, and you have to make a change at the control
interface.

Automatic New Parameter Assignment


A new parameter assignment of the ET 200S station is made by your CPU/ DP master:
● Upon power on of the CPU/DP master
● Upon power on of the IM 151/IM 151 FO
● After failure of the DP transmission
● After loading a modified parameter assignment or configuration of the ET 200S station to
the CPU/DP master
● When the 1Count5V/500kHz is inserted
● Upon power on or inserting of the appropriate power module

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 239
1Count5V/500kHz
3.12 Technical Specifications

3.12 Technical Specifications

Technical Specifications

General Technical Specifications of the 1Count5V/500kHz


Dimensions and Weight
Dimensions W x H x D (mm) 30×81×52
Weight Approx. 65 g
Data for Specific Modules
Number of Channels 1
Counter range 32 bits
Voltages, Currents, Potentials
Rated load voltage L+ 24 VDC
• Range 20-4 ... 28.8 V
• Reverse polarity protection Yes
Galvanic isolation
• Between backplane bus and counter function Yes
• Between counter function and load voltage No
Encoder supply
• Output voltage L+ (-0.8 V)
• Output current Max. 500 mA, short-circuit proof
Current consumption
• From the backplane bus 10 mA, maximum
• From load voltage L+ (no load) 45 mA, typical
Power dissipation Typ. 2 W
Data for the Digital Input
Galvanic isolation No, only from shield and backplane bus
Input voltage
• Rated value 24 VDC
• 0 signal -30 V to 5 V
• 1 signal 11 V to 30 V
Input current
• 0 signal ≤2 mA (quiescent current)
• 1 signal 9 mA (typical)
Minimum pulse width 2.5 µs
Connection of a two-wire BERO type 2 Possible
Input characteristic In accordance with IEC 1131, Part 2, Type 2
Shielded cable length 50 m, maximum

Technological Functions
240 Operating Instructions, 04/2008, A5E00124867-06
1Count5V/500kHz
3.12 Technical Specifications

General Technical Specifications of the 1Count5V/500kHz


Encoder Signals
• Level In accordance with RS 422
• Terminating resistance 330 Ω
• Differential input voltage 1 V, minimum
• Maximum counting frequency 500 kHz
• Galvanic isolation from ET200S bus Yes
• Shielded cable length 50 m, maximum
Data for the Digital Outputs
Output voltage
• Rated value 24 VDC
• 0 signal ≤ 3V
• 1 signal ≥ L+ (-1V)
Output current
• 0 signal (residual current) ≤ 0.5 mA
• 1 signal
Permitted range 5 mA to 2.4 A
Rated value 2A
Switching frequency
• Resistive load 100 Hz
• Inductive load 2 Hz
• Lamp load ≤ 10 Hz
Lamp load ≤ 10 W
Output delay (resistive load) 100 µs
Short-circuit protection for output Yes
Response threshold 2.6 A to 4 A
Inductive extinction Yes; L+ -(50 to 60 V)
Digital input control Yes
Cable lengths
• Unshielded 600 m
• Shielded 1000 m
Status, Diagnostics
Digital input DI status display LED 16 (green)
Digital output DO1 status display LED 9 (green)
Digital output DO2 status display LED 13 (green)
Up count value change UP LED (green)
Down count value change DN LED (green)
Synchronization SYN LED (green)
Fault indicator SF LED (red)
Diagnostic information Yes

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 241
1Count5V/500kHz
3.12 Technical Specifications

General Technical Specifications of the 1Count5V/500kHz


Measuring Ranges in the Measuring Modes
Maximum measuring range
• Frequency measurement 0.1 Hz to 500 kHz
• Rotational speed measurement 1/min ... 25000 /min
• Period measurement 10 µs ... 120 s
Response Times
Update rate of the counting modes
• Non-isochronous mode 1 ms
• Isochronous mode TDP
Isochronous Times of the Module
• in counting modes
TCI 380 µs
TCO 320 µs
ToiMin 55 µs
TDPMin 900 µs
• in measuring modes
TCI 465 µs
TCO 280 µs
ToiMin 50 µs
TDPMin 995 µs
• in position feedback
TCI 370 µs
TCO -
ToiMin -
TDPMin 815 µs

Technological Functions
242 Operating Instructions, 04/2008, A5E00124867-06
1SSI 4
4.1 Product Overview

Order Number
6ES7 138-4DB03-0AB0

Compatibility
The 1SSI with order number 6ES7 138-DB03-0AB0 replaces the 1SSI with the following
order numbers:
● 6ES7 138-4DB02-0AB0
● 6ES7 138-4DB01-0AB0
● 6ES7 138-4DB00-0AB0
and is fully compatible.

Features
● The 1SSI is an interface between an absolute encoder (SSI) and the parent controller.
You edit the cyclically recorded encoder value in your controller program.
● Can be operated using terminal modules TM-E15S24-01 and TM-E15S26-A1
● Isochronous mode
● Normalization of the encoder value (that is, discounting of adjusted, irrelevant bits in the
encoder value).
● Reversal of the direction of rotation to adjust the direction of movement of the absolute
encoder to the axis.
● Latch function for freezing the current encoder value (only possible in standard mode).
● Comparison function between the current encoder value and loadable comparison values
(only possible in standard mode).
● Type of encoder value recording can be selected:
– Free-wheeling
– Synchronous to the update rate
– Isochronously

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 243
1SSI
4.1 Product Overview

● Fast mode can be selected; with rapid encoder value detection and compressed
functionality (cannot be used with the IM 151 with the order number 6ES7 151-1AA00-
0AB0).
● Maximum encoder sampling rate (e.g., for ultrasonic encoders) is taken into account in
isochronous mode
● Sign of life in isochronous mode
● Parity check of encoder value can be performed
● Gray/dual converter

Supported Encoder Types


The following encoder types are supported:
● Absolute encoder (SSI) with 13 bits
To
● Absolute encoder (SSI) with 25 bits

Note
Notice!
(Bit width restrictions exist for the predecessor modules of the 6ES7138-4DB03-0AB0
and when using the HSP2022 V1.0.)

Firmware Update 1
To add functions and for troubleshooting, it is possible to load firmware updates to the
operating system memory of the 1SSI using STEP 7 HW Config.

Note
Notice!
When you start the firmware update, the old firmware is deleted. If the firmware update is
interrupted or canceled for any reason, the 1SSI will no longer function correctly as a result.
Re-launch the firmware update and wait until this has completed successfully. See also
ET 200S Distributed I/O System Manual, section: Identification Data.

Technological Functions
244 Operating Instructions, 04/2008, A5E00124867-06
1SSI
4.1 Product Overview

Identification Data 1
● Hardware release status
● Firmware release status
● Serial number
See also ET 200S Distributed I/O System Manual, section: Identification Data.
1This function is only possible if the header module in use supports the necessary system
services.

Configuration
You can use either of the following to configure the 1SSI:
● A GSD file (http://www.ad.siemens.de/csi/gsd)
● STEP 7 V5.4 SP2 and later, or with the HSP hardware support package (available online)
STEP 7 V5.3 SP2 and later.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 245
1SSI
4.2 Clocked Mode

4.2 Clocked Mode

Note
The principles of isochronous mode are described in a separate manual.
See Isochrone Mode function manual (A5E00223279).

Hardware Requirements
You will require the following for the 1SS in isochronous mode:
● A CPU that supports isochronous mode
● A master or Profinet master that supports the equidistant bus cycle
● An IM 151 that supports isochronous mode

Features
Depending on the system parameter assignment, the 1SSI works in either non-isochronous
or isochronous mode.
In isochronous mode, the data exchange between the master and 1SSI is isochronous to the
bus cycle.
In isochronous mode, all bytes of the feedback interface are consistent.
If isochronous mode fails, the feedback interface is not updated. In the user program, this
can be detected with the sign of life in the feedback interface.

Technological Functions
246 Operating Instructions, 04/2008, A5E00124867-06
1SSI
4.3 Example: Starting 1SSI

4.3 Example: Starting 1SSI

Introduction
These instructions provide an example to guide you to a functioning application that will
enable you to become familiar with and check the basic hardware and software functions of
the 1SSI. For this example, you will operate the 1SSI in standard mode, rather than
isochrone mode.

Requirements
The following requirements must be satisfied:
● You have commissioned an ET 200S station on an S7 station with a master.
● You must have the following:
– A TM-E15S24-01 terminal module
– An 1SSI
– An SSI encoder and the necessary wiring material

Installation, Wiring and Fitting


1. Install and wire the TM-E15S24-01 terminal module (see Figure).
2. Connect the 1SSI to the terminal module (you will find detailed instructions in the
ET 200S Distributed I/O System Manual).

66, 70(6DQG(066,
6)

83 '1

&03 
(6
'%$%

' 7ZLVWHGSDLUUFDEOHV
'   ' '
9'&
9'&   9'&
66,
0
0   ',

&   & &


& 7ZLVWHGSDLUUFDEOHV

Figure 4-1 Terminal Assignment for the Example

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 247
1SSI
4.3 Example: Starting 1SSI

Configuring with STEP 7 using HW Config


You must first adapt the hardware configuration of your existing ET 200S station.
1. Open the relevant project in SIMATIC Manager.
2. Open the HW Config configuration table in your project.
3. From the hardware catalog, select the 1SSI entry with the number
6ES7138-4DB03-0AB0 in the infotext. Drag the entry to the slot at which you have
installed your 1SSI.
4. Double-click this number to open the DP Slave Properties dialog box.
On the Addresses tab, you will find the addresses of the slot to which you have dragged
the 1SSI. Make a note of these addresses for subsequent programming.
On the Parameters tab, you will find the default settings for the 1SSI. Select the encoder
type in accordance with the connected SSI encoder and enter all the required data. You
will find the encoder data on the type label and in the technical specifications of the
encoder.
5. Save and compile your configuration, and download the configuration in STOP mode of
the CPU by choosing "PLC > Download to Module".

Technological Functions
248 Operating Instructions, 04/2008, A5E00124867-06
1SSI
4.3 Example: Starting 1SSI

Creating a Block and Integrating It into the Controller Program


Create block FC101 and integrate it in your control program (in OB1, for example). This
block requires the data block DB1 with a length of 16 bytes. The start address of the module
in the following example is 256.

STL Description
Block: FC101

Network 1: Presettings
L 0 //Delete control bits
T DB1.DBD0
T DB1.DBD4

Network 2: Write to the control interface

L DB1.DBD0 //Write 8 bytes to the 1SSI


T PAD 256 //Configured start address of the outputs
L DB1.DBD4
T PAD 260

Network 3: Read from the feedback interface


//Read 8 bytes from the 1SSI
L PED 256 //Configured start address of the inputs
T DB1.DBD8
L PED 260
T DB1.DBD12

Testing
Use Monitor/Modify Variables to monitor the encoder value and the direction indicator.
1. Select the "Block" folder in your project. Choose the "Insert > S7 Block > Variable Table"
menu command to insert the VAT 1 variable table, and then confirm with OK.
2. Open the VAT 1 variable table, and enter the following variables in the "Address" column:
DB1.DBD8 (encoder value)
DB1.DBX12.0 (UP status)
DB1.DBX12.1 (DN status)
3. Choose "PLC > Connect To > Configured CPU" to switch to online.
4. Choose "Variable > Monitor" to switch to monitoring.
5. Switch the CPU to RUN mode.
6. Change the position of the SSI encoder.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 249
1SSI
4.3 Example: Starting 1SSI

Result
You can now see that:
● The UP LED or the DN LED on the 1SSI is on, depending on the direction in which you
change the position of the SSI encoder.
● The encoder value in the block changes.

Technological Functions
250 Operating Instructions, 04/2008, A5E00124867-06
1SSI
4.4 Terminal Assignment Diagram

4.4 Terminal Assignment Diagram

Wiring Rules
The cables (terminals 1 and 5 and terminals 4 and 8) must be shielded, twisted-pair cables.
The shield must be supported at both ends. To do this use the shield connection (see the
ET 200S Distributed I/O System Manual).

Terminal Assignment
You will find the terminal assignment for the 1SSI in the table below.

Table 4-1 Terminal Assignment of the 1SSI

View Terminal Assignment Remarks


Terminals 1 to 8:
1/5: Data from the SSI encoder 1
2/6: Power supply for absolute encoder
70(6DQG(066,
and switch 2
83 '1

&03 
(6
'%$%
3: Chassis ground
2QHSDLUWZLVWHG
' 7: Digital input latch function
' SDLUFDEOHV
'   ' 4/8: SSI clock (clock wire) 1
9'&
9'&   9'&
66,
0
0   ',

&   & & 2QHSDLUWZLVWHG


& SDLUFDEOHV

83 '1 70(6$DQG(066,
&03 
(6
'%$%
2QHSDLUWZLVWHG
'
' SDLUFDEOHV
'   '

9'&
9'&   9'&
66,
0
0   ',


&  & 2QHSDLUWZLVWHG
&
$ $ &
SDLUFDEOHV
$8;   $8;
$ $
$8;   $8;
1 It is essential that you maintain the correct polarity when wiring the encoder. If you do not, an absolute encoder error is
reported. Signals according to RS422
2Short circuit-proof, maximum 0.5 A.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 251
1SSI
4.5 Configuring standard mode and fast mode

4.5 Configuring standard mode and fast mode

Introduction
In order to take full advantage of the functionality of the 1SSI for the application in question,
choose between fast mode and standard mode, depending on your automation task.

Areas of Application Mode


• Closed-loop control applications such as position controls with path position as Fast
actual value
• Fast encoder value detection
• Monitoring or detecting of position points Standard
• Length measurement, edge detection, synchronization with workpieces

Configuring Standard Mode and Fast Mode

Standard Mode Fast Mode


Parameters are assigned to the various modes. You will find the parameter lists in the descriptions of
the modes.
You can integrate the 1SSI in your project in two different ways. Decide whether you want to work
with the GSD file or with STEP 7 using HW Config.

Configuring 1SSI with STEP 7 using HW Config


(in isochrone and non-isochrone mode)
Select an entry from the hardware catalog that corresponds
to the functionality you want.
For standard mode, select the 1SSI entry with the For fast mode, select the 1SSI fast mode entry
number with the number
6ES7 138-4DB03-0AB0 in the infotext. 6ES7 138-4DB03-0AB0 Fast in the infotext.
Drag the entry to the slot at which you have installed your 1SSI.
Select the parameters.

Configuring 1SSI with the GSD file


(only in non-isochrone mode)
Select an entry in the GSD file that corresponds to the functionality
you want.
Select 6ES7 138-4DB03-0AB0 1SSI for standard Select 6ES7 138-4DB03-0AB0 1SSI Fast
mode. for fast mode.
Select the parameters.

Technological Functions
252 Operating Instructions, 04/2008, A5E00124867-06
1SSI
4.6 Functions of the 1SSI

4.6 Functions of the 1SSI

4.6.1 Overview of 1SSI functions

Operating Principle
The 1SSI records the signals of the connected position encoder cyclically and forwards
them, depending on the parameter assignment, to the feedback interface by means of the
following functions:
● Encoder value detection
● Gray/binary converter
● Normalization
● Direction reversal
● Comparator (only in standard mode)
● Latch function (only in standard mode)
● Error detection
● Sign of life
The 1SSI uses the "ready for operation" feedback bit to indicate that the functions are
executable and the displayed encoder value is valid.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 253
1SSI
4.6 Functions of the 1SSI

4.6.2 Encoder Value Detection

Description
The absolute encoder transfers its encoder values in message frames to the 1SSI. The
transmission of message frames is initiated by the 1SSI. The following alternatives are
available for encoder value detection:
● Free-wheeling encoder value detection
● Synchronous encoder value detection
● Isochronous encoder value detection
You can set free-wheeling or synchronous encoder value detection in HW Config with the
"Detection" parameter. This parameter only works in non-isochrone mode.
The detection of the encoder value will be isochronous when the 1SSI is in isochronous
mode. In this case, the "Detection" parameter is not evaluated.
The following table shows these connections:

Table 4-2 Encoder Value Detection

Mode "Detection" Parameter Encoder value detection


Non-isochrone mode Free-wheeling Free-wheeling encoder value detection
Synchronous Synchronous encoder value detection
Isochrone mode - (irrelevant) Isochronous encoder value detection

Free-Wheeling Encoder Value Detection


With free-wheeling encoder value detection, you obtain maximum accuracy with the latch
function.
The 1SSI initiates the transmission of a message frame each time the assigned monoflop
time elapses.
The 1SSI processes the detected encoder value asynchronously to these free-wheeling
message frames in the cycle of the update rate.
This results in encoder values of various ages with the free-wheeling detection of encoder
values. The difference between maximum and minimum age is the jitter.

Synchronous Encoder Value Detection


With synchronous encoder value detection, you obtain maximum accuracy with encoder
value detection.
The 1SSI initiates the transmission of a message frame in the cycle of its update rate.
The 1SSI processes the transmitted encoder value synchronously to its update rate.

Technological Functions
254 Operating Instructions, 04/2008, A5E00124867-06
1SSI
4.6 Functions of the 1SSI

Isochronous Encoder Value Detection


Isochronous encoder value detection is carried out automatically when the equidistant bus
cycle is activated in the DP master system and the DP slave is synchronized to the bus
cycle.
The 1SSI initiates the transmission of a message frame in every bus cycle at time Ti, as long
as the configured maximum encoder sampling rate does not result in a reduction.
The 1SSI processes the transmitted encoder value isochronously to the bus cycle.

4.6.3 Gray/Binary Converter

Description
When Gray is set, the encoder value supplied by the absolute encoder in gray code is
converted to binary code. When Binary is set, the supplied encoder value is not converted.

NOTICE
If you selected the Gray setting, the 1SSI always converts the total encoder value (13 to
25 bits). Preceding special bits thus influence the encoder value and trailing bits can under
some circumstances be corrupted.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 255
1SSI
4.6 Functions of the 1SSI

4.6.4 Transmitted Encoder Value and Standardization

Description
The transmitted encoder value contains the encoder position of the absolute value encoder.
Depending on the encoder that is used, other bits that are located before and after the
encoder position are transmitted in addition to the encoder position.
So that the 1SSI can determine the encoder position, specify the following:
● Encoder type
● Number of trailing bits
● Total steps of the absolute encoder
With normalization, you specify the representation of the encoder value in the feedback
interface.
● With "Normalization On", you specify that trailing, irrelevant bits in the encoder value are
to be discounted (see the following example).
● With "Normalization Off", you specify that trailing bits are retained and are available for
evaluation.

Normalization Example
Presettings:
You use a single-turn encoder with 29 (corresponds to 9 bits) = 512 steps/revolution
(resolution/360°) with the following parameter assignment:
● Encoder type: SSI-13 bit
● Number of trailing bits: 4 places
● Total steps of the absolute encoder: 512

:LWKRXWQRUPDOL]DWLRQ&\FOLFDOO\UHFRUGHGHQFRGHUSRVLWLRQ
 'DWDGRXEOHZRUG   
                            ; ; ; ;
5HOHYDQWELWV

7UDQVIHUUHGELWV

2IWKHELWVWUDQVIHUUHGELWVWRDUHUHTXLUHGIRUHYDOXDWLRQ

$IWHUQRUPDOL]DWLRQHQFRGHUSRVLWLRQ
 'DWDGRXEOHZRUG 
                               

5HOHYDQWELWV

%LWVWR LQGLFDWHGDERYHE\[ DUHGLVFRXQWHG

Technological Functions
256 Operating Instructions, 04/2008, A5E00124867-06
1SSI
4.6 Functions of the 1SSI

4.6.5 Detection of Direction and Reversal of the Direction of Rotation

Direction Detection
The 1SSI needs the following information to detect the direction of movement of the encoder
correctly:
● Encoder type
● Total steps of the absolute encoder
● Number of trailing bits
The information is used as explained in the normalization example.
The direction of movement that is determined is displayed in the feedback interface and at
the LEDs.
UP LED: encoder position change from lower to higher value
DN LED: encoder position change from higher to lower value

Direction Reversal
The direction reversal adjusts the direction of movement of the encoder to that of the axis.
Two settings are possible:
● Off
The direction of the transmitted encoder position is maintained.
● On
The direction of the transmitted encoder position is reversed. This means that although
the encoder sends ascending values, descending values are displayed.
This reversal applies to the total steps of the absolute encoder, as indicated in the
parameter assignment.

Example of Direction Reversal


Presettings:
You use a single-turn encoder with 210 (corresponds to 10 bits) = 1024 steps/revolution
(resolution/360°) with the following parameter assignment:
● Encoder type: SSI-13 bit
● Number of trailing bits: 3 places
● Direction reversal: On
● Total steps of the absolute encoder: 1024
Encoder value before direction reversal: cyclically recorded encoder position 1023
Encoder value after direction reversal: displayed encoder position 0

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 257
1SSI
4.6 Functions of the 1SSI

4.6.6 Comparator (Only in Standard Mode)

Description
The encoder position that is detected can be compared with up to two loadable values
(without hysteresis). Both comparison results are stored in the feedback interface. The
appropriate comparator becomes active only after the comparison value is loaded.
You set the two comparators in the Comparator 1 and Comparator 2 parameters:

Setting Effect on the Result of Comparison (CMPx)


Not active The encoder value is not compared.
The feedback bit CMPx = 0.
In the up direction The encoder value is compared in the up direction (UP).
• If the encoder value ≥ the comparison value, the feedback bit CMPx = 1.
• If the encoder value < the comparison value, the feedback bit CMPx = 0.
• If the direction is down, the feedback bit CMPx remains unchanged.
• If no change is detected in the encoder value, the feedback bit CMPx remains
unchanged.
In the down direction The encoder value is compared in the down direction (DN).
• If the encoder value ≤ the comparison value, the feedback bit CMPx = 1.
• If the encoder value > the comparison value, the feedback bit CMPx = 0.
• If the direction is up, the feedback bit CMPx remains unchanged.
• If no change is detected in the encoder value, the feedback bit CMPx remains
unchanged.
In both directions The encoder value is compared in both directions.
If the direction is up, the following conditions apply:
• If the encoder value ≥ the comparison value, the feedback bit CMPx = 1.
• If the encoder value < the comparison value, the feedback bit CMPx = 0.
If the direction is down, the following conditions apply:
• If the encoder value ≤ the comparison value, the feedback bit CMPx = 1.
• If the encoder value > the comparison value, the feedback bit CMPx = 0.
• If no change is detected in the encoder value, the feedback bit CMPx remains
unchanged.
As soon as you load a comparison value, the comparison result is deleted and is then
entered in accordance with the directional setting.

Note
Only one control bit can be set at a particular time:
CMP_VAL1 or CMP_VAL2.
Otherwise, the ERR_LOAD error is reported until both control bits are deleted.

Technological Functions
258 Operating Instructions, 04/2008, A5E00124867-06
1SSI
4.6 Functions of the 1SSI

Loading the Comparison Value

&RQWUROELW
&03B9$/
&03B9$/

)HHGEDFNELW
676B/2$'

66,9DOXHDFFHSWHGHQGRIWUDQVIHU
SRVVLEO\ZLWKDQHUURU

8VHU5HPRYHUHTXHVWDQGNHHSYDOXHDYDLODEOH

66,5HTXHVWXQGHUVWRRG

8VHU5HTXHVWYDOXHWUDQVIHUDQGPDNHYDOXHDYDLODEOH

Figure 4-2 Value Transfer

Comparator in Isochronous Mode


In isochronous mode, the comparison values are loaded at time To and are effective as of
time Ti in the same bus cycle.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 259
1SSI
4.6 Functions of the 1SSI

4.6.7 Latch Function (Only in Standard Mode)

Description
You use the latch function to freeze the current encoder value of the 1SSI at an edge at the
digital input (DI).
The encoder value can thus be evaluated on an event-dependent basis.
A frozen encoder value is identified by the set bit 31 and is preserved until the termination of
the latch function.
The frozen encoder value is entered at the feedback interface at the position of the cyclically
recorded value and assigned the identifier "Bit 31 set."

Note
Direction determination, comparison, and error monitoring also take place when the encoder
value is frozen.

Prerequisites for Using the Latch Function


● You must have specified which edge (rising and/or falling) at the digital input freezes the
encoder value.
● You specify that the latch function that is coupled to the digital input is switched on.

Technological Functions
260 Operating Instructions, 04/2008, A5E00124867-06
1SSI
4.6 Functions of the 1SSI

Terminating the Latch Function


The latch function must be acknowledged. When the controller program acknowledges the
acceptance of the encoder value, bit 31 is deleted and the encoder value is updated again.
Freezing is then possible again.

66,ODWFKIXQFWLRQLVDFWLYHHQFRGHUYDOXH
LVIUR]HQ ELW  ZDLWIRU
/$7&+B$&.
8VHU/$7&+PXVWEH
DFNQRZOHGJHGZLWK/$7&+B$&. 

66,/DWFKIXQFWLRQLVWHUPLQDWHG
HQFRGHUYDOXHLVFXUUHQW

8VHU/$7&+B$&.PXVWEHFOHDUHG
IUHH]LQJLVSRVVLEOHDJDLQDVVRRQDV
66,GHWHFWV/$7&+B$&. 

%LWVHW
LQHQFRGHUYDOXH

/$7&+B$&.

',

Figure 4-3 Latch Function

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 261
1SSI
4.6 Functions of the 1SSI

4.6.8 Error Detection in Standard Mode

Description
The absolute value encoder and sensor supply short circuit errors must be acknowledged.
They have been detected by the 1SSl and are indicated at the feedback interface. A
channel-specific diagnosis is carried out after you have enabled group diagnosis at
parameter assignment (see the ET 200S Distributed I/O System manual).
The parameter assignment error bit is acknowledged by means of correct parameter
assignment.

$QHUURURFFXUVWKH66,VHWVDQHUURUELWD
GLDJQRVWLFPHVVDJHPD\DSSHDUHUURUGHWHFWLRQ
FRQWLQXHVWREHDFWLYH

(UURUHOLPLQDWHGLI(;7)B$&.LVVHWE\WKHXVHUSURJUDP
WKH66,FOHDUVWKHHUURUELWDGLDJQRVWLFPHVVDJHPD\
DSSHDU

)RUH[DPSOH
HUURUELW
(55B66,

(UURUDFNQRZOHGJPHQW
(;7)B$&.

Figure 4-4 Error Acknowledgment

In the case of constant error acknowledgement (EXTF_ACK = 1) or in CPU/master STOP


mode, the 1SSI reports the errors as soon as they are detected and clears the errors as
soon as they are eliminated.

4.6.9 Error Detection in Fast Mode

Description
The absolute value encoder and sensor supply short circuit errors have been detected by the
1SSl and are indicated at the feedback interface. A channel-specific diagnosis is carried out
after you have enabled group diagnosis at parameter assignment (see the ET 200S
Distributed I/O System manual).
The parameter assignment error bit is acknowledged by means of correct parameter
assignment.
As soon as the absolute value encoder and sensor supply short circuit errors are no longer
detected by the 1SSl, the error display at the feedback interface is cleared, and in certain
cases the channel-specific diagnosis reports an error-free condition.

Technological Functions
262 Operating Instructions, 04/2008, A5E00124867-06
1SSI
4.7 Behavior at CPU-Master-STOP

4.7 Behavior at CPU-Master-STOP

Description
The 1SSI detects the CPU/ bus master STOP. The reaction to this is to stop the active
operation.

Exiting the CPU/Bus Master STOP Status

Without reassigning the parameters of the ET 200 station • The feedback interface of the 1SSI remains current.
With reassignment of the parameters of the ET 200 station • You must reload the comparison values.
• The latch function has to be triggered with a new edge
on the digital input DI.

Reassigning Parameters of the ET 200S Station


A new parameter assignment of the ET 200S station by your CPU/ bus master takes place:
● Upon power on of the CPU/bus master
● Upon power on of the IM 151
● After failure of the bus transmission
● After loading a modified parameter assignment or configuration of the ET 200S station
into the CPU/bus master.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 263
1SSI
4.8 Setting parameters for the 1SSI

4.8 Setting parameters for the 1SSI

Overview
You set the parameters for the 1SSI by means of the GSD file for the ET 200S or using the
STEP 7 parameter assignment software. It is not possible to reassign the parameters by
means of the user program.
Depending on the mode that you selected, either of the following parameter sets from your
parameter assignment appear in the parameter assignment software:
● All parameters (standard mode), or
● A portion of the parameters (fast mode)
You can enter the following parameters (the default appears in bold):

Parameters Value Range Note


Group diagnostics Disable/enable Enabling parameter
Detection Free-wheeling/synchronous This parameter is irrelevant in isochronous mode and
is not evaluated.
Encoder type1 No encoder/ SSI 13-bit / ... / SSI 25-bit No encoder: The encoder input is switched off.
Gray/binary converter 1 Gray/binary Code supplied by the encoder
Transmission rate 1 3 125 kHz / 250 kHz / Note that the transmission rate affects the accuracy
500 kHz / 1 MHz / 1.5 MHz / 2 MHz and up-to-dateness of the encoder values.
Monoflop time 1 2 3 16 µs / 32 µs / 48 µs / 64 µs The specification of the monoflop time is relevant for
free-wheeling encoder value detection.
See the vendor's technical specifications.
Parity None, odd, even An assigned parity bit is included in the "Encoder
Type" parameter. If a 25-bit encoder is assigned parity,
then 26 bits are read from the encoder.
The bit following the LSB (least significant bit) is
evaluated as a parity bit. A parity error is reported by
means of the following feedback interfaces:
• EXTF in fast mode
• ERR_SSI in standard mode
Normalization Off/on –
Number of trailing bits 1 0 to 15 The number of trailing bits must be specified.
Direction reversal Off/on –

Technological Functions
264 Operating Instructions, 04/2008, A5E00124867-06
1SSI
4.8 Setting parameters for the 1SSI

Parameters Value Range Note


Total steps of the • Encoder type 13 bits: 16 to 8192 If you find "Total steps - highword" and "Total steps -
absolute encoder 1 • Encoder type 14 bits: 16 to 16384 lowword" in your parameter assignment software
• Encoder type 15 bits: 16 to 32768 instead of "Total steps", the following definition applies:
Total steps = total steps lowword + total steps
• Encoder type 16 bits: 16 to 65536
highword x 216
• Encoder type 17 bits: 16 to 131072
• Encoder type 18 bits: 16 to 262144
• Encoder type 19 bits: 16 to 524288
• Encoder type 20 bits: 16 to 1048576
• Encoder type 21 bits: 16 to 2097152
• Encoder type 22 bits: 16 to 4194304
• Encoder type 23 bits: 16 to 8388608
• Encoder type 24 bits: 16 to
16777216
• Encoder type 25 bits: 16 to
33554432
Latch: Encoder value Not active / With rising edge DI / With This parameter is available in the parameter
falling edge DI / With both edges DI assignment software in standard mode only.
Not active: The encoder value cannot be frozen.
Comparator 1 Not active / In the up direction / In the This parameter is available in the parameter
down direction / In both directions assignment software in standard mode only.
Not active: The comparator is switched off.
Comparator 2 Not active / In the up direction / In the This parameter is available in the parameter
down direction / In both directions assignment software in standard mode only.
Not active: The comparator is switched off.
Sign of life Off, On This parameter is only active in isochronous mode.
When sign of life is on, the sign-of-life bit is toggled,
i.e., the last sent value is inverted, each time an
encoder value is read in in isochronous mode. If a
reduction is assigned in the "Encoder Sampling Rate"
parameter, the value is toggled only if an encoder
value was actually read in.
You can find the sign-of-life bit in the feedback
interface in:
• Byte 4/bit 7 (standard mode)
• Byte 0/bit 7 (fast mode)

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 265
1SSI
4.8 Setting parameters for the 1SSI

Parameters Value Range Note


Encoder sampling rate No limitation, 0.1 kHz to 6.3 kHz Any encoder sampling rate to be taken into account is
(in 0.1-kHz steps) set here. This parameter is only active in isochronous
mode. It enables the use of slower encoders (such as
ultrasound encoders) even in a fast processing cycle.
An integer reduction n is calculated using the set
frequency. In this case, the encoder is read in again
only every nth clock cycle.
Example: Processing cycle 500 µs
Encoder sampling rate: 1.2 KHz (approximately every
833 µs)
--> reduction n = 2, i.e., the encoder is read in again
only every 2nd processing cycle, i.e., every ms.
1 See the technical specifications of the absolute encoder.
2 The monoflop time is the time between 2 SSI frames. The assigned monoflop time must be greater than the monoflop
time of the absolute encoder (refer to the technical specifications of the manufacturer).
3 The following limitation applies to the monoflop time of the absolute encoder:

(1/transmission rate) < monoflop time of absolute encoder < 64 µs

Technological Functions
266 Operating Instructions, 04/2008, A5E00124867-06
1SSI
4.9 Control and Feedback Interfaces in Standard Mode

4.9 Control and Feedback Interfaces in Standard Mode

Note
For the 1SSI, the following data of the control and feedback interface are consistent:
Byte 0 to 3
Byte 4 to 7
Use the access or addressing mode for data consistency over the entire control and
feedback interface on your master (only for configuration using the GSD file).

Description
The two tables show the assignment of the control interface (outputs) and the feedback
interface (inputs):

Table 4-3 Assignment of the Feedback Interface (Inputs)

Address Assignment
Bytes 0 to 3 Encoder value double word (bit 31 set, encoder value frozen)
Byte 4 Bit 7: or sign of life LZ
Bit 6: Ready for operation RDY
Bit 5: Parameter assignment error ERR_PARA
Bit 4: Absolute encoder error ERR_SSI
Bit 3: Encoder supply short circuit ERR_24V
Bit 2: Status DI STS_DI
Bit 1: Status DN STS_DN
Bit 0: Status UP STS_UP
Byte 5 Bit 7: Reserved = 0
Bit 6: Reserved = 0
Bit 5: Reserved = 0
Bit 4: Reserved = 0
Bit 3: Comparison value 2 reached, CMP2
Bit 2: Comparison value 1 reached, CMP
Bit 1: Load function error, ERR_LOAD
Bit 0: Load function running, STS_LOAD
Bytes 6 to 7 Reserved = 0

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 267
1SSI
4.9 Control and Feedback Interfaces in Standard Mode

Table 4-4 Assignment of the Control Interface (Outputs)

Address Assignment
Bytes 0 to 3 Comparison value 1 or 2 (double word)
Byte 4 Bit 7: Error acknowledgment EXTF_ACK
Bit 6: Acknowledgment of latch function LATCH_ACK
Bit 5: Reserved = 0
Bit 4: Reserved = 0
Bit 3: Reserved = 0
Bit 2: Reserved = 0
Bit 1: Load comparison value 2, CMP_VAL2
Bit 0: Load comparison value 1, CMP_VAL1
Byte 5 Reserved = 0
Bytes 6 to 7 Reserved = 0

Notes on the Control and Feedback Bits

Bits Notes
CMP Comparison result of comparator 1
CMP2 Comparison result of comparator 2
CMP_VAL1 Load comparison value 1
CMP_VAL2 Load comparison value 2
ERR_24V The encoder supply is short-circuited. ERR_24V is reset when the short circuit is eliminated and
acknowledged with the EXTF_ACK control bit.
ERR_LOAD Error while loading the comparison values because both control bits CMP_VAL1 and CMP_VAL2 are
set.
ERR_PARA Incorrect parameter assignment for the ET 200S station.
Cause: Total steps of the absolute encoder are not in the range of values for the type of encoder.
The parameter bit is cleared when a correct parameter assignment is transmitted.
ERR_SSI The 1SSI detects an absolute encoder error if the message frames at the SSI interface are faulty.
Causes: No encoder connected; wire break in the encoder cable; over voltage of encoder supply; type
of encoder, transmission rate, parity error, monoflop time do not correspond to the connected
encoder; programmable encoders do not correspond to the settings on the 1SSI; encoder is defective
or faults exist.
ERR_SSI is reset when the cause of the error is eliminated and acknowledged with the EXTF_ACK
control bit.
EXTF_ACK Error acknowledgement for the absolute encoder ERR_SSI and encoder supply short circuit
ERR_24V errors
LATCH_ACK Acknowledgement for latch function
LZ This parameter is only active in isochronous mode.
When sign of life is on, the sign-of-life bit is toggled, i.e., the last sent value is inverted, each time an
encoder value is read in isochronous mode. If a reduction is assigned in the "Encoder Sampling Rate"
parameter, the value is toggled only if an encoder value was actually read in.
STS_DI The bit displays the status of the digital input DI.

Technological Functions
268 Operating Instructions, 04/2008, A5E00124867-06
1SSI
4.9 Control and Feedback Interfaces in Standard Mode

Bits Notes
STS_DN Status direction down; for encoder value change from larger to smaller encoder positions (including
zero crossover)
STS_LOAD Feedback bit for CMP_VAL1 and CMP_VAL2. The 1SSI uses this bit to indicate that a comparison
value is loaded.
STS_UP Status direction down; for encoder value change from larger to smaller encoder positions (including
zero crossover)
RDY The parameter assignment of the 1SSI is correct, and the module is executing its functions. The
displayed feedback is valid. For the absolute value encoder error, ERR_SSI is also set.

Access to the Control and Feedback Interface in STEP 7 Programming

Configuring with STEP 7 Configuring with STEP 7


using the GSD file 1) using HW Config
(Hardware catalog\PROFIBUS-DP\ (Hardware catalog\PROFIBUS-DP\
Additional FIELD DEVICES\ET 200S) ET 200S)
Feedback interface Read with SFC 14 "DPRD_DAT" Load command, e.g. L PID
Control interface Write with SFC 15 "DPWR_DAT" Transfer command, e.g. T PQD
1Load and transfer commands are also possible with CPU 3xxC, CPU 318-2 (as of V3.0), CPU 4xx (as of V3.0) and
WinLC RTX (PC CPU).

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 269
1SSI
4.10 Feedback Interface in Fast Mode

4.10 Feedback Interface in Fast Mode

Description
Refer to the table below for the assignment of the feedback interface (inputs):

Table 4-5 Assignment of the Feedback Interface (Inputs)

Address Assignment
Bytes 0 to 3 Bit 31: Reserved = 0 or sign of life LZ
Bit 30: Ready for operation (feedback is valid) RDY
Bit 29: Parameter assignment error ERR_PARA;
Bit 28: Group error absolute encoder or encoder supply short circuit EXTF
Bit 27: Status DI STS_DI
Bit 26: Status DN STS_DN
Bit 25: Status UP STS_UP
Bytes 0 to 24: Encoder value

Notes on the Feedback Bits

Bits Notes
ERR_PARA Incorrect parameter assignment for the ET 200S station.
Cause: Total steps of the absolute encoder are not in the range of values for the type of encoder.
The parameter bit is cleared when a correct parameter assignment is transmitted.
EXTF Group error absolute encoder or encoder supply short circuit
Causes:
The encoder supply is short-circuited
or
No encoder connected; wire break in the encoder cable; type of encoder, transmission rate, monoflop
time do not correspond to the connected encoder; programmable encoders do not correspond to the
settings on the 1SSI; encoder is defective or faults or parity errors exist.
EXTF is reset when the causes of the errors are eliminated.
LZ This parameter is only active in isochrone mode.
When sign of life is on, the sign-of-life bit is toggled, i.e., the last sent value is inverted, each time an
encoder value is read in isochrone mode. If a reduction is assigned in the "Encoder Sampling Rate"
parameter, the value is toggled only if an encoder value was actually read in.
STS_DI The bit displays the status of the digital input DI.
STS_DN Status direction down; for encoder value change from larger to smaller encoder positions (including
zero crossover)
STS_UP Status direction down; for encoder value change from larger to smaller encoder positions (including
zero crossover)
RDY The parameter assignment of the 1SSI is correct, and the module is executing its functions. The
displayed feedback is valid. For the absolute value encoder error, ERR_SSI is also set.

Technological Functions
270 Operating Instructions, 04/2008, A5E00124867-06
1SSI
4.10 Feedback Interface in Fast Mode

Access to the Feedback Interface in STEP 7 Programming

Configuring with STEP 7 using the GSD Configuring with STEP 7 using HW Config
File
Feedback interface Read with SFC 14 "DPRD_DAT" Load command (e.g. L PID)

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 271
1SSI
4.11 Technical Specifications

4.11 Technical Specifications

Overview

General technical specifications


Dimensions and Weight
Dimensions W x H x D (mm) 15 x 81 x 52
Weight Approx. 40 g
Voltages, Currents, Potentials
Rated load voltage L+ 24 VDC
• Range 20.4 ... 28.8 V
• Reverse polarity protection Yes
Galvanic isolation
• Between backplane bus and SSI Yes
function
• Between SSI function and load No
voltage L+
Encoder supply
• Output voltage L+ (-0.8 V)
• Output current max. 500 mA, short circuit-proof
Current consumption
• From the backplane bus max. 10 mA
• From load voltage L+ (no load) max. 40 mA
Power dissipation of the module 1.0 W
SSI Module Encoder Input
Position feedback Absolute
Differential signals for SSI data and SSI According to RS422
clock
Data transmission rate and wire length • 125 kHz max. 320 m
with absolute encoders (twisted pair and • 250 kHz max. 160 m
shielded) *) • 500 kHz max. 60 m
• 1 MHz max. 20 m
• 1.5 MHz max. 10 m
• 2 MHz max. 8 m
Digital Input
Input voltage 0 signal: -30 ... 5 V
1 signal: 11 ... 30 V
Input current 0 signal: ≤2 mA (quiescent current)
1 signal: 9 mA (typical)
Input delay 0 > 1: max. 300 µs
1 > 0: max. 300 µs
Connection of a two-wire BERO type 2 Possible
Shielded cable length 50 m

Technological Functions
272 Operating Instructions, 04/2008, A5E00124867-06
1SSI
4.11 Technical Specifications

General technical specifications


Status, Interrupts, Diagnostics
Interrupts
Status display for digital input DI LED 7 (green)
Status display of first comparator CMP CMP LED (green)
Encoder value change Up UP LED (green)
Encoder value change Down DN LED (green)
Group error SF LED (red)
Encoder Value Inaccuracy in Non-Isochronous Mode
Free-wheeling encoder value detection
• Maximum age
– Standard mode (2 x message frame runtime) + Monoflop time + 1 ms
– Fast mode (2 x message frame runtime)
+ Monoflop time + 700 µs
• Jitter
– Standard mode Message frame runtime + Monoflop time
– Fast mode Message frame runtime + Monoflop time
Synchronous encoder value detection
• Age
– Standard mode Message frame runtime + 1 ms
– Fast mode Message frame runtime + 700 µs
Isochronous encoder value detection
• Age in standard mode and fast mode Encoder value at time Ti of the current bus cycle
Latch Value Inaccuracy in Non-Isochronous Mode
Free-wheeling encoder value detection
• Jitter in standard mode and fast Frame runtime + Monoflop time
mode
Synchronous encoder value detection
• Jitter
– Standard mode 1 ms
– Fast mode 700 µs
Isochronous encoder value detection
• Jitter in standard mode and fast Frame runtime + Monoflop time
mode
Frame runtime of the encoders (for selected encoder widths without parity bit)
13 bits 14 bits 16 bits 21 bits 24 bits 25 bits
• 125 kHz 112 µs 120 µs 136 µs 176 µs 200 µs 208 µs
• 250 kHz 56 µs 60 µs 68 µs 88 µs 100 µs 104 µs
• 500 kHz 28 µs 30 µs 34 µs 44 µs 50 µs 52 µs
• 1 MHz 14 µs 15 µs 17 µs 22 µs 25 µs 26 µs
• 1.5 MHz 9 µs 10 µs 11 µs 15 µs 17 µs 17 µs
• 2 MHz 7 µs 8 µs 9 µs 11 µs 13 µs 13 µs
Monoflop time 1 16 µs / 32 µs / 48 µs / 64 µs

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 273
1SSI
4.11 Technical Specifications

General technical specifications


Response Times in Non-Isochronous Mode
Update rate of the 1SSI
• In standard mode 1 ms
• In fast mode 700 µs
Isochronous Times for the Module
• In standard mode TCI 125 µs + Frame runtime (in µs)
TCO 125 µs
ToiMin 0 µs
TDPMin 400 µs + Frame runtime if frame runtime >
100 µs
500 µs if frame runtime ≤ 100 µs
• In fast mode TCI 70 µs + Frame runtime (in µs)
TCO 0 µs
ToiMin 0 µs
TDPMin 210 µs + Frame runtime if frame runtime >
40 µs
250 µs if frame runtime ≤ 40 µs
1 The following restriction applies to the monoflop time of the absolute encoder:
(1/transmission rate) < monoflop time of the absolute encoder < 64 µs)
*) As long as the encoder in use does not require a shorter line length.

Technological Functions
274 Operating Instructions, 04/2008, A5E00124867-06
2PULSE 5
5.1 Product Overview

Order Number
6ES7 138-4DD00-0AB0

Features
● 2-channel
The two channels of the 2PULSE can be used independently of one another; they permit
pulse output in four different modes.
Minimum pulse duration: 200 µs,
Accuracy: ± (pulse duration x 100 ppm) ±100 µs
● Apart from the set mode, the 2PULSE also has two other functions.
● Digital output DO 0 for channel 0 and digital output DO 1 for channel 1 to output the
pulses.
● Digital input DI 0 for channel 0 and digital input DI 1 for channel 1 for enabling.

Operating Modes
● Pulse output mode
Output of a pulse on the digital output of the 2PULSE with a specifiable pulse duration.
● Pulse-width modulation (PWM) mode
Output of a pulse train on the digital output of the 2PULSE; the output value corresponds
to the ratio of the pulse duration to the period.
● Pulse train mode
Output of n pulses on the digital output of the 2PULSE with a specifiable period and pulse
duration.
● On/Off-delay mode
The signal pending at the digital input DI is output with an on/off-delay at the digital output
DO by the 2PULSE.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 275
2PULSE
5.1 Product Overview

Functions
● Direct control of the digital output by means of the control program
● Programmable behavior for CPU/master STOP
● Error detection/diagnostics (short circuit of the digital output and encoder supply)

Configuration
You can use either of the following to configure the 2PULSE:
● A GSD file (http://www.ad.siemens.de/csi/gsd)
or
● STEP 7 V5.0 SP3 and later.

Restrictions with the 2PULSE electronic module (6ES7 138-4DD00-0AB0)

Note
Restrictions for the 2PULSE module with IM151-7 CPU, IM151-1 HIGH FEATURE or
IM 151-1 BASIC:
With the IM 151-7 CPU, you must use STEP 7 V5.1, Service Pack 1, Hotfix 1 or higher for
configuration.
You cannot enable the group diagnostics parameter in the configuration if you use the
2PULSE module.

Technological Functions
276 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.2 Example: Starting 2PULSE

5.2 Example: Starting 2PULSE

Task
These instructions guide you to a functioning application that will enable you to become
familiar with and check the basic hardware and software functions of your 2PULSE. The
"Pulse Output" mode will be used as an example here. Channel 0 of the 2PULSE is used in
this example.

Requirements
The following requirements must be satisfied:
● You have commissioned an ET 200S station on an S7 station with a master.
● You must have the following:
– A TM-E15S24-01 terminal module and
– a 2PULSE.

Installation and Fitting


1. Install and wire the TM-E15S24-01 terminal module (see figure below).
2. Connect the 2PULSE to the terminal module (you will find detailed instructions in the
ET 200S Distributed I/O System Manual). It is not necessary to wire the 2PULSE for this
example.

3XOVH

6)

70(6DQG38/6(

 
&KDQQHO   &KDQQHO
(6
''$%

 
', ',

9'&   9'&

0   0

'2   '2

Figure 5-1 Terminal Assignment of the 2PULSE for the Example

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 277
2PULSE
5.2 Example: Starting 2PULSE

Configuring with STEP 7 using HW Config


You must first adapt the hardware configuration of your existing ET 200S station.
1. Open the relevant project in SIMATIC Manager.
2. Open the HW Config configuration table in your project.
3. Select the 2PULSE from the hardware catalog. The number 6ES7 138-4DD00-0AB0
appears in the infotext. Drag the entry to the slot at which you have installed your
2PULSE.
4. Double-click this number to open the DP Slave Properties dialog box.
On the Addresses tab you will find the addresses of the slot to which you have dragged
the 2PULSE. Make a note of these addresses for subsequent programming.
On the Parameters tab, you will find the default settings for the 2PULSE. Leave the
default settings unchanged.
5. Save and compile your configuration, and download the configuration in STOP mode of
the CPU by choosing "PLC > Download to Module".

Integration into the Control Program


Create block FC101 and integrate it in your control program (in OB1, for example). This
block works in this example with the MB10, MB20 and M30.0 memory bits.
In block FC101, the start address of the inputs and outputs of the 2PULSE is 256. If
necessary, take the address from the hardware configuration.
This block sets a pulse duration of 5000 ms and starts pulse output as soon as you have
issued the enable using your control program (SW_ENABLE=1).

STL Description
Block: FC101

L PEB256 //Read feedback messages from channel 0 of the 2PULSE


T MB20

L 5000 //Write pulse duration of 5000 ms to channel 0 of the 2PULSE


T PAW256

L 0 //Generate SW_ENABLE control signal


T MB10
U M30.0 //Query start of pulse output
= M10.0 //Set SW_ENABLE=1

L MB10
T PAB258 //Write control signals to channel 0 of the 2PULSE

Technological Functions
278 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.2 Example: Starting 2PULSE

Testing
Start a pulse output with SW_ENABLE=1 and monitor the STS_ENABLE and STS_DO
feedback bits using "Monitor/Modify Variables".
1. Select the "Block" folder in your project. Choose the "Insert > S7 Block > Variable Table"
menu command to insert the VAT 1 variable table, and then confirm with OK.
2. Open the VAT 1 variable table, and enter the following variables in the "Address" column:
M20.0 (STS_ENABLE)
M20.1 (STS_DO)
M30.0 (SW_ENABLE)
3. Choose "PLC > Connect To > Configured CPU" to switch to online.
4. Choose "Variable > Monitor" to switch to monitoring.
5. Switch the CPU to RUN mode.

Result
The following table shows you which activity triggers which result.

Activity Result
When you switch the CPU to RUN, the following results are • All the LEDs are turned off
obtained: • STS_ENABLE = 0
• STS_DO = 0
Start the pulse output by setting memory bit 30.0 (Variable →
Modify → )
• STS_ENABLE = 1
Directly after the start... • STS_DO = 1
• LED 4 for DO 0 lights up
• STS_ENABLE = 0
After the 5 s pulse duration has expired • STS_DO = 0
• LED 4 for DO 0 is turned off
To start further pulse output, you must delete SW_ENABLE (memory bit M30.0 = 0) and
reset it (memory bit M30.0 = 1).
You can change the pulse duration in the control program.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 279
2PULSE
5.3 Modes and Functions

5.3 Modes and Functions

5.3.1 Overview

Principle
The 2PULSE has two channels. You can select a separate mode for each channel. You
assign parameters to the mode using HWCONFIG or COM PROFIBUS. The mode that has
been assigned parameters can then no longer be changed with your control program.
You can select from four different modes for each channel:
● Pulse output
● Pulse-width modulation
● Pulse train
● On/off-delay
In addition to the set mode, the 2PULSE also has the following functions:
● Direct control of the DO digital output by means of your control program; controllable
separately for each channel.
● Error detection/diagnostics; the 2PULSE recognizes the errors for each channel
separately.
● Behavior at CPU/master STOP; the 2PULSE recognizes the CPU/master STOP for both
two channels and responds in accordance with your parameter assignment.

&KDQQHO

3DUDPHWHUV

&RQWUROVLJQDOV '2
0RGHVDQG
IXQFWLRQV
)HHGEDFNVLJQDOV ',
&RQWURO3URJUDP

3URFHVV

&KDQQHO

3DUDPHWHUV

&RQWUROVLJQDOV '2
0RGHVDQG
IXQFWLRQV
)HHGEDFNVLJQDOV ',

Figure 5-2 How the 2PULSE works

Technological Functions
280 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.3 Modes and Functions

Interfaces to the Control Program and Process


To execute the modes and functions, the 2PULSE has as an interface to the process of a
digital input and a digital output for each channel (DI 0, DO 0 for channel 0 and DI 1, DO1 for
channel 1).
You can modify and monitor the modes and functions with your control program using
control signals and feedback signals.
Parameters are assigned to the various modes. See the technical specifications for
programming a complete list of parameters for all modes.
You will find the following in the sections on modes and functions:
● The relevant parameters
● The control and feedback signals
The description of the modes and functions applies to both channels and the channels are
therefore not referred to separately in the description.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 281
2PULSE
5.3 Modes and Functions

5.3.2 Pulse Output Mode

Definition
For the pulse duration you set, the 2PULSE outputs a pulse at the DO digital output (output
sequence) on expiration of the set on-delay.

+:HQDEOH
RSWLRQDO
ุ 676B(1$%/(
6RIWZDUHHQDEOH
6:B(1$%/( 6 4 6 4

'2
5 5
2QGHOD\ 3XOVH
GXUDWLRQ

Figure 5-3 Basic Circuit Diagram for Pulse Output Mode

Starting output sequence


You must always issue the enable for the output sequence by means of the software enable
(SW_ENABLE 0→1; MANUAL_DO=0) in your control program.
The ACK_SW_ENABLE feedback bit indicates the software enable pending at the 2PULSE.
You can also set the DI digital input of the 2PULSE as hardware enable (HW enable) with
the DI function parameter.
If you want to work with the software enable and hardware enable at the same time, when
the software enable has been issued, the output sequence starts at the first positive edge of
the hardware enable. Further positive edges of the hardware enable during the current
output sequence are ignored by the 2PULSE. When the software enable has been issued, a
positive edge of the hardware enable is enough to start the next output sequence.
When the enable is issued (positive edge), the on-delay is started and the STS_ENABLE
set. On expiration of the on-delay, the pulse is output with the set pulse duration. The output
sequence finishes with the end of the pulse; STS_ENABLE is deleted.
If you make an impermissible change to the pulse duration during operation, the ERR_PULS
signal indicates a pulse output error. You will then have to restart the output sequence.
The next time the output sequence starts, the 2PULSE deletes the ERR_PULS feedback bit.

Technological Functions
282 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.3 Modes and Functions

Pulse diagram

6RIWZDUHHQDEOH
6:B(1$%/(

$&.B6:B(1$%/(

+:HQDEOH
',GLJLWDOLQSXW

'2GLJLWDORXWSXW

676B(1$%/(

(55B38/6

2QGHOD\ 3XOVHGXUDWLRQ

6WDUWRIWKHRXWSXWVHTXHQFH (QGRIWKHRXWSXWVHTXHQFH

Figure 5-4 Output Sequence for Pulse Output

Interrupting output sequence


Deleting the software enable (SW_ENABLE = 0) during the on-delay or the pulse duration
terminates the output sequence, and STS_ENABLE and the DO digital output are deleted.
You will then have to restart the output sequence.

Truth Table

SoftwareEnable HW enable(DI digital DO Digital Output STS_ENABLE Output


SW_ENABLE input) Sequence
1 0→1 0, if on-delay >0 0→1 Start
1, if on-delay =0
0→1 Not used 0, if on-delay >0 0→1 Start
1, if on-delay =0
0 Any status 0 0 Terminate
1 0 Previous status remains -
1 1 Previous status remains -
1 Not used Previous status remains -
0→1 0 0 0 -
0→1: Positive edge

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 283
2PULSE
5.3 Modes and Functions

Setting Times Using a Time Base


By means of the time base that can be assigned parameters, you can select the resolution
and range of the pulse duration and the on-delay.

Time base = 0.1 ms: You can set times from 0.2 ms to 6.5535 s with a resolution of 0.1 ms.
Time base = 1 ms: You can set times from 1 ms to 65.535 s with a resolution of 1 ms.

Setting and Changing the Pulse Duration


Set the pulse duration directly in your control program as a numerical value between 0 and
65535.
Pulse duration = time base x set numerical value
If you change the pulse duration when an output sequence is running, the time already
output will be subtracted from the new pulse duration and the pulse will continue to be
output.

Reducing the Pulse Duration


If you have reduced the pulse duration to a time that is shorter than the time already output,
the output sequence is terminated, STS_ENABLE and the DO digital output are deleted, and
the ERR_PULS status bit is set. At the next output sequence, the ERR_PULS status bit is
deleted.

Setting and Changing the On-Delay


Set the on-delay as a value between 0 and 65535 in the parameters.
on-delay that has been assigned parameters = time base x set numerical value
Using the factor for the on-delay, you can adjust the time that has been assigned parameters
in your control program. Set the factor between 0 and 255, with a weighting of 0.1:
On-delay = factor x 0.1 x on-delay that has been assigned parameters
If you change the on-delay factor during the output sequence, the new on-delay is activated
at the next output sequence.

Technological Functions
284 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.3 Modes and Functions

Pulse Output Mode Parameters

Parameters Meaning Value Range Default


Mode Set the pulse output mode. • Pulse output Pulse output
• Pulse-width modulation
• Pulse train
• On/off-delay
Time base Using the time base, select the • 0.1 ms 0.1 ms
resolution and range of the • 1 ms
pulse duration and the on-
delay.
Function DI You can use the DI digital input • Input Input
as an input or as a hardware • HW enable
enable.
On-delay The time from the start of the With time base 0.1 ms: 0
output sequence to the output 0 to 65535
of the pulse. You can change With time base 1 ms:
the on-delay using your control 0 to 65535
program.

Control and Feedback Signals of Pulse Output Mode

Control and Feedback Meaning Value Range Channel 0 Channel 1


Signals Address Address
Control Signals
Software enable Starting and termination of the 0 = SW_ENABLE deleted Byte 2: Byte 6:
(SW_ENABLE) output sequence. 1 = SW_ENABLE set 0→1 = start Bit 0 Bit 0
of output sequence; may be
dependent on the hardware
enable
Pulse duration The time that is set for the DO With time base 0.1 ms: Word 0 Word 4
digital output on expiration of the 2 to 65535
on-delay. With time base 1 ms:
1 to 65535
If you violate the lower limit of the
range, the 2PULSE will not output
a pulse.
On-delay factor The on-delay that has been 0 to 255 Byte 3 Byte 7
assigned parameters can be If the on-delay <0.2 ms or if factor
changed before the start of the = 0, the effective on-delay is = 0.
output sequence: If there is an on-delay > 65.535 s,
On-delay = factor x 0.1 x on-delay the on-delay is limited to 65.535 s.
that has been assigned
parameters

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 285
2PULSE
5.3 Modes and Functions

Control and Feedback Meaning Value Range Channel 0 Channel 1


Signals Address Address
Feedback Signals
STS_ENABLE Indicates an output sequence is 0 = pulse output blocked Byte 0: Byte 4:
running. 1 = pulse output running Bit 0 Bit 0
STS_DO Indicates the signal level at the 0 = signal at the DO digital output Byte 0: Byte 4:
DO digital output. Note the update 1 = signal at the DO digital output Bit 1 Bit 1
rate.
STS_DI Indicates the signal level at the DI 0 = signal 0 at the DI digital input Byte 0: Byte 4:
digital input. 1 = signal 1 at the DI digital input Bit 2 Bit 2
ACK_SW_ENABLE Indicates the status of 0 = SW_ENABLE deleted Byte 0: Byte 4:
SW_ENABLE. 1 = SW_ENABLE set Bit 3 Bit 3
ERR_PULS Indicates a pulse output error. 0 = no pulse output error Byte 0: Byte 4:
1 = pulse output error Bit 4 Bit 4

Input and Output Signals of Pulse Output Mode

Input and Output Signals Meaning Value Range Channel 0 Channel 1


Terminal Terminal
Input Signal
HW enable You can select the HW 0 = HW enable deleted 1 5
enable with the DI function 1 = HW enable issued
parameter. 0→1= start of the output
The signal of the DI digital sequence; dependent on the
input is then interpreted by software enable
the 2PULSE at the start of (SW_ENABLE)
the output sequence.
Output Signal
Pulse at the DO digital A pulse is output at the DO 0 = no pulse 4 8
output digital output for the set 1 = pulse
pulse duration.

Technological Functions
286 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.3 Modes and Functions

5.3.3 Pulse-Width Modulation Mode (PWM)

Definition
You specify an output value to the 2PULSE. The 2PULSE generates continuous pulses on
this basis. The output value determines the pulse/interpulse ratio within a period (pulse-width
modulation). The period can be adjusted.
The pulse train is output on expiration of the assigned on-delay on the DO digital output of
the 2PULSE (output sequence).

+:HQDEOH
RSWLRQDO
6RIWZDUHHQDEOH ุ 676B(1$%/(
6:B(1$%/(
6 4 6 4
'2
3:0
5 5 3:0LQ
RSHUDWLRQ
2QGHOD\ 2XWSXWYDOXH

Figure 5-5 Block Diagram for Pulse-Width Modulation Mode

Starting the Output Sequence


You must always issue the enable for the output sequence via a software enable
(SW_ENABLE 0→1; MANUAL_DO = 0) in your control program. The ACK_SW_ENABLE
feedback bit indicates the software enable pending at the 2PULSE.
You can also set the digital input DI of the 2PULSE as HW enable with the Function DI
parameter.
If you want to work with the software enable and hardware enable at the same time, when
the software enable has been issued, the output sequence starts with the first positive edge
of the hardware enable. Further positive edges of the hardware enable during the current
output sequence are ignored by the 2PULSE.
When the enable is issued (positive edge), the on-delay is started and the STS_ENABLE
set. The pulse train is output on expiration of the on-delay. The output sequence runs
continuously as long as SW_ENABLE is set.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 287
2PULSE
5.3 Modes and Functions

Pulse Diagram

6RIWZDUHHQDEOH
6:B(1$%/(

$&.B6:B(1$%/(

+:HQDEOH
',GLJLWDOLQSXW 3HULRGGXUDWLRQ 3HULRGGXUDWLRQ

'2GLJLWDOLQSXW

2QGHOD\ 3XOVH ,QWHUSXOVH


GXUDWLRQ SHULRG

2XWSXWYDOXHಽ 2XWSXWYDOXHಽ

676B(1$%/(

6WDUWRIWKHRXWSXWVHTXHQFH

Figure 5-6 Pulse-Width Modulation Output Sequence

Canceling the Output Sequence


Deleting the software enable (SW_ENABLE=0) during the on-delay or the pulse output
cancels the output sequence, and STS_ENABLE and the DO digital output are canceled.
You will then have to restart the output sequence.

Truth Table

Software enable Hardware enable Digital output DO STS_ENABLE Output


SW_ENABLE (digital input DI) sequence
1 0→1 0, if on-delay >0 0→1 Start
1, if on-delay =0
0→1 Not used 0, if on-delay >0 0→1 Start
1, if on-delay =0
0 Any status 0 0 Cancel
1 0 Previous status remains -
1 1 Previous status remains -
1 Not used Previous status remains -
0→1 0 0 0 -
0→1: Positive edge

Technological Functions
288 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.3 Modes and Functions

Modulation of the Pulse Duration


The 2PULSE calculates the pulse duration on the basis of the output value you set (between
0 and 1000‰):
Pulse duration = (output value/1000 [‰]) x period.

Minimum Pulse Duration and Minimum Interpulse Period


The minimum pulse duration and minimum interpulse period are superimposed on the
proportional output characteristic.
You assign the minimum pulse duration and minimum interpulse period using the
Minimum/Pulse duration parameter; they always have the same value.
A pulse duration calculated by the 2PULSE that is shorter than the minimum pulse duration
is suppressed.
A pulse duration calculated by the 2PULSE that is longer than the period minus the minimum
interpulse period is set at 1000‰.

3XOVHGXUDWLRQ

3HULRGGXUDWLRQ
3HULRGGXUDWLRQPLQLPXP
LQWHUSXOVHSHULRG

0LQLPXPSXOVHGXUDWLRQ


  2XWSXWYDOXHLQಽ

Figure 5-7 Modulation of the Pulse Duration

You specify the period in accordance with the required accuracy of the process variables
generated by the actuator.

Setting Times Using a Time Base


You use the assignable time base to select the resolution and range of the period, the
minimum pulse duration and the on-delay.

Time base = 0.1 ms: You can set times from 0.2 ms to 6.5535 s with a resolution of 0.1 ms.
Time base = 1 ms: You can set times from 1 ms to 65.535 s with a resolution of 1 ms.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 289
2PULSE
5.3 Modes and Functions

Setting and Changing the Output Value


You use the Output Format PWM parameter to select the value range of the output value.
If your output value is between 0 and 1000, select the per mill output format.
If your output value is a SIMATIC S7 analog value (between 0 and 27648), select the S7
analog output output format.
You set the output value directly using your control program.
If you change the output value, the 2PULSE calculates the new pulse duration and interpulse
period immediately:
● If you make changes during the interpulse period and if the new output value is smaller
than the previous one, the period is extended once only, since the new interpulse period
is longer.
● If you make changes during the interpulse period and if the new output value is greater
than the previous one, the period is shortened once only, since the new interpulse period
is shorter.
● If you make changes during the pulse duration and if the new output value is lower than
the previous one, the period can be extended once only, since the interpulse period is
longer.
● If you make changes during the pulse duration and if the new output value is greater than
the previous one, the period remains constant.

Setting and Changing the Period


Set the period as a value between 2 and 65535 in the parameters:
Assigned period = time base x set numerical value
Using the factor for the period, you can adjust the assigned time in your control program. Set
the factor between 0 and 255, with a weighting of 0.1:
Period = factor x 0.1 x assigned period duration
If you change the factor, the 2PULSE immediately calculates the new period and with it the
new pulse duration and interpulse period:
● If you make changes during the interpulse period and if the new factor is lower than the
previous one, a period that is shorter than the previous one but longer than the new one
is set once only.
● If you make changes during the interpulse period and if the new factor is greater than the
previous one, a period that is longer than the previous one but shorter than the new one
is set once only.
● If you make changes during the pulse duration and if the new factor is lower than the
previous one, a period that is shorter than the previous one but longer than the new one
can be set once only.
● If you make changes during the pulse duration and if the new factor is greater than the
previous one, a period that is longer than the previous one but shorter than the new one
can be set once only.

Technological Functions
290 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.3 Modes and Functions

Setting the Minimum Pulse Duration and Minimum Interpulse Period


You specify the minimum pulse duration and the minimum interpulse period as a numerical
value between 0 and 65535 using the Minimum/Pulse Duration parameter:
Assigned minimum pulse duration/minimum interpulse period = time base x set numerical
value

Setting the On-Delay


You specify the on-delay as a value between 0 and 65535 in the parameters.
Assigned on-delay = time base x set numerical value

Parameters of Pulse-Width Modulation Mode

Parameter Meaning Value Range Default


Mode Set pulse-width modulation • Pulse output Pulse output
mode. • Pulse-width modulation
• Pulse train
• On/off-delay
PWM output format Select either the per mill or • Per mill Per mill
SIMATIC S7 analog value • SIMATIC S7 analog value
output formats depending on
the output value resolution
required.
Time base Use the time base to select the • 0.1 ms 0.1 ms
resolution and the value range • 1 ms
of the period, the
minimum/pulse duration, and
the on-delay.
Function DI You can use the digital input DI • Input Input
as an input or as a HW enable. • HW enable
On-delay The time from the start of the With time base 0.1 ms: 0
output sequence to the output 0 to 65535
of the pulse train. With time base 1 ms:
0 to 65535
Minimum/pulse duration Minimum pulse duration and With time base 0.1 ms: 10000 → 1 s
minimum interpulse period: 2 to 65535
Enter the response time of the With time base 1 ms:
actuator connected to your DO 1 to 65535
digital output. If you fall below the value
range, the 2PULSE sets the
minimum/pulse duration to 0.2
ms or 1 ms.
Period The period should always be a With time base 0.1 ms: 20000 → 2 s
multiple of the response time of 2 to 65535
the actuator connected to the With time base 1 ms:
digital output DO. 1 to 65535
You can change the period with
your control program.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 291
2PULSE
5.3 Modes and Functions

Control and Feedback Signals of Pulse-Width Modulation Mode

Control and Feedback Meaning Value Range Channel 0 Channel 1


Signals address address
Control signals
Software enable Starting and canceling of the 0 = SW_ENABLE canceled Byte 2: Byte 6:
(SW_ENABLE) output sequence. 1 = SW_ENABLE set 0→1 = start Bit 0 Bit 0
of output sequence; may be
dependent on the hardware
enable
Output value The value that is output in pulse- Depending on the PWM output Word 0 Word 4
width modulated format on the format:
digital output DO. • Per mill 0 to 1000
• S7 analog output
0 to 27648
If you enter an output value >
1000 or 27648, the 2PULSE limits
this to 1000 or 27648.
Period duration factor You can change the assigned Factor: 0 to 255 Byte 3 Byte 7
period: Period duration:
Period = factor x 0.1 x assigned 2 x minimum/pulse duration to
period 65.635 s.
If a period duration of < 2 x
minimum/pulse duration occurs or
< 400 µs or if factor = 0, the
effective period = 2 x
minimum/pulse duration.
In this case, the signal 0 is issued
if the output value on the digital
output DO < 500‰ or 13824, and
signal = 1 is output if the output
value > 500‰ or 13824.
If there is a period > 65.535 s, it is
limited to 65.535 s.
Feedback signals
STS_ENABLE Indicates an output sequence is 0 = pulse output blocked Byte 0: Byte 4:
running. 1 = pulse output running Bit 0 Bit 0
STS_DO Indicates the signal level on the 0 = signal 0 on digital output DO Byte 0: Byte 4:
digital output DO. 1 = signal 1 on digital output DO Bit 1 Bit 1
Note the update rate.
STS_DI Indicates the signal level on digital 0 = signal 0 on digital input DI Byte 0: Byte 4:
input DI. 1 = signal 1 on digital input DI Bit 2 Bit 2
ACK_SW_ENABLE Indicates the status of 0 = SW_ENABLE canceled Byte 0: Byte 4:
SW_ENABLE. 1 = SW_ENABLE set Bit 3 Bit 3

Technological Functions
292 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.3 Modes and Functions

Input and Output Signals of Pulse-Width Modulation Mode

Input and Output Signals Meaning Value Range Channel 0 Channel 1


terminal terminal
Input signal
HW enable You can select the HW enable 0 = HW enable canceled 1 5
with the Function DI 1 = HW enable issued
parameter. 0→1= Start of the output
The signal of the digital input sequence; dependent on the
DI is then interpreted by the software enable
2PULSE at the start of the
output sequence.
Output signal
Pulse train on the digital The pulse train is output on 0 = no pulse 4 8
output DO the digital output DO. 1 = pulse

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 293
2PULSE
5.3 Modes and Functions

5.3.4 Pulse Train Mode

Definition
The 2PULSE outputs the number of pulses you specified as a pulse train at the DO digital
output on expiration of the set on-delay (output sequence). The period duration and pulse
duration of the pulses can be adjusted.

+:HQDEOH
RSWLRQDO
6RIWZDUHHQDEOH ุ 676B(1$%/(
6:B(1$%/( 6 4 6 4
'2

5 5 7KHSXOVH
WUDLQLVLQ
2QGHOD\ 1XPEHU RSHUDWLRQ
RISXOVHV

Figure 5-8 Basic Circuit Diagram for Pulse Train Mode

Starting output sequence


You must always issue the enable for the output sequence by means of the software enable
(SW_ENABLE 0→1; MANUAL_DO=0) in your control program. The ACK_SW_ENABLE
feedback bit indicates the software enable pending at the 2PULSE.
You can also set the DI digital input of the 2PULSE as HW enable with the DI function
parameter.
If you want to work with the software enable and hardware enable at the same time, when
the software enable has been issued, the output sequence starts at the first positive edge of
the hardware enable. Further positive edges of the hardware enable during the current
output sequence are ignored by the 2PULSE. When the software enable has been issued, a
positive edge of the hardware enable is enough to start the next output sequence.
When the enable is issued (positive edge), the on-delay is started and the STS_ENABLE
set. On expiration of the on-delay, the pulse train is output with the set number of pulses.
The output sequence finishes as soon as the last pulse has been output; STS_ENABLE is
deleted.
If you make an impermissible change to the number of pulses during operation, the
ERR_PULS signal indicates a pulse output error.
At the next output sequence, the 2PULSE deletes the ERR_PULS feedback bit.

Technological Functions
294 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.3 Modes and Functions

Pulse Diagram

6:HQDEOH

$&.B6:B(1$%/(

+:HQDEOH
',GLJLWDOLQSXW

'2GLJLWDORXWSXW

2QGHOD\ 3XOVH ,QWHU 3HULRG


GXUD SXOVH GXUDWLRQ
WLRQ SHULRG
6WDUWRIWKHRXWSXWVHTXHQFH (QGRIWKH
1XPEHURISXOVHV  RXWSXW
VHTXHQFH
676B(1$%/(

(55B38/6

Figure 5-9 Output Sequence of the Pulse Train

Interrupting output sequence


Deleting the software enable during the on-delay or the pulse train terminates the output
sequence, and STS_ENABLE and the DO digital output are deleted.
You will then have to restart the output sequence.

Truth Table

SoftwareEnable DI digital input DO Digital Output STS_ENABLE Output


SW_ENABLE Sequence
1 0→1 0, if on-delay >0 0→1 Start
1, if on-delay =0
0→1 Not used 0, if on-delay >0 0→1 Start
1, if on-delay =0
0 Any status 0 0 Terminate
1 0 Previous status remains -
1 1 Previous status remains -
1 Not used Previous status remains -
0→1 0 0 0 -
0→1: Positive edge

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 295
2PULSE
5.3 Modes and Functions

Setting Times Using a Time Base


Select, by means of the time base that can be assigned parameters, the resolution and
range of the period duration, the pulse duration, and the on-delay.

Time base = 0.1 ms: You can set times from 0.2 ms to 6.5535 s with a resolution of 0.1 ms.
Time base = 1 ms: You can set times from 1 ms to 65.535 s with a resolution of 1 ms.

Setting and Changing the Number of Pulses


Set the number of pulses directly as a numerical value between 0 and 65535 with your
control program.
If you change the number of pulses on expiration of the on-delay, the new value takes effect
immediately:
● If you have increased the number of pulses, the new, higher number of pulses is output.
● If you have reduced the number of pulses, and if the lower number of pulses has already
been output, the output sequence is terminated, STS_ENABLE and the DO digital output
are deleted, and ERR_PULS is set. At the next output sequence, ERR_PULS is deleted.

Setting and Changing the Period Duration


Set the period duration as a value between 2 and 65535 in the parameters:
Period duration that has been assigned parameters = time base x set numerical value
Using the factor for the period duration, you can adjust the time that has been assigned
parameters in your control program. Set the factor between 0 and 255, with a weighting of
0.1:
Period duration = factor x 0.1 x period duration that has been assigned parameters
If you change the factor during the output sequence, the new period duration will take effect
at the start of the next output sequence.

Setting the Pulse Duration


Set the pulse duration as a numerical value between 1 and 65535 with the minimum/pulse
duration parameter:
Pulse duration that has been assigned parameters = time base x set numerical value

Setting the On-Delay


Set the on-delay as a value between 0 and 65535 in the parameters.
On-delay that has been assigned parameters = time base x set numerical value

Technological Functions
296 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.3 Modes and Functions

Parameters of the Pulse Train Mode

Parameters Meaning Value Range Default


Mode Set the pulse train mode. • Pulse output Pulse output
• Pulse-width modulation
• Pulse train
• On/off-delay
Time base Using the time base, select the • 0.1 ms 0.1 ms
resolution and range of the • 1 ms
period duration, pulse duration,
and on-delay.
Function DI You can use the DI digital input • Input Input
as an input or as a HW enable. • HW enable
On-delay The time from the start of the With time base 0.1 ms: 0
output sequence to the output 0 to 65535
of the pulse train. With time base 1 ms:
0 to 65535
Minimum/pulse duration Pulse duration: With time base 0.1 ms: 10000 → 1 s
Enter the response time of the 2 to 65535
actuator connected on your DO With time base 1 ms:
digital output. 1 to 65535
If you violate the lower limit of
the range, the 2PULSE sets the
pulse duration to 0.2 ms or 1
ms.
Period duration The period duration should With time base 0.1 ms: 20000 → 2 s
always be a multiple of the 2 to 65535
response time of the actuator With time base 1 ms:
connected to the DO digital 1 to 65535
output.
Define the period duration
according to the required
repetition rate of the pulses.
You can change the period
duration with your control
program.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 297
2PULSE
5.3 Modes and Functions

Control and Feedback Signals of Pulse Train Mode

Control and Feedback Meaning Value Range Channel 0 Channel 1


Signals Address Address
Control Signals
Software enable Starting and termination of the 0 = SW_ENABLE deleted Byte 2: Byte 6:
(SW_ENABLE) output sequence. 1 = SW_ENABLE set Bit 0 Bit 0
0→1 = Start of the output
sequence; may be dependent on
the HW enable
Number of pulses Number of pulses that are output 0 to 65535 Word 0 Word 4
at the DO digital output on If the number of pulses is 0, the
expiration of the on-delay. 2PULSE does not output any
pulses. The output sequence is
terminated with ERR_PULS = 1.
Period duration factor The on-delay that can be assigned Factor: 0 to 255 Byte 3 Byte 7
parameters can be changed Period duration:
before the start of the output
> Pulse duration up to 65.535 s
sequence:
If there is a period duration
Period duration = factor x 0.1 x
> 65.535 s, it is set to 65.535 s.
period duration that has been
If a period duration ≤ pulse
assigned parameters
duration, it is set to a pulse
duration of + 0.2 ms.
Feedback Signals
STS_ENABLE Indicates an output sequence is 0 = pulse output blocked Byte 0: Byte 4:
running. 1 = pulse output running Bit 0 Bit 0
STS_DO Indicates the signal level at the 0 = signal at the DO digital output Byte 0: Byte 4:
DO digital output. 1 = signal at the DO digital output Bit 1 Bit 1
Note the update rate.
STS_ DI Indicates the signal level at the DI 0 = signal 0 at the DI digital input Byte 0: Byte 4:
digital input. 1 = signal 1 at the DI digital input Bit 2 Bit 2
ACK_SW_ENABLE Indicates the status of 0 = SW_ENABLE deleted Byte 0: Byte 4:
SW_ENABLE. 1 = SW_ENABLE set Bit 3 Bit 3
ERR_PULS Indicates a pulse output error. 0 = no pulse output error Byte 0: Byte 4:
1 = pulse output error Bit 4 Bit 4

Technological Functions
298 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.3 Modes and Functions

Input and Output Signals of Pulse Train Mode

Input and Output Signals Meaning Value Range Channel 0 Channel 1


Terminal Terminal
Input Signal
HW enable You can select the HW enable 0 = HW enable deleted 1 5
with the DI function parameter. 1 = HW enable issued
The signal of the DI digital
0→1= Start of the output
input is then interpreted by the
sequence; dependent on the
2PULSE at startup.
software enable (SW_Enable)
Output Signal
Pulse train at the DO digital The preset number of pulses 0 = no pulse 4 8
output is output at the DO digital 1 = pulse
output.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 299
2PULSE
5.3 Modes and Functions

5.3.5 On/Off-Delay Mode

Definition
The signal pending at the digital input DI is output with an on/off-delay at the digital output
DO by the 2PULSE.

676B(1$%/(

6RIWZDUHHQDEOH
6:B(1$%/(
6 4 '2
',

2QGHOD\

6 4

2IIGHOD\

Figure 5-10 Basic Circuit Diagram for On/Off-Delay Mode

Output Sequence Enable


You must always issue the enable for the output sequence via a software enable
(SW_ENABLE 0→1; MANUAL_DO = 0) in your control program; this sets STS_ENABLE. The
ACK_SW_ENABLE feedback bit indicates the software enable pending at the 2PULSE.
The positive edge on the DI digital input (0→1) starts the on-delay, and on expiration of the
on-delay the DO digital output is set.
The negative edge on the DI digital input (1→0) starts the off-delay, and on expiration of the
off-delay the DO digital output is deleted.
If the 2PULSE recognizes a pulse duration or interpulse period that is too short, this is
displayed by the ERR_PULS pulse output error.
At the next edge at the DI digital input, the 2PULSE deletes the ERR_PULS feedback bit.

Technological Functions
300 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.3 Modes and Functions

Pulse Diagram

6RIWZDUHHQDEOH
6:B(1$%/(

$&.B6:B(1$%/(

+:HQDEOH
',GLJLWDOLQSXW

'2GLJLWDORXWSXW

676B(1$%/(

(55B38/6

2QGHOD\ 2IIGHOD\

Figure 5-11 On/Off-Delay Output Sequence

Canceling the Output Sequence


Canceling the software enable (SW_ENABLE 0 = 1) during the output sequence causes the
output sequence to be canceled, along with STS_ENABLE and the digital output.

Truth Table

Software enable Digital input DI Digital output DO STS_ENABLE Output


SW_ENABLE sequence
1 0→1 0, if on-delay >0 1 Start
1, if on-delay =0
1 1→0 1, if off-delay >0 1 Start
0, if off-delay =0
0 Any status 0 0 Cancel
1 0 Previous status remains 1 -
1 1 Previous status remains 1 -
0→1 0 0 1 -
0→1: Positive edge
1→ 0: Negative edge

Minimum Pulse Duration/Minimum Interpulse Period of the Digital Output DO


The minimum pulse duration/minimum interpulse period of the digital output DO is 0.2 ms.
Make sure you take this into consideration when you set the on/off-delay and the pulse
duration/interpulse period of the digital input DI; otherwise, the response at the digital output
DO is not defined.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 301
2PULSE
5.3 Modes and Functions

The Pulse Duration of the Digital Input DI Is Too Short


The 2PULSE detects a pulse that is too short on the negative edge on the digital input DI if:
Pulse duration + off-delay ≤ on-delay.
Response of the 2PULSE to a pulse duration that is too short:
● ERR_PULS is set.
● The current on-delay is deleted.
● The off-delay is not started.
● The signal level at the digital output DO remains at 0.
ERR_PULS is deleted at the next positive edge on the digital input DI.

3XOVHGXUDWLRQ

',GLJLWDOLQSXW
2IIGHOD\

2QGHOD\


'2GLJLWDORXWSXW 

Figure 5-12 The Pulse Duration Is Too Short

The Interpulse Period of the Digital Input DI Is Too Short


The 2PULSE detects an interpulse period that is too short on the positive edge on the digital
input DI if:
Interpulse period + on-delay ≤ off-delay.
Response of the 2PULSE to an interpulse period that is too short:
● ERR_PULS is set.
● The current off-delay is deleted.
● The on-delay is not started.
● The signal level at the digital output DO remains at 1.
ERR_PULS is deleted with the next negative edge on the digital input DI.

',GLJLWDOLQSXW ,QWHUSXOVHSHULRG

2QGHOD\

2IIGHOD\

',GLJLWDOLQSXW



Figure 5-13 The Interpulse Period Is Too Short

Technological Functions
302 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.3 Modes and Functions

Retriggering the Current On-Delay


The 2PULSE starts a new on-delay on the positive edge on the digital input DI if:
On-delay > pulse duration + interpulse period
This deletes the current off-delay.
The digital output DO is only set if signal level 1 is present on the digital input DI longer than
the on-delay. This enables you to filter rapid pulse trains.

3XOVH ,QWHUSXOVH
GXUDWLRQ SHULRG
',GLJLWDOLQSXW

2IIGHOD\

2QGHOD\

5HWULJJHU

'2GLJLWDORXWSXW

Figure 5-14 Retriggering the Current On-Delay

Retriggering the Current Off-Delay


The 2PULSE starts a new off-delay on the negative edge on the digital input DI if:
Off-delay > pulse duration + interpulse period.
This deletes the current on-delay.
The digital output DO is only deleted if signal level 0 is present on the digital input DI longer
than the off-delay.

3XOVH ,QWHUSXOVH
GXUDWLRQ SHULRG

',GLJLWDOLQSXW

2IIGHOD\
5HWULJJHU

2QGHOD\ 2QGHOD\

'2GLJLWDORXWSXW

Figure 5-15 Retriggering the Current Off-Delay

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 303
2PULSE
5.3 Modes and Functions

Setting Times Using a Time Base


Use the assigned time base to select the resolution and the value range of the on-delay and
the off-delay.

Time base = 0.1 ms: You can set times from 0.2 ms to 6.5535 s with a resolution of 0.1 ms.
Time base = 1 ms: You can set times from 1 ms to 65.535 s with a resolution of 1 ms.

Setting and Changing the On-Delay


You specify the on-delay as a value between 0 and 65535 in the parameters.
Assigned on-delay = time base x set numerical value
Using the factor for the on-delay, you can adjust the assigned time in your control program.
Set the factor between 0 and 255, with a weighting of 0.1:
On-delay = factor x 0.1 x assigned on-delay
If you change the on-delay factor, the new on-delay is activated with the next positive edge
on the digital input DI.

Setting and Changing the Off-Delay


Set the off-delay directly as a numerical value between 0 and 65535 in your control program.
Off-delay = time base x set numerical value
If you change the off-delay factor, the new off-delay is activated with the next negative edge
on the digital input DI.

Parameters for the On/Off-Delay Mode

Parameter Meaning Value Range Default


Mode Set the on/off-delay mode. • Pulse output Pulse output
• Pulse-width modulation
• Pulse train
• On/off-delay
Time base Use the time base to select the • 0.1 ms 0.1 ms
resolution and the value range • 1 ms
of the on-delay and off-delay.
On-delay The time between a positive With time base 0.1 ms: 0
edge of digital input DI and its 0 to 65535
output on the digital output DO. With time base 1 ms:
You can change the on-delay 0 to 65535
with your control program.

Technological Functions
304 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.3 Modes and Functions

Control and Feedback Signals of On/Off-Delay Mode

Control and Feedback Meaning Value Range Channel 0 Channel 1


Signals address address
Control signals
Software enable You must always issue the 0 = SW_ENABLE canceled Byte 2: Byte 6:
(SW_ENABLE) software enable in your control 1 = SW_ENABLE set Bit 0 Bit 0
program. If you cancel the
software enable, the current
output sequence will be canceled.
Off-delay The time between a negative edge With time base 0.1 ms: Word 0 Word 4
of the digital input DI and its output 2 to 65535
on the digital output DO. With time base 1 ms: 1 bis 65535
If you violate the lower limit of the
range, the off-delay will not
function.
On-delay factor You can change the assigned on- Factor: 0 to 255 Byte 3 Byte 7
delay: On-delay:
On-delay = factor x 0.1 x assigned 0.2 ms to 65.535 s
on-delay
If the on-delay is < 0.2 ms or if the
factor = 0, the effective on-delay =
0. If the on-delay is > 65.535 s, the
on-delay is limited to 65.535 s.
Feedback signals
STS_ENABLE Indicates the status of the 0 = software enable blocked Byte 0: Byte 4:
software enable (SW_ENABLE). 1 = software enable issued Bit 0 Bit 0
STS_DO Indicates the signal level on the 0 = signal 0 on digital output DO Byte 0: Byte 4:
digital output DO. 1 = signal 1 on digital output DO Bit 1 Bit 1
Note the update rate.
STS_DI Indicates the signal level on digital 0 = signal 0 on digital input DI Byte 0: Byte 4:
input DI. 1 = signal 1 on digital input DI Bit 2 Bit 2
ACK_SW_ENABLE Indicates the status of 0 = SW_ENABLE canceled Byte 0: Byte 4:
SW_ENABLE. 1 = SW_ENABLE set Bit 3 Bit 3
ERR_PULS Indicates a pulse output error if the 0 = no pulse output error Byte 0: Byte 4:
pulse duration or interpulse period 1 = pulse output error Bit 4 Bit 4
is too short.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 305
2PULSE
5.3 Modes and Functions

Input and Output Signals for On/Off-Delay Mode

Input and Output Signals Meaning Value Range Channel 0 Channel 1


terminal terminal
Input signal
Digital input DI The signal of the digital input 0 = no pulse 1 5
DI is output with an on/off- 1 = pulse
delay on digital output DO by
the 2PULSE.
Output signal
Pulse on the digital output DO The signal of the digital input 0 = no signal 4 8
DI is output with an on/off- 1 = signal
delay on digital output DO by
the 2PULSE.

Technological Functions
306 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.3 Modes and Functions

5.3.6 Function: Direct Control of the DO Digital Output

Definition
You can directly control the digital output DO of the 2PULSE to test the actuator you have
connected. To do this, you have to select the function from your control program with the
MANUAL_DO control bit set and with the SW_ENABLE control bit deleted.
After you have selected the function, the feedback bits STS_ENABLE and ERR_PULS are
deleted by the 2PULSE, and an active output sequence is canceled.
You specify the reset the status of the digital output DO with the SET_DO control bit.
When you delete the MANUAL_DO control bit, you deselect the function for the direct control
of the digital output DO. This deletes the digital output DO. You will then have to restart the
output sequence.

Control and Feedback Signals/Output Signal

Signals Meaning Value Range Channel 0 Channel 1


address address
Control signals
SW_ENABLE To select the function, the control 0 = SW_ENABLE canceled Byte 2: Byte 6:
bit must be deleted. 1 = SW_ENABLE set Bit 0 Bit 0
MANUAL_DO You can select and deselect the 0 = direct control of the DO not Byte 2: Byte 6:
function with the control bit. selected. Bit 1 Bit 1
1 = direct control of the DO
selected.
SET_DO You use the control bit to set the 0 = signal 0 on digital output DO Byte 2: Byte 6:
status of the digital output DO. 1 = signal 1 on digital output DO Bit 2 Bit 2
Feedback signals
STS_ENABLE Deleted after the function has 0 = pulse output blocked Byte 0: Byte 4:
been selected. 1 = pulse output running Bit 0 Bit 0
STS_DO Indicates the signal level on the 0 = signal 0 on digital output DO Byte 0: Byte 4:
digital output DO. 1 = signal 1 on digital output DO Bit 1 Bit 1
Note the update rate.
STS_ DI Indicates the signal level on digital 0 = signal 0 on digital input DI Byte 0: Byte 4:
input DI. 1 = signal 1 on digital input DI Bit 2 Bit 2

Output signal Meaning Value Range Channel 0 Channel 1


terminal terminal
Digital output DO The status preset with the 0 = no signal 4 8
SET_DO control bit is output on 1 = signal
the digital output DO.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 307
2PULSE
5.3 Modes and Functions

5.3.7 Function: Error Detection/Diagnostics

Parameter Assignment Error ERR_PARA


If the 2PULSE cannot identify the parameters as its own, it generates a parameter
assignment error. The two channels are then not assigned parameters.
The 2PULSE slot you configure must match the setup.
Make sure that you only set the 2PULSE parameters that have been described.

Pulse Output Error ERR_PULS


The 2PULSE detects a channel-specific pulse output error in the pulse output, on/off-delay,
and pulse train modes.
You will find information about causes and responses in the respective operating mode
descriptions and the technical specifications for programming.
The pulse output error detected is displayed for the relevant channel with the ERR_PULS
feedback bit.

Encoder Supply Short Circuit ERR_24V


The 2PULSE detects a short circuit in the encoder supply that it makes available at terminals
2 and 6.
The short circuit error detected is displayed for the two channels with the ERR_24V feedback
bit.

Short Circuit of the Digital Output ERR_DO


The 2PULSE detects a short circuit on the digital output of the channel. To do this, you must
enable Diagnostics DO in the parameters.
The short circuit detected is displayed for the relevant channel with the ERR_DO feedback
bit.

Diagnostic Message
In the event of parameter assignment errors or a short circuit in the encoder supply or in the
digital output, 2PULSE generates a diagnostic message for the connected CPU/master. To
do this, you must enable the Group diagnostics parameter.

Technological Functions
308 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.3 Modes and Functions

Parameters

Parameter Meaning Value Range Default


Group diagnostics When group diagnostics has Disable/enable Disable
been enabled, the 2PULSE
generates a diagnostic
message for the
CPU/master.
Diagnostics DO The 2PULSE detects a short Off/on Off
circuit of the digital output
DO when Diagnostics DO=
on.

Feedback Signals

Feedback Signals Meaning Value Range Channel 0 Channel 1


address address
ERR_PARA Indicates a parameter 0 = no parameter assignment Byte 0: Byte 4:
assignment error. error Bit 5 Bit 5
1 = parameter assignment error
ERR_PULS Indicates a pulse output error. 0 = no pulse output error Byte 0: Byte 4:
1 = pulse output error Bit 4 Bit 4
ERR_24V Indicates a short circuit of the 0 = no encoder supply short Byte 0: Byte 4:
encoder supply. circuit Bit 7 Bit 7
1 = encoder supply short circuit
ERR_DO Indicates a short circuit of the 0 = no digital output short circuit Byte 0: Byte 4:
digital output DO. To do this, you 1 = digital output short circuit Bit 6 Bit 6
must enable Diagnostics DO.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 309
2PULSE
5.3 Modes and Functions

5.3.8 Behavior at CPU-Master-STOP

Definition
You can assign parameters to what the 2PULSE is to do in the event of the failure of the
parent controller for the two channels together.

Behavior at CPU-Master-STOP Channel-Specific Response and the Status of the 2PULSE


Turn off DO Delete the DO digital output
Delete STS_ENABLE and
Terminate the current output sequence
Continue working mode The DO digital output remains unchanged
STS_ENABLE remains unchanged
The current output sequence is continued
DO substitute a value Output of the channel-specific, substitute value that has been assigned parameters of
the DO digital output
Delete STS_ENABLE and
Terminate the current output sequence
DO keep last value The DO digital output remains unchanged
Delete STS_ENABLE and
Terminate the current output sequence

Startup
To start a new output sequence after CPU/master STOP and after ACK_SW_ENABLE has
been set, first delete SW_ENABLE, and repeat this deletion until ACK_SW_ENABLE has
also been deleted.
If the mode is to continue during a change from CPU-/Master-STOP to RUN (startup), the
CPU/Master cannot clear the outputs. Possible solution: In the part of the user program that
is processed during startup, set the software enable control bit (SW_ENABLE=1), and write
the values to the 2PULSE.

Modified Parameter Assignment


The status assumed by the 2PULSE at CPU/master STOP remains even in the case of
parameter assignment or configuration of the ET 200S station. This occurs, for example, at
power-up of the CPU/master or the IM 151 or at the resumption of DP transfer.
In "Continue working mode", however, and after a modified parameter assignment or
configuration of the ET 200S station has been downloaded to the CPU/master, the 2PULSE
terminates the process. As a result, the 2PULSE does the following:
● Deletes the DO digital output.
● Deletes STS_ENABLE.
● Terminates the current output sequence.

Technological Functions
310 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.4 Application Examples

5.4 Application Examples

5.4.1 Overview

Introduction
The following application examples give you an overview of possible uses for the 2PULSE in
different processes.
You use the 2PULSE in various modes according to your process-related requirements.
The table below presents the possible modes for selected technological processes:

Applications/Technological Processes Mode


Filling of liquids Pulse output
Heating a liquid Pulse-width modulation
Packing piece goods Pulse train
Applying a protective layer On/off-delay
Due to the highly complex nature of these technological processes, each application
example only represents part of a process.
This part illustrates the principle method of operation of the 2PULSE for the selected task.
Assumed prerequisites allow you to evaluate how you can use the 2PULSE optimally in your
process.

Additional Applications
Other possible uses are described in this section.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 311
2PULSE
5.4 Application Examples

5.4.2 Example: Filling Liquids

Task
Filling is started as soon as a container is under the valve. The valve is opened for a preset
pulse duration by means of the 24 V control signal. The amount of liquid is proportional to
the specified pulse duration.
The 2PULSE generates the 24 V control signal at its digital output for the pulse duration you
have specified. After it has been filled, the container is moved along.

3XPS

9FRQWUROVLJQDO
IURP38/6(
9DOYH

,QLWLDWRU
9HQDEOHVLJQDO
WR38/6(

Figure 5-16 Filling Liquids

(1) Valve
(2) Pump
(3) 24 V control signal from the 2PULSE
(4) 24 V enable signal to the 2PULSE
(5) Initiator

Technological Functions
312 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.4 Application Examples

Requirements
● The volume of liquid to be filled is proportional to the time the valve is open.
● The cross-section of the feeder pipe cannot be changed.
● The valve only has the two positions OPEN and CLOSED.
● The minimum pulse duration must be longer than the on/off times specified by the
manufacturer.

Pulse Output Mode


Use channel 0 of the 2PULSE in pulse output mode for the filling process. In this mode, the
2PULSE generates a pulse at the DO digital output (24 V control signal) for the specifiable
pulse duration to control the valve.

Procedure
1. Starting filling process: To start the process, use the software enable (SW_ENABLE) on
your control program. The 2PULSE uses the 24 V enable signal (DI digital input) to check
whether the container is correctly positioned. Then open the valve using the control
program (SW_ENABLE 0→1) and start the filling process.
2. Monitoring filling process: The error detection/diagnostic function allows you to check in
the program that the process is running correctly.
3. Terminating filling process: You can find out when the process has finished in the
program by evaluating STS_ENABLE.

9HQDEOHVLJQDO
',GLJLWDOLQSXW

6RIWZDUHHQDEOH
6:B(1$%/(

9FRQWUROVLJQDO
'2GLJLWDORXWSXW

676B(1$%/(

3XOVHGXUDWLRQ PV

&RQWDLQHULV )LOOLQJVWDUWV )LOOLQJHQGV &RQWDLQHULV


SRVLWLRQHG PRYHGDZD\

Figure 5-17 Flow Diagram for the Filling Process

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 313
2PULSE
5.4 Application Examples

Parameters
The following parameters are required for channel 0 of the 2PULSE to fill liquids in pulse
output mode.

Table 5-1 Parameter List for the Filling Process

Parameters Set Value Meaning


Group diagnosis Enable The following errors trigger a diagnostic
message:
• Short circuit - DO digital output
• Short circuit of the sensor supply
• Parameter Assignment Error
Diagnostics DO 0 On The 2PULSE detects the short circuit error at
the DO 0 digital output.
Behavior at CPU-Master-STOP Turn off DO1
Mode Pulse output
Time base 1 ms All the preset times are specified at a
resolution of 1 ms.
DI function 0 Input The digital input is used to establish whether
the container is correctly positioned.
On-delay 0 The valve is opened immediately with
SW_ENABLE = 1
The additional parameters of channel 0 of the 2PULSE have no effect on the pulse output
mode.
The parameters for channel 1 are not relevant in this application example.

Technological Functions
314 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.4 Application Examples

STL program
Below you will find a section from a STEP 7 STL program.
The configured start address of the inputs and outputs of the 2PULSE is 256.
You use this part of the program to start the filling process. To do this, memory marker
M30.0 must be set.
The pulse duration in this example is 5000 ms.

STL Description
Block:

L PEB256 Read the feedback messages from channel 0 of the 2PULSE


T MB20

L 5000 Write a pulse duration of 5000 ms to channel 0 of the 2PULSE


T PAW256

L 0 Generate SW_ENABLE
T MB10
U M20.2 Container is positioned
U M30.0 Start of the filling process
= M10.0 Set SW_ENABLE=1

L MB10 Write control signals to channel 0 of the 2PULSE


T PAB258

Wiring/Terminal Assignment Diagram


38/6(

6)

70(6DQG
38/6(

 
&KDQQHO   &KDQQHO
(6
''$%

9HQDEOHVLJQDO
 
', ',
,QLWLDWRU
9'&   9'&
9FRQWUROVLJQDO
0   0
9DOYH
 
'2 '2

Figure 5-18 Terminal Assignment of the 2PULSE for Filling Liquids

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 315
2PULSE
5.4 Application Examples

5.4.3 Example: Heating a Liquid

Description
A liquid is heated with an electrical heating element. The energy needed to do this is
supplied to the heating element by a switching element (a contactor, for example).
The 2PULSE generates a 24 V control signal on its digital output for the switching element.
The temperature of the heating element is determined by the on/off length of the 24 V control
signal.
The longer the 24 V control signal is switched on, the longer the heating process and
therefore the greater the rise in temperature of the fluid.

9FRQWUROVLJQDO
IURPWKH38/6(
(OHFWULFDOKHDWLQJ
HOHPHQW

Figure 5-19 Heating a Liquid

Requirements
● The heating element only has two switching states: ON or OFF.
● The actual heating current corresponds to the ratio of the on/off duration of the 24 V
control signal.
● The minimum pulse or minimum interpulse period must be greater than the response
times of the switching element and heating element.

Pulse-Width Modulation (PWM) Mode


Use channel 0 of the 2PULSE in pulse-width modulation mode to control the heating
element. In this mode, the 2PULSE generates a pulse train on the digital output DO (24 V
control signal) with a specifiable ratio of pulse duration/period to control the switching
element.

Technological Functions
316 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.4 Application Examples

Sequence
1. Starting heating process: To start the heating process, use the software enable
(SW_ENABLE) in your control program.
2. Monitoring heating process: The error detection/diagnostic function allows you to check
via the program that the heating element is being controlled correctly.

Software enable
(SW_ENABLE)

24 V control signal
(DO digital output)

STS_ENABLE

Heating
process starts

Figure 5-20 Flow Diagram for Heating a Liquid

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 317
2PULSE
5.4 Application Examples

Parameters
The following parameters are required for channel 0 of the 2PULSE to heat a liquid in pulse-
width modulation mode.

Table 5-2 Parameter List for Heating a Liquid

Parameter Set Value Meaning


Group diagnostics Not enabled The following errors trigger a diagnostic
message:
• Short circuit of digital output
• Short circuit of the encoder supply
• Parameter assignment error
Diagnostics DO 0 On The 2PULSE detects the short circuit error on
the digital output DO 0.
Behavior at CPU/Master-STOP Turn off DO 0
Mode Pulse-width modulation
PWM output format Per mill The output value is specified in [‰] (0 to 1000)
Time base 1 ms All the preset times are specified at a resolution
of 1 ms.
Function DI 0 Input The digital input is not required for this
application
On-delay 0 The 24 V control signal is immediately output
with SW_ENABLE=1
Minimum/pulse duration 500 Minimum pulse duration:
This is 500 ms in the selected time base; this
also applies to the minimum interpulse period
Period 30000 This is 30 s in the selected time base
The additional parameters of channel 0 of the 2PULSE have no effect on pulse-width
modulation mode.
The parameters for channel 1 are not relevant in this application example.

Technological Functions
318 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.4 Application Examples

Programming/Flow Diagram
Below you will find a section from a STEP 7 STL program.
The configured start address of the inputs and outputs of the 2PULSE is 256.
This program section starts the heating process. To do this, memory bit M30.0 must be set.
You provide the output value in memory word MW32.

STL Description
Block:

L PEB256 Read the feedback messages from channel 0 of the 2PULSE


T MB20

L MW32 Write output value to channel 0 of the 2PULSE


T PAW256

L 10 Write period factor 10 x 0.1 to channel 0 of the 2PULSE


T PAB259

L 0 Generate control signal SW_ENABLE


T MB10
U M30.0 Start of heating process
= M10.0 Set SW_ENABLE=1

L MB10 Write control signals to channel 0 of the 2PULSE


T PAB258

Wiring/Terminal Assignment Diagram


38/6(

6)

70(6DQG
38/6(

 
&KDQQHO  
&KDQQHO
(6
''$%

',   ',

9'&   9'&
9FRQWUROVLJQDO
0   0
&RQWDFWRU
'2   '2

Figure 5-21 Terminal Assignment of the 2PULSE for the Heating of a Liquid

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 319
2PULSE
5.4 Application Examples

Additional Applications
Limit-value monitoring of the temperature: To monitor the limits of the temperature of the
medium, use a temperature sensor evaluated by an analog module. You can monitor the
temperature with your control program.
Temperature control: To control the temperature of the medium, use a temperature sensor
evaluated by an analog module. You can use one of the software controllers of SIMATIC S7
to do this. Pass on the manipulated variable calculated by the software closed-loop controller
directly to the 2PULSE using your control program. If you require separate actuators for
heating and cooling, use the second channel of the 2PULSE. If you detect a negative
manipulated variable in your control program, pass on the value to the second channel of the
2PULSE.
Heating up a liquid with a heat exchanger: Basic actuators that only have two end settings
(OPEN/CLOSED) create an almost continuous manipulated variable through the control of
the 24 V control signal. This will enable you to control, for example, the flow through a heat
exchanger using a solenoid valve.

+HDWH[FKDQJHU 6ROHQLGYDOYH

9FRQWUROVLJQDO
IURPWKH38/6(

Figure 5-22 Using a Solenoid Valve to Control the Flow

Technological Functions
320 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.4 Application Examples

5.4.4 Example: Packing Piece Goods

Description
Packing is started as soon as a folding box from conveyor 1 is in the correct position. The 24
V control signal controls the pusher and, when the compartmentalized conveyor is in
operation, pushes the piece goods into the folding box. Each pulse corresponds to a
complete movement of the pusher. The next movement of the pusher begins at the next
pulse from the pulse train.
The number of items that have to be packed corresponds to the number of output pulses.
The 2PULSE generates the 24 V control signal on its digital output DO with the number of
pulses you have specified. After the piece goods have been packed, the folding box is
moved on.
Counting begins from the start again when a new folding box passes the initiator.

9FRQWUROVLJQDO
IURPWKH38/6(
/RFNLQJPHFKDQLVP

&RPSDUWPHQWDOL]HG
FRQYH\RU

)ROGLQJ )ROGLQJ )ROGLQJ


ER[ ER[ ER[

&RQYH\RU ,QLWLDWRU
9HQDEOHVLJQDO
WRWKH38/6(

Figure 5-23 Packing Piece Goods

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 321
2PULSE
5.4 Application Examples

Requirements
● Identical piece goods
● Repetition rate depends on the conveyor behavior
● Constant speed of the compartmentalized conveyor during pulse output
● The pulse duration and interpulse period must be longer than the response time of the
pusher.

Pulse Train Mode


Use channel 0 of the 2PULSE in pulse train mode to pack piece goods. In this mode, the
2PULSE generates a specifiable number of pulses on the digital output DO to control the
pusher. The pulse duration and period of the output signal can be adjusted.

Sequence
1. Starting the packing process: To enable the start, use the software enable (SW_ENABLE
0→1) in your control program. The 2PULSE uses the 24 V enable signal (HW enable,
digital input DI) to tell whether the folding box is correctly positioned and then starts the
pusher.
2. Monitoring the packing process: The error detection/diagnostic function allows you to
check via the program that the packing process is running correctly.
3. End of the packing process: By evaluating STS_ENABLE, you can find out when the
preset number of goods has been packed.

9HQDEOHVLJQDO
+:HQDEOH
',GLJLWDOLQSXW

6RIWZDUHHQDEOH
6:B(1$%/(

9FRQWUROVLJQDO
'2GLJLWDORXWSXW

676B(1$%/(

7KHIROGLQJER[
LVLQSRVLWLRQ 3UHVHWQXPEHURI )ROGLQJER[LV
WKHSXVKHU JRRGVSDFNHG PRYHGDZD\
VWDUWV

Figure 5-24 Flow Diagram for the Packing of Piece Goods

Technological Functions
322 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.4 Application Examples

Parameters
The following parameters are required for channel 0 of the 2PULSE to pack piece goods in
pulse train mode.

Table 5-3 Parameter List for the Packing of Piece Goods

Parameter Set Value Meaning


Group diagnostics Enable The following errors trigger a
diagnostic message:
• Short circuit of digital output
• Short circuit of the encoder
supply
• Parameter assignment error
Diagnostics DO 0 On The 2PULSE detects the short
circuit error on the digital output
DO 0.
Behavior at CPU/Master-STOP Turn off DO 0
Mode Pulse train
Time base 1 ms All the preset times are
specified at a resolution of 1 ms.
Function DI 0 HW enable
On-delay 0 The pusher is controlled
immediately with the software
enable.
Minimum pulse duration 500 This is 500 ms in the selected
time base
Period 1000 This is 1 s in the selected time
base. This results in an
interpulse period of 500 ms.
The additional parameters of channel 0 of the 2PULSE have no effect on pulse train mode.
The parameters for channel 1 are not relevant in this application example.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 323
2PULSE
5.4 Application Examples

Programming/Flow Diagram
Below you will find a section from a STEP 7 STL program.
The configured start address of the inputs and outputs of the 2PULSE is 256.
You can use this program section to start the packing process (5 pieces). To do this,
memory bit M30.0 must be set.
The HW enable then starts the pulse train.

STL Description
Block

L PEB256 Read the feedback messages from channel 0 of the 2PULSE


T MB20

L 5 Write the number of pieces (5) to channel 0 of the 2PULSE


T PAW256

L 10 Write period factor 10 x 0.1 to channel 0 of the 2PULSE


T PAB259

L 0 Generate control signal SW_ENABLE


T MB10 Enable the packing process
U M30.0
= M10.0 Set SW_ENABLE=1

L MB10 Write control signals to channel 0 of the 2PULSE


T PAB258

Technological Functions
324 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.4 Application Examples

Wiring/Terminal Assignment Diagram


38/6(

6)

70(6DQG
38/6(

 
&KDQQHO   &KDQQHO
(6
''$%

9HQDEOHVLJQDO
 
', ',
,QLWLDWRU
9'&   9'&
9FRQWUROVLJQDO
0   0
/RFNLQJ
PHFKDQLVP
 
'2 '2

Figure 5-25 Terminal Assignment of the 2PULSE for the Packing of Piece Goods

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 325
2PULSE
5.4 Application Examples

5.4.5 Example: Applying a Protective Layer

Task
Metal parts are to be covered with a wax layer. The conveyor belt moves at a constant
speed. As soon as a metal part passes the initiator, the valve is opened. The distance the
item and the wax have to cover is proportional to the time.
The 2PULSE receives a 24 V enable signal from the initiator. The 2PULSE then generates a
24 V control signal at its digital output that opens the valve. The valve remains open while
the Initiator sends the 24 V enable signal to the 2PULSE.
To ensure that the wax hits the metal at the optimum time, a corresponding on/off-delay is
required.

3XPS

9FRQWUROVLJQDO
IURPWKH38/6(
9DOYH

,QLWLDWRU 9HQDEOHVLJQDOWR
WKH38/6(

Figure 5-26 Applying a Protective Layer

(1) Valve
(2) Pump
(3) 24 V control signal from the 2PULSE
(4) 24 V enable signal to the 2PULSE
(5) Initiator

Technological Functions
326 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.4 Application Examples

Requirements
● The item is moved at a constant and quantifiable speed. (The distance is proportional to
the time.)
● The valve only has the two positions OPEN and CLOSED.
● The minimum pulse duration must be longer than the on/off times specified by the
manufacturer.

On/Off-Delay Mode
Use channel 0 of the 2PULSE in on/off-delay mode to control the valve. In this mode, the
2PULSE generates a 24 V control signal at its DO digital output to control the valve. This
24 V control signal is switched on and off with the 24 V enable signal.

Procedure
1. Starting process: To start the process, use the software enable (SW_ENABLE) on your
control program. The 2PULSE uses the 24 V enable signal (DI digital input) to check
whether a metal object is positioned at the initiator. The valve is opened on expiration of
the on-delay. If the metal object goes past the initiator, the valve is closed after the
off-delay has expired.
2. Monitoring process: The error detection/diagnostic function allows you to check by means
of a program that the valve is being controlled correctly.
3. Terminating process: You can tell on the program by evaluating the STS_DO (status of
the 24 V control signal) when the process has ended.

6RIWZDUHHQDEOH
6:B(1$%/(

9HQDEOHVLJQDO
',GLJLWDOLQSXW

9FRQWUROVLJQDO
'2GLJLWDORXWSXW

676B(1$%/(

0HWDOREMHFW 9DOYHRSHQ 0HWDOREMHFW &ORVHYDOYH


DWWKHLQLWLDWRU SDVWWKHLQLWLDWRU

Figure 5-27 Flow Diagram for Applying a Protective Layer

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 327
2PULSE
5.4 Application Examples

Parameters
The following parameters are required for channel 0 of the 2PULSE to apply a protective
layer in on/off-delay mode.

Table 5-4 Parameter List for Applying a Protective Layer

Parameters Set Value Meaning


Group diagnosis Enable The following errors trigger a
diagnostic message:
• Short circuit - digital output
and
• Short circuit of the sensor
supply
• Parameter Assignment Error
Diagnostics DO 0 On The 2PULSE detects the short
circuit error at the DO 0 digital
output.
Behavior at CPU-Master-STOP Turn off DO
Mode On/off-delay
Time base 1 ms All the preset times are
specified at a resolution of 1 ms.
On-delay 500 The valve is switched on after
an on-delay of 500 ms.
The additional parameters of channel 0 of the 2PULSE have no effect on on/off-delay mode.
The parameters for channel 1 are not relevant in this application example.

Technological Functions
328 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.4 Application Examples

STL program
Below you will find a section from a STEP7 STL program.
The configured start address of the inputs and outputs of the 2PULSE is 256.
You use this part of the program to start the process. To do this, memory marker M30.0 must
be set. Set up the off-delay in memory word MW32.

STL Description
Block:
L PEB256 Read the feedback messages from channel 0 of the 2PULSE
T MB20

L MW32 Write off-delay to channel 0 of the 2PULSE


T PAW256

L 10 Write on-delay factor 10 x 0.1 to channel 0 of the 2PULSE


T PAB259

L 0 Generate SW_ENABLE control signal


T MB10
U M30.0 Heating process starts
= M10.0 Set SW_ENABLE=1

L MB10 Write control signals to channel 0 of the 2PULSE


T PAB258

Wiring/Terminal Assignment Diagram


38/6(

6)

70(6DQG
38/6(

 
&KDQQHO   &KDQQHO
(6
''$%

9HQDEOHVLJQDO
 
', ',
,QLWLDWRU
9'&   9'&
9FRQWUROVLJQDO
0   0
9DOYH
 
'2 '2

Figure 5-28 Terminal Assignment of the 2PULSE for Applying a Protective Layer

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 329
2PULSE
5.5 Technical Specifications of the 2PULSE, Terminal Assignment

5.5 Technical Specifications of the 2PULSE, Terminal Assignment

Overview

Dimensions and Weight


Dimensions W x H x D (mm) 15x81x52
Weight Approx. 40 g
Data for Specific Modules
Number of Channels 2
Voltage, Currents, Potentials
Rated load voltage L+ (from the power module) 24 VDC
• Reverse polarity protection Yes 1)
Galvanic isolation
• Between the channels No
• Between the channels and backplane bus Yes
Permissible potential difference
• Between different circuits 75 VDC, 60 VAC
Insulation tested with 500 VDC
Sensor supply
• Output voltage L+ -0.8V
• Output current max. 500 mA, short-circuit proof
Current input
• From the backplane bus max. 10 mA
• From load voltage L+ (no load) max. 40 mA
Power dissipation of the 2PULSE Typ. 1.8 W
Data for the Digital Inputs
Input voltage
• Rated value 24 VDC
• With signal "1" 11 V to 30 V
• With signal "0" -30 V to 5 V
Input current
• With signal "1" 9 mA (typically)
Minimum pulse duration/interpulse period 25 µs
Maximum response time 100 µs
Input characteristic To IEC 1131, Part 2, Type 2
Connection of 2-wire BEROs Possible
• Permitted residual current ≤ 2 mA
Shielded cable length Max. 100 m

Technological Functions
330 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.5 Technical Specifications of the 2PULSE, Terminal Assignment

Dimensions and Weight


Data for the Digital Outputs
Output voltage
• With signal "1" Minimum L+ - 1 V
Output current
• With signal "1"
– Rated value 2 A 2)
– Permitted Range 7 mA...2 A
• With signal "0" (leakage current) max. 0.5 mA
Minimum pulse duration 200 µs
Accuracy ± (pulse duration x 100 ppm) ±100 µs 3)
Output delay (with resistive load)
• At "0" to "1" max. 100 µs
• At "1" to "0" max. 200 µs
Lamp load Maximum 10 W
Control of a digital input Yes
Switching frequency
• With resistive load 2.5 kHz
• With inductive load ≤2 Hz
• With lamp load ≤10 Hz
Limitation (internal) of the inductive circuit L+ -(50 V ... 65 V)
interruption voltage
Short-circuit protection for output Yes
• Response threshold Typically 10 A
Cable lengths
• Unshielded 600 m
• Shielded 1000 m
Status, Interrupts, Diagnostics
Status indicators Green LED for DI 0, DI 1, DO 0, DO 1
Diagnostic functions
• Group error Red LED "SF"
• Diagnostic information readable Yes
Update rate for feedback messages 1.2 ms
1 Polarity reversal can lead to the digital outputs being switched through.
2 See the figures below
3 With a load of ≤ 50 Ω

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 331
2PULSE
5.5 Technical Specifications of the 2PULSE, Terminal Assignment

The figures below show you the output current in relation to the ambient temperature and the
frequency.



N+]!PV

N+]PV


&XUUHQW>$@

N+]wV

 N+]wV




  

$PELHQWWHPSHUDWXUH>r&@

Figure 5-29 Resistive Load - Both Channels PWM 50/50



 N+]!wV
N+]wV
N+]wV



&XUUHQW>$@




  

$PELHQWWHPSHUDWXUH>r&@

Figure 5-30 Resistive Load - Only Channel 1 PWM 50/50

Technological Functions
332 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.5 Technical Specifications of the 2PULSE, Terminal Assignment

Terminal Assignment
The following table shows the terminal assignment for the 2PULSE.

View Terminal Assignment Meaning


Channel 0: Terminal 1 to 4
Channel 1: Terminal 5 to 8
38/6(

6) 24 VDC: Sensor supply


M: Chassis ground
70(6DQG DI: Input Signal
38/6( DO: Output Signal
(Maximum 2 A per channel)
 
&KDQQHO   &KDQQHO
(6
''$%

 
', ',

9'&   9'&

0   0

 
'2 '2

Wiring Rules
The cables (terminals 1 and 2 and terminals 5 and 6) must be shielded. The shield must be
supported at both ends. To do this use the shield contact (see the ET 200S Distributed I/O
System manual in the Appendix).

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 333
2PULSE
5.6 Technical Specifications for Programming, Reference Lists

5.6 Technical Specifications for Programming, Reference Lists

Assignment of the Control interface

Address Assignment
Channel 0 Channel 1
Word 0 Word 4 Depending on the mode
• Pulse output: Pulse duration
• Pulse-width modulation: Output value
• Pulse train: Number of pulses
• On/off-delay: Off-delay
Byte 2 Byte 6 Bit 7: Reserve = 0
Bit 6: Reserve = 0
Bit 5: Reserve = 0
Bit 4: Reserve = 0
Bit 3: Reserve = 0
Bit 2: SET_DO
Bit 1: MANUAL_DO
Bit 0: SW_ENABLE
Byte 3 Byte 7 Depending on the mode
• Pulse output: On-delay factor
• Pulse-width modulation: Period duration factor
• Pulse train: Period duration factor
• On/off-delay: On-delay factor

Assignment of the Feedback interface

Address Assignment
Channel 0 Channel 1
Byte 0 Byte 4 Bit 7: ERR_24V
Bit 6: ERR_DO
Bit 5: ERR_PARA
Bit 4: ERR_PULS
Bit 3: ACK_SW_ENABLE
Bit 2: STS_ DI
Bit 1: STS_DO
Bit 0: STS_ENABLE

Technological Functions
334 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.6 Technical Specifications for Programming, Reference Lists

Notes on the Control Signals

Control Signal Notes


Pulse output mode:
• Pulse duration The time that is set for the DO digital output on expiration of the on-
delay.
• On-delay factor You can change the on-delay that has been assigned parameters before
the start of the output sequence:
On-delay = factor x 0.1 x on-delay that has been assigned parameters
Pulse-width modulation mode:
• Output value Value that is output with pulse-width modulation at the DO digital output
on expiration of the on-delay.
• Period duration factor You can change the period duration that has been assigned parameters:
Period duration = factor x 0.1 x period duration that has been assigned
parameters
Pulse train mode:
• Number of pulses Number of pulses that are output at the DO digital output on expiration of
the on-delay.
• Period duration factor You can change the period duration that has been assigned parameters
before the start of the output sequence:
Period duration = factor x 0.1 x period duration that has been assigned
parameters
On/off-delay mode:
• Off-delay
The time between a negative edge at the DI digital input and its output at
• On-delay factor the DO digital output.
You can change the on-delay that has been assigned parameters before
the start of the output sequence:
On-delay = factor x 0.1 x on-delay that has been assigned parameters
Direct control of the digital output
• MANUAL_DO You use the control bit to select and deselect the function for directly
controlling the digital output.
• SET_DO You use the control bit to set the status of the DO digital output.
Software enable (SW_ENABLE) You must always issue the software enable in your control program. If
you don't use a HW enable, the output sequence will be started by the
positive edge of the software enable. If you delete the software enable,
the current output sequence will be terminated.

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 335
2PULSE
5.6 Technical Specifications for Programming, Reference Lists

Notes on the Feedback Bits

Feedback Bits Notes


ACK_SW_ENABLE Indicates the status of the software enable pending at the 2PULSE.
ERR_24V Indicates a short circuit of the sensor supply.
ERR_DO Indicates a short circuit at the digital output. To do this, you must switch on DO diagnostics.
ERR_PARA Indicates a parameter assignment error.
ERR_PULS Pulse output mode:
Indicates a pulse output error. If the pulse duration is reduced after expiration of the on-delay
so the time is less than the time already output, this is detected by the 2PULSE.
The 2PULSE deletes the feedback bit ERR_PULS next time the output sequence starts.
Pulse train mode:
Indicates a pulse output error. If the number of pulses is reduced after expiration of the on-
delay and the smaller number of pulses is already output, this is detected by the 2PULSE.
The 2PULSE deletes the feedback bit ERR_PULS next time the output sequence starts.
On/off-delay mode:
Indicates a pulse output error if the pulse duration or interpulse period is too short.
The 2PULSE deletes the ERR_PULS feedback bit at the next positive edge of the software
enable or at the next edge at the DI digital input.
STS_ DI Indicates the signal level at the DI digital input.
STS_DO Indicates the signal level at the DO digital output.
STS_ENABLE Pulse output mode:
Is set at the start of the output sequence until the pulse duration expires. If you delete the
software enable (SW_ENABLE) or the 2PULSE detects a pulse output error (ERR_PULS),
STS_ENABLE is deleted.
Pulse-width modulation (PWM):
Set at start of output sequence. If you delete the software enable (SW_ENABLE),
STS_ENABLE is deleted.
Pulse train mode:
Is set at the start of the output sequence until the output of the last pulse. If you delete the
software enable (SW_ENABLE) or the 2PULSE detects a pulse output error (ERR_PULS),
STS_ENABLE is deleted.
On/off-delay mode:
Indicates the status of the software enable (SW_ENABLE) detected by the 2PULSE.

Access to the Control and Feedback Interface in STEP 7 Programming

Configuration with STEP 7 Using the DDB Configuration with STEP 7 Using
File HWCONFIG
Feedback interface Load instruction (L PEW, for example) Load instruction (L PEW, for example)
Control interface Transfer instruction (T PQW, for example) Transfer instruction (T PQW, for example)

Technological Functions
336 Operating Instructions, 04/2008, A5E00124867-06
2PULSE
5.6 Technical Specifications for Programming, Reference Lists

Parameter List

Parameters Value Range Default


Group diagnosis Disable/enable Disable
Behavior at CPU-master STOP Turn off DO/Continue working Turn off DO
mode/DO substitute a value/DO keep
last value
Channel 0
Diagnostics DO Off/on Off
Substitute value DO 0/1 0
Mode Pulse output/Pulse-width modulation Pulse output
(PWM)/Pulse train/On/off-delay
PWM output format Per mill/S7 analog output module Per mill
Time base 0.1 ms/1 ms 0.1 ms
Function DI Input/HW enable Input
On-delay 0 - 65535 0
Minimum/pulse duration 0 - 65535 0
Period duration 1 - 65535 20000
Channel 1
Diagnostics DO Off/on Off
Substitute value DO 0/1 0
Mode Pulse output/Pulse-width modulation Pulse output
(PWM)/Pulse train/On/off-delay
PWM output format Per mill/S7 analog output module Per mill
Time base 0.1 ms/1 ms 0.1 ms
Function DI Input/HW enable Input
On-delay 0 - 65535 0
Minimum/pulse duration 0 - 65535 0
Period duration 1 - 65535 20000

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 337
2PULSE
5.6 Technical Specifications for Programming, Reference Lists

Technological Functions
338 Operating Instructions, 04/2008, A5E00124867-06
Index

1 B
1Count 5V/500kHz Brief instructions on commissioning
Counting modes, 140 1Count 5V/500kHz, 133
Isochronous mode, 132 1Count24V/100kHz, 19
Operating modes, 138 1SSI, 247
Technical specifications, 240 2PULSE, 277
1Count24V/100kHz
Counting modes, 26
Isochrone mode, 18 C
Measuring modes, 64
Comparison setting, 258
Operating modes, 24
Control and feedback interface
Technical specifications, 125
Accessing with STEP 7 programming, 59, 90, 115,
Terminal Assignment Diagram, 23
172, 206, 232, 269
1Count5V/500kHz
Control interface, 55, 86, 112, 229, 267, 334
Measurement Modes, 178
Count and direction evaluation, 236
Terminal Assignment Diagram, 137
Count and Direction Evaluation, 120
1SSI
Count continuously, 28
Encoder types, 244
Count once, 30
Encoder value detection, 254
Counting modes
In fast mode, 252
Control interface, 55, 168
In standard mode, 252
Feedback interface, 55, 168
Isochronous mode, 246
Normalization, 256
Parameters, 264
D
Technical Specifications, 272
Terminal assignment diagram, 251 Direction detection, 257
Direction reversal, 257

2
2PULSE
E
Application examples, 311 Encoder value detection
On/off-delay, 300 Free-wheeling, 254
Pulse output, 282 Isochronously, 255
Pulse train, 294 Synchronous, 254
PWM, 287 Endless Counting, 142
Technical Specifications, 330
Terminal Assignment, 333

Technological Functions
Operating Instructions, 04/2008, A5E00124867-06 339
Index

F Frequency measurement, 71, 186


Period, 80
Feedback interface, 55, 86, 112, 229, 334
Period measurement, 196
Fast Mode, 270
Rotational speed measurement, 75, 191
Standard mode, 267
Frequency measurement, 71, 184, 186
Frequency Measurement, 69
O
Once-Only Counting, 144
G Output assignment, 268, 270
Gate functions
for position detection, 104, 221
P
in counting modes, 37, 150
in measuring modes, 83, 199 Parameters
1Count24V/100kHz counting modes, 62
1Count24V/100kHz measuring modes, 93
I 1Count24V/100kHz position feedback, 118, 235
for counting modes, 176
Input assignment, 267
for measuring modes, 209
Isochrone mode
Period measurement, 78, 80, 194, 196
1Count24V/100kHz, 18
Periodic Counting, 33, 147
Isochronous mode
Position detection, 103, 220
1Count 5V/500kHz, 132
Position feedback
1SSI, 246
Control interface, 112, 229
Feedback interface, 112, 229
L
Latch Function, 260 R
Rotational speed measurement, 73, 75, 189, 191
M
Measuring T
Frequency, 71, 186
Technical specifications
Period, 78, 80, 196
1Count 5V/500kHz, 240
Rotational speed, 73, 75, 191
1Count24V/100kHz, 125
Measuring modes
1SSI, 272
Control interface, 86, 202
Technical Specifications
Feedback interface, 86, 202
2PULSE, 330
Mode

Technological Functions
340 Operating Instructions, 04/2008, A5E00124867-06

You might also like