Et200s Technological Functions Operating Instructions en en-US PDF
Et200s Technological Functions Operating Instructions en en-US PDF
1
___________________
Preface
2
___________________
1Count24V
SIMATIC
ET 200S
Technological Functions
Operating Instructions
06/2010
A5E00124867-07
3
___________________
1Count5V
4
___________________
1SSI
5
___________________
2PULSE
Legal information
Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent
damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert
symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are
graded according to the degree of danger.
DANGER
indicates that death or severe personal injury will result if proper precautions are not taken.
WARNING
indicates that death or severe personal injury may result if proper precautions are not taken.
CAUTION
with a safety alert symbol, indicates that minor personal injury can result if proper precautions are not taken.
CAUTION
without a safety alert symbol, indicates that property damage can result if proper precautions are not taken.
NOTICE
indicates that an unintended result or situation can occur if the 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 product/system described in this documentation may be operated only by personnel qualified for the specific
task in accordance with the relevant documentation for the specific task, in particular its warning notices and
safety instructions. Qualified personnel are those who, based on their training and experience, are capable of
identifying risks and avoiding potential hazards when working with these products/systems.
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
Industry Sector
Postfach 48 48
90026 NRNBERG
GERMANY
A5E00124867-07
06/2010
Table of contents
1
Preface ...................................................................................................................................................... 7
1Count24V................................................................................................................................................. 9
2.1
Product Overview...........................................................................................................................9
2.2
2.3
2.4
2.5
2.6
2.6.1
2.6.2
2.6.3
2.6.4
2.6.5
2.6.6
2.6.7
2.6.8
2.6.9
2.6.10
2.6.11
Count Modes................................................................................................................................19
Overview ......................................................................................................................................19
Endless Counting.........................................................................................................................21
Once-Only Counting ....................................................................................................................23
Periodic Counting.........................................................................................................................26
Behavior of the Digital Input.........................................................................................................29
Gate Functions in Count Modes ..................................................................................................30
Latch Function .............................................................................................................................32
Synchronization............................................................................................................................35
Behavior Types of the Outputs in Count Modes ..........................................................................37
Assignment of the Feedback and Control Interface for the Count Modes...................................45
Parameter Assignment for the Count Modes...............................................................................52
2.7
2.7.1
2.7.2
2.7.3
2.7.4
2.7.5
2.7.6
2.7.7
2.7.8
2.7.9
2.7.10
2.7.11
2.7.12
2.8
2.8.1
2.8.2
2.8.3
2.8.4
2.8.5
2.8.6
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
Table of contents
2.9
2.9.1
2.9.2
2.9.3
2.9.4
2.9.5
2.9.6
2.9.7
Position feedback........................................................................................................................ 90
Overview ..................................................................................................................................... 90
Position Detection ....................................................................................................................... 92
Gate Functions for Position Detection ........................................................................................ 93
Latch Function............................................................................................................................. 96
Synchronization........................................................................................................................... 99
Assignment of the Feedback and Control Interface for Position Feedback.............................. 101
Assigning Parameters for Position Feedback ........................................................................... 107
2.10
2.11
2.11.1
2.11.2
Diagnostics................................................................................................................................ 111
Diagnostics using the LED display............................................................................................ 111
Error types................................................................................................................................. 112
2.12
2.13
1Count5V............................................................................................................................................... 119
3.1
3.2
3.3
3.4
3.5
3.6
3.6.1
3.6.2
3.6.3
3.6.4
3.6.5
3.6.6
3.6.7
3.6.8
3.6.9
3.6.10
3.6.11
3.7
3.7.1
3.7.2
3.7.3
3.7.4
3.7.5
3.7.6
3.7.7
3.7.8
3.7.9
3.7.10
3.7.11
3.7.12
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
Table of contents
3.8
3.8.1
3.8.2
3.8.3
3.8.4
3.8.5
3.8.6
3.9
3.9.1
3.9.2
3.9.3
3.9.4
3.9.5
3.9.6
3.9.7
Position feedback.......................................................................................................................204
Overview ....................................................................................................................................204
Position detection.......................................................................................................................206
Gate Functions for Position Detection .......................................................................................207
Latch Function ...........................................................................................................................210
Synchronization..........................................................................................................................213
Assignment of the Feedback and Control Interface for Position Feedback ..............................215
Assigning Parameters for Position Feedback............................................................................221
3.10
3.11
3.11.1
3.11.2
Diagnostics.................................................................................................................................224
Diagnostics using the LED display ............................................................................................224
Error types..................................................................................................................................225
3.12
3.13
1SSI....................................................................................................................................................... 231
4.1
Product Overview.......................................................................................................................231
4.2
4.3
4.4
4.5
4.6
4.6.1
4.6.2
4.6.3
4.6.4
4.6.5
4.6.6
4.6.7
4.6.8
4.6.9
4.7
4.8
4.9
4.9.1
4.9.2
Diagnostics.................................................................................................................................254
Diagnostics using the LED display ............................................................................................254
Error types..................................................................................................................................255
4.10
4.11
4.12
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
Table of contents
2PULSE................................................................................................................................................. 265
5.1
5.2
5.3
5.4
5.4.1
5.4.2
5.4.3
5.4.4
5.4.5
5.4.6
5.4.7
5.4.8
5.4.9
5.4.10
5.4.11
5.4.12
5.5
5.5.1
5.5.2
5.6
5.6.1
5.6.2
Diagnostics................................................................................................................................ 321
Diagnostics using the LED display............................................................................................ 321
Error types................................................................................................................................. 322
5.7
5.7.1
5.7.2
5.7.3
5.7.4
5.7.5
5.7.6
5.8
5.9
Index...................................................................................................................................................... 359
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
Preface
Index
The index contains keywords that come up in the manual.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
Preface
Additional support
If you have any further questions about the use of products described in this manual and do
not find the right answers here, contact your local Siemens representative
(http://www.siemens.com/automation/partner):
A guide to the technical documentation for the various products and systems is available on
the Internet:
SIMATIC Guide manuals (http://www.siemens.com/simatic-tech-doku-portal)
The online catalog and online ordering systems are also available on the Internet:
A&D Mall (http://www.siemens.com/automation/mall)
Training center
To help you get started with automation technology and systems, we offer a variety of
courses. Contact your regional Training Center or the central Training Center in D-90327
Nuremberg, Germany.
Internet: SITRAIN homepage (http://www.sitrain.com)
Technical Support
You can access technical support for all A&D projects via the following:
Online support request form: (http://www.siemens.com/automation/support-request)
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.1
Product Overview
Order Number
6ES7 138-4DA04-0AB0
Compatibility
The 1Count24V 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 Instead of 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.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.1 Product Overview
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 update 1
Identification data 1
The following IM 151 modules support this function: IM 151-1 Standard: As of 6ES71511AA04-0AB0 and IM 151-1 High Feature: As of 6ES7 151-1BA01-0AB0
1
Configuration
In order to configure the 1Count24V use one of the following options
STEP 7 V5.3 SP2 or higher, or
HSP (hardware support package, available online) as of STEP 7 Version V5.2 SP1
10
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.1 Product Overview
Firmware update
In order to extend the functionality and eliminate errors, firmware updates can be
downloaded to the operating system memory of the 1Count24V by means of the STEP 7 HW
Config software.
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 will no longer function correctly as a
result. Restart the firmware update and wait until it has completed successfully.
Identification Data 1
Hardware release status
Firmware release status
Serial number
1See
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
11
1Count24V
2.2 Isochronous mode
2.2
Isochronous mode
Note
For basic information on isochronous mode, refer to the Isochronous mode
(http://support.automation.siemens.com/WW/view/en/15218045) function manual.
Hardware Requirements
You will require the following for the 1Count24V in isochronous mode:
A CPU that supports isochrone mode
PROFIBUS master or PROFINET controller that supports the constant bus cycle time
An IM 151 that supports isochrone mode
Features
Depending on the system parameter assignment, the 1Count24V works in either nonisochronous or isochronous mode.
In isochronous mode, data communication between the bus master and 1Count24V is
isochronous to the cycle.
In isochronous mode, all 8 bytes / 12 bytes of the user data interface are consistent.
If a parameter assignment error occurs, the 1Count24V does not go into isochronous mode.
If isochronous mode fails due to faults or failure/delay of global control (GC), the 1Count24V
returns to isochronous 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.
12
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.3 Brief instructions on commissioning the 1Count24V
2.3
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 1Count24V. The counting mode used in this example is "Count
continuously".
Requirements
The following requirements must be satisfied:
You must have put an ET 200S station on an S7 station with a DP master into operation.
You must have the following:
A TM-E15S24-01 terminal module
A 1Count24V,
A momentary contact switch and the necessary wiring material
83
'1
(6
'$$%
Figure 2-1
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
13
1Count24V
2.3 Brief instructions on commissioning the 1Count24V
Description
Block: FC101
Network 1: Presettings
L
DB1.DBD0
DB1.DBD4
SET
S
DB1.DBX4.0
//Open SW gate
DB1.DBD0
PAD 256
DB1.DBW4
PAW 260
14
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.3 Brief instructions on commissioning the 1Count24V
STL
Network 3: Read from the feedback interface
Description
//Read 8 bytes from the 1Count24V
//Configured start address of inputs
PED 256
DB1.DBD8
PED 260
DB1.DBD12
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 is on. The status of the UP LED changes with each new
pulse.
The count value in the block changes.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
15
1Count24V
2.4 Terminal Assignment Diagram
2.4
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 (http://support.automation.siemens.com/WW/view/en/1144348) operating
instructions).
View
Terminal Assignment
Remarks
B: Direction input or track B
A: Pulse input or track A
&RXQW
9N+]
6)
'1
(6
'$$%
%
9'&
0
'2
$
9'&
0
',
Connection
Count Direction
pulses
Up, down
Up, down
16
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.5 Operating modes and application areas of the 1Count24V
2.5
Introduction
To begin with, decide how you want to use the 1Count24V. You can choose between the
following modes:
Counting modes
Measuring modes
Position feedback
Fast mode
Count continuously
Frequency measurement
Position detection
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 in your project in two different ways. Decide whether you want to work with a GSD file or
with STEP 7.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
17
1Count24V
2.5 Operating modes and application areas of the 1Count24V
Note
Fast mode is designed for use in especially short isochronous cycles. You need STEP 7 to
configure isochronous operation.
18
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
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 run one of these modes, you have to assign parameters to the 1Count24V (see section
"Parameter Assignment for the Count Modes (Page 163)").
Load Value
You can specify a load value for the 1Count24V.
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, you have to use the gate functions.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
19
1Count24V
2.6 Count Modes
RESET States
Value
RESET state
Load value
None
Up
Down
0
0
Assigned high counting limit
Count value
None
Up
Down
0
0
Assigned high counting limit
None
Up
Down
0
0
Assigned high counting limit
Latch value
None
Up
Down
0
0
Assigned high counting limit
Isochrone Mode
In isochronous mode, the 1Count24V 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 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 Isochronous Mode (http://support.automation.siemens.com/WW/view/en/15218045)
function manual)
20
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.6 Count Modes
2.6.2
Endless Counting
Definition
In this mode, the 1Count24V counts continuously starting from the load value:
If the 1Count24V reaches the high count limit when counting up, and another count pulse
then comes, it will jump to the low count limit and continue counting from there without
losing a pulse.
If the 1Count24V reaches the low count limit when counting down, and another count
pulse then comes, it will jump to the high count 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
*DWHVWDUW
Figure 2-2
*DWHVWRS
7LPH
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
21
1Count24V
2.6 Count Modes
22
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.6 Count Modes
2.6.3
Once-Only Counting
Definition
In this mode, the 1Count24V 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 count 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 count limit is reached, the counter jumps to the load value and the gate
is closed.
The high count limit can be assigned parameters, and the load value has RESET state
of 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 jumps to the load value and
the gate is closed.
The low count limit is fixed at 0, and the load value can be assigned parameters
(parameter: high count limit) and can be changed.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
23
1Count24V
2.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
+LJK
FRXQWLQJOLPLW
676B2)/:
/RDGYDOXH
676B1'
/RZ
FRXQWLQJOLPLW
676B8)/:
*DWHVWDUW
Figure 2-3
$XWRPDWLF
JDWHVWRS
*DWHVWDUW
$XWRPDWLF
JDWHVWRS
7LPH
With an interrupting gate function, the 1Count24V remains at the underflow when the gate is
started.
&RXQWHUVWDWXV
676B2)/:
+LJK
FRXQWLQJOLPLW
/RDGYDOXH
/RZ
FRXQWLQJOLPLW
*DWHVWDUW $XWRPDWLF
JDWHVWRS
Figure 2-4
24
*DWHVWDUW
$XWRPDWLF
JDWHVWRS
7LPH
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.6 Count Modes
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
25
1Count24V
2.6 Count Modes
2.6.4
Periodic Counting
Definition
In this mode, the 1Count24V counts periodically, 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 count limits are fixed at the maximum count range.
In the event of an overflow or underflow at the respective count limit, the 1Count24V
jumps to the load value and continues counting from there.
When the main count direction is up:
Counts starting from 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 high count limit is reached, the 1Count24V jumps to the load value and
continues counting from there.
When the count direction is down:
Counts starting from the load value.
Counts up or down.
When the low count limit is reached, the 1Count24V jumps to the load value and
continues counting from there.
The low count limit is fixed at 0, and the load value can be assigned parameters
(parameter: high counting limit) and can be changed.
&RXQWHUYDOXH
+LJKFRXQWLQJ
OLPLW
676B2)/:
/RDGYDOXH
676B1'
/RZFRXQWLQJ
OLPLW
676B8)/:
*DWHVWDUW
Figure 2-5
26
*DWHVWRS
7LPH
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.6 Count Modes
&RXQWHUVWDWXV
+LJKFRXQWLQJ
OLPLW
676B2)/:
/RDGYDOXH
/RZFRXQWLQJ
OLPLW
*DWHVWDUW
Figure 2-6
*DWHVWRS
7LPH
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
27
1Count24V
2.6 Count Modes
28
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.6 Count Modes
2.6.5
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
29
1Count24V
2.6 Count Modes
2.6.6
30
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.6 Count Modes
The diagrams below indicate how the interrupting and canceling gate functions work:
&RXQWHUVWDWXV
+LJKFRXQWLQJOLPLW
/RDGYDOXH
/RZFRXQWLQJOLPLW
*DWHVWDUW
Figure 2-7
*DWHVWRS
*DWHVWDUW
7LPH
+LJKFRXQWLQJOLPLW
/RDGYDOXH
/RZFRXQWLQJOLPLW
*DWHVWDUW
Figure 2-8
*DWHVWRS
*DWHVWDUW
7LPH
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
31
1Count24V
2.6 Count Modes
2.6.7
Latch Function
Introduction
There are two latch functions:
The Latch and Retrigger function
The Latch function
&RXQWSXOVHV
6:B*$7(
',GLJLWDOLQSXW
&RXQWHUVWDWXV
/DWFKYDOXH
Figure 2-9
This function stores the current internal counter status of the 1Count24V 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
1Count24V 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 counter status rather than the current counter status is indicated in the feedback
interface. The STS_DI bit indicates the status of the latch and retrigger signal.
32
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
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 counter status 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 isochronous mode with each edge on the digital
input. The counter status that was valid at the time of the last edge before Ti is displayed in
the feedback interface.
&RXQWSXOVHV
6:B*$7(
',GLJLWDOLQSXW
&RXQWHUVWDWXV
/DWFKYDOXH
Figure 2-10
Counter status and latch value are preassigned with their RESET states.
The counting function is started when the SW gate is opened. The 1Count24V begins at the
load value.
The latch value is always the exact counter status at the time of the positive edge on the
digital input DI.
The stored counter status rather than the current counter status is indicated in the feedback
interface. The STS_DI bit indicates the level of the latch signal.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
33
1Count24V
2.6 Count Modes
Direct loading of the counter does not cause the indicated stored counter status to be
changed.
In isochronous mode, the counter status 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.
34
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
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
If you have configured synchronization, the rising edge of a reference signal on the input
sets the 1Count24V to the load value.
You can select between once-only and periodic synchronization ("Synchronization"
parameter).
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
35
1Count24V
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.
Synchronize once only: If the enable bit is set, the first edge loads the 1Count24V with
the load value.
Synchronization periodically: If the enable bit is set, the first and every further edge loads
the 1Count24V with the load value.
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.
36
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.6 Count Modes
2.6.9
Introduction
The 1Count24V allows you to store two comparison values, which are assigned to the digital
outputs. The outputs can be activated, depending on the counter status and the comparison
values. The various ways of setting the behavior of the outputs are described in this section.
Description
The 1Count24V 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
Counter status comparison value
Counter status 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.
Isochronous mode: In isochronous mode, the output DO1 is switched at time To. The status
of the virtual output DO2 is signaled at time Ti.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
37
1Count24V
2.6 Count Modes
38
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.6 Count Modes
V2 < V1
(see Figure below)
V2 counter status V1
V2 = V1
V2 = counter status = V1
V2 counter status V1
V2 > V1
(see Figure below)
V1 counter status 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
Operating Instructions, 06/2010, A5E00124867-07
39
1Count24V
2.6 Count Modes
Isochronous mode: In isochronous 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.
&RXQWHUVWDWXV
9
9
W
'2
Figure 2-12
W
&RXQWHUVWDWXV
9
9
W
'2
Figure 2-13
W
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
Hysteresis
An encoder can remain at a particular position and then fluctuate around this position. This
state causes the counter status 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. The 1Count24V is equipped with
programmable hysteresis to prevent this switching in response to small fluctuations. You can
assign a range between 0 and 255 (0 means: hysteresis switched off).
Hysteresis also works with overflow and underflow.
40
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.6 Count Modes
Method of Operation with Counter Status Comparison Value and Counter Status 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 counter status 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.
&RXQWYDOXH
+\V
+\V
Figure 2-14
Note
If the count direction changes on the comparison value when hysteresis is active, the output
is reset.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
41
1Count24V
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
various responses of an output with a hysteresis of 0 (= switched off) 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.
&RXQWYDOXH
+\V
+\V
Figure 2-15
42
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
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
various responses of an output with a hysteresis of 0 (= switched off) 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 is enabled, the 1Count24V stores the count direction.
If the hysteresis range is exited in a different direction to the one stored, a pulse is output.
&RXQWYDOXH
+\V
+\V
Figure 2-16
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
43
1Count24V
2.6 Count Modes
44
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.6 Count Modes
2.6.10
Assignment of the Feedback and Control Interface for the Count Modes
Note
For the 1Count24V, the following data of the control and feedback interface are consistent:
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- 3
Address
Bytes 0 to 3
Byte 4
Count value or stored count value in the case of the latch function on the digital input
Bit 7:
Short circuit of the encoder supply
Bit 6:
Short circuit / wire break / overtemperature
Bit 5:
Parameter assignment error
Bit 4:
Reserve = 0
Bit 3:
Reserve = 0
Bit 2:
Resetting of status bits active
Bit 1:
Load function error
Bit 0:
Load function is running
Byte 5
Bit 7:
Down direction status
Bit 6:
Up direction status
Bit 5:
Reserve = 0
Bit 4:
DO2 status
Bit 3:
DO1 status
Bit 2:
Reserve = 0
Bit 1:
DI status
Bit 0:
Internal gate status
Byte 6
Bit 7:
Zero-crossing in the count range when counting without a main count
direction
Bit 6:
Low counting limit
Bit 5:
High counting limit
Bit 4:
Comparator 2 status
Bit 3:
Comparator 1 status
Bit 2:
Reserve = 0
Bit 1:
Reserve = 0
Bit 0:
Synchronization status
Byte 7
Reserve = 0
Bytes 8 to 11 Count value 1
1 Modified user data interface
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
Designation
ERR_24V
ERR_DO1
ERR_PARA
RES_STS_A
ERR_LOAD
STS_LOAD
STS_C_DN
STS_C_UP
STS_DO2
STS_DO1
STS_DI
STS_GATE
STS_ND
STS_UFLW
STS_OFLW
STS_CMP2
STS_CMP1
STS_SYN
45
1Count24V
2.6 Count Modes
Table 2- 4
Address
Assignment
Bytes 0 to 3
Bit 1
Bit 0
Function DO1
Output
blocked
blocked
blocked
Bit 5
Bit 4
Function DO2
Output
Byte 4
Byte 3:
Reserve = 0
Bit 7:
CTRL_DO2
Bit 6:
Enable DO2
SET_DO2
Bit 5:
CTRL_DO1
Bit 4:
Enable DO1
SET_DO1
Bit 3:
RES_STS
Bit 2:
CTRL_SYN
Bit 1:
Enable synchronization
SW_GATE
Bit 0:
Bit 7:
Reserve = 0
Bit 6:
Reserve = 0
Bit 5:
Reserve = 0
C_DOPARAM
Bit 4:
CMP_VAL2
Bit 3:
CMP_VAL1
Bit 2:
LOAD_PREPARE
Bit 1:
LOAD_VAL
Bit 0:
Bytes 6 to 7
46
EXTF_ACK
Byte 5
1 Not
Byte 1:
Byte 2:
Reserve = 0 1
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.6 Count Modes
Control bits
Notes
C_DOPARAM
CMP_VAL1
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
EXTF_ACK
Error acknowledgment
LOAD_PREPARE
The error bits must be acknowledged with the EXTF_ACK control bit after the cause is removed.
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
SET_DO1
SET_DO2
SW_GATE
Switches the DO2 digital output on and off when CTRL_DO2 is set.
The SW gate is opened/closed via the control interface with the SW_GATE bit.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
47
1Count24V
2.6 Count Modes
Feedback bits
Notes
ERR_24V
ERR_DO1
ERR_LOAD
ERR_PARA
RES_STS_A
STS_C_DN
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
STS_LOAD
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
STS_UFLW
STS_SYN
Synchronization status
After successful synchronization, the STS_SYN bit is set. It must be reset by the RES_STS control
bit.
48
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.6 Count Modes
Feedback interface
Control interface
Load and transfer commands are also possible with CPU 3xxC, CPU 3xx with MMC, CPU 4xx (V3.0 and later), and
WinLC RTX (PC CPU).
)HHGEDFNVLJQDOV
RQHRIWKHVWDWXVELWV
&RQWUROELW
5(6B676
)HHGEDFNELW
5(6B676B$
W
5HVHWH[HFXWHG
5HTXHVWFDQFHOHG
&RXQW9H[HFXWHVWKHUHVHW
5HTXHVWUHVHW
Figure 2-17
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
49
1Count24V
2.6 Count Modes
)HHGEDFNELW
676B/2$'
W
9DOXHDSSOLHG(QGRIWUDQVIHU
5HPRYDORIUHTXHVWDQGYDOXH
FRQWLQXHSURYLGLQJ
&RXQW9KDVXQGHUVWRRGWKHUHTXHVW
5HTXHVWYDOXHWUDQVIHUDQGPDNHYDOXHDYDLODEOH
Figure 2-18
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.
50
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.6 Count Modes
QG'3F\FOH
UG'3F\FOH
WK'3F\FOH
&RQWUROELW
LQXVHU
SURJUDP
6WDWXVELW
RIPRGXOH
7L
7'3
Figure 2-19
7L
7'3
7L
7'3
7L
7'3
7L
7'3
Error Detection
The program errors must be acknowledged. They have been detected by the 1Count24V
and are indicated at the feedback interface. Channel-specific diagnostics are performed if
you have enabled group diagnostics in your configuration (see device manual of the
interface module used).
The parameter assignment error bit is acknowledged by means of correct parameter
assignment.
$QHUURUKDVRFFXUUHGWKH&RXQW9VHWVDQHUURUELWD
GLDJQRVWLFPHVVDJHPD\DSSHDUHUURUGHWHFWLRQFRQWLQXHV
(UURUHOLPLQDWHGZKHQ(;7)B$&.LVVHWE\WKHXVHU
SURJUDPWKH&RXQW9GHOHWHVWKHHUURUELWDGLDJQRVWLF
PHVVDJHPD\DSSHDU
HJHUURUELW
(55B9
(UURUDFNQRZOHGJPHQW
(;7)B$&.
Figure 2-20
Error Acknowledgment
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
51
1Count24V
2.6 Count Modes
2.6.11
Introduction
You can use either of the following to assign parameters for the 1Count24V:
STEP 7 V5.3 SP2 or later
A GSD file (http://www.automation.siemens.com/csi/gsd)
Parameters
Value range
Default
Disable/enable
Disable
Enable
Group diagnostics
Encoder parameters
Signal evaluation A, B
2.5 s/25 s
2.5 s/25 s
2.5 s/25 s
2.5 s
2.5 s
2.5 s
Sensor A, B, DI
Direction input B
Normal/Inverted
Normal
Function DO1
Output/
Switch on at counter status comparison value/
Switch on at counter status comparison value/
Pulse on reaching the comparison value/
Switch at comparison values
Output
Function DO2
Output/
Switch on at counter status comparison value/
Switch on at counter status comparison value/
Pulse on reaching the comparison value
Output
0/1
Off/on
Off
0...255
0...255
Output parameters
Diagnostics
52
DO11
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.6 Count Modes
Parameters
Mode
Value range
Default
Counting mode
Continuous counting/
Once-only counting/
Periodic counting
Count continuously
Gate function
Cancel counting/
Interrupt counting
Cancel counting
Normal/Inverted
Normal
Function DI
Input /
HW gate /
Latch and retrigger at positive edge /
Synchronization at positive edge /
Latch at positive edge
Input
Synchronization2
Once-only/Periodically
Once-only
None/Up/Down
None
2 7FFF FFFF
7FFF FFFF
DO1 diagnostics (wire break, short circuit) is possible only with pulse lengths of > 90 ms on digital output DO1.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
53
1Count24V
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
To run one of these modes, you have to assign parameters to the 1Count24V.
(see section "Parameter Assignment for Measurement Modes (Page 82)")
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.
54
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.7 Measurement Modes
2.7.2
Measuring Principle
The 1Count24V 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.
Rule for pulse sequences with one or several pulses per update time:
Dynamic measuring time =
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 =
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, 06/2010, A5E00124867-07
55
1Count24V
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
'\QDPLF
PHDVXULQJWLPH
'\QDPLF
PHDVXULQJWLPH
8SGDWHWLPH
8SGDWHWLPH
8SGDWHWLPH
'\QDPLF
PHDVXULQJWLPH
8SGDWHWLPH
'\QDPLF
PHDVXULQJWLPH
'\QDPLF
PHDVXULQJWLPH
'\QDPLF
PHDVXULQJWLPH
Figure 2-21
Measuring Principle
The 1Count24V 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.
56
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
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
Gate Control
To control the 1Count24V, you have to use the gate functions.
Isochronous Mode
In isochronous mode, the 1Count24V 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 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, 06/2010, A5E00124867-07
57
1Count24V
2.7 Measurement Modes
58
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.7 Measurement Modes
2.7.3
Definition
In frequency measurement mode, the 1Count24V counts the pulses that arrive within a set
integration time.
Integration time
Your preset the integration time with the integration time parameter (see table).
Table 2- 9
Boundary Conditions
Integration time
Range of n
nmin
Non-isochronous mode
Isochronous Mode
Any TDP
n x 10 ms
TDP < 10 ms
n x TDP
TDP 10 ms
n x TDP
nmax
1
1000
1
1000
10000 ms/TDP [ms] 1
1 Any
digits after the decimal point that come about after dividing by TDP are omitted.
It is not permitted to violate these limits. If these limits are violated, the 1Count24V generates a parameter assignment
error and will not go into isochronous mode.
Frequency Measurement
The value of the calculated frequency is made available in the unit 10-3 Hz. The measured
frequency value can be read in the feedback interface (byte 0 to 3).
,QWHJUDWLRQWLPH
,QWHJUDWLRQWLPH
&RXQWSXOVHV
,QWHUQDOJDWH
%HJLQQLQJRIIUHTXHQF\
PHDVXUHPHQW
Figure 2-23
(QGRI
)UHTXHQF\PHDVXUHPHQW
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
59
1Count24V
2.7 Measurement Modes
Limit-Value Monitoring
The following value ranges are permitted for limit-value monitoring:
Low limit fu
0 to 99,999,999
High limit fo
10-3
Hz
60
10 s
0.1 Hz 0.001 Hz
100 000 Hz 18 Hz
1s
1 Hz 0.001 Hz
100 000 Hz 11 Hz
0.1 s
10 Hz 0.002 Hz
100 000 Hz 10 Hz
0.01 s
100 Hz 0.013 Hz
100 000 Hz 13 Hz
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.7 Measurement Modes
2.7.4
Definition
In frequency measurement mode, the 1Count24V counts the pulses that arrive within a
dynamic measuring period.
Update Time
The 1Count24V 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
Boundary conditions
Update time
Range of n
nmin
Non-isochronous mode
Isochronous mode
Any TDP
n x 10 ms
TDP < 10 ms
n x TDP
TDP 10 ms
n x TDP
nmax
1
1000
1
1000
10000 ms/TDP [ms] 1
Any digits after the decimal point resulting from division by TDP are omitted.
These limits may not be violated. If these limits are violated, the 1Count24V generates a parameter assignment error and
will not go into isochronous mode.
1
Frequency measurement
The value of the calculated frequency is made available in the unit 10-3 Hz. The measured
frequency value can be read in the feedback interface (byte 0 to 3).
8SGDWHWLPH
8SGDWHWLPH
&RXQWSXOVHV
,QWHUQDOJDWH
6WDUWRIIUHTXHQF\
PHDVXUHPHQW
Figure 2-24
(QGRI
IUHTXHQF\PHDVXUHPHQW
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
61
1Count24V
2.7 Measurement Modes
Limit-Value Monitoring
The following value ranges are permitted for limit-value monitoring:
Encoder type
Low limit fu
High limit fo
10-3
Hz
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
62
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.7 Measurement Modes
2.7.5
Definition
In rotational speed measurement mode, the 1Count24V 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 (see table).
Table 2- 11
Boundary conditions
Integration time
Range of n
nmin
Non-isochronous mode
Isochronous mode
Any TDP
n x 10 ms
TDP < 10 ms
n x TDP
TDP 10 ms
n x TDP
nmax
1
1000
11
1000
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 generates a parameter assignment error and
will not go into isochronous mode.
,QWHJUDWLRQWLPH
&RXQWSXOVHV
,QWHUQDO*DWH
%HJLQQLQJRIURWDWLRQDO
VSHHGPHDVXUHPHQW
Figure 2-25
(QGRIURWDWLRQDO
VSHHGPHDVXUHPHQW
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
63
1Count24V
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
Possible Measuring Ranges with Error Indication (Number of Pulses per Encoder
Revolution = 60)
Integration time
64
10 s
1s
0.1 s
0.01 s
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.7 Measurement Modes
2.7.6
Definition
In rotational speed measurement mode, the 1Count24V 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 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
Boundary conditions
Update time
Range of n
nmin
Non-isochronous mode
Isochronous mode
nmax
Any TDP
n x 10 ms
1000
TDP < 10 ms
n x TDP
1000
TDP 10 ms
n x TDP
1 Any digits after the decimal point resulting from division by TDP are omitted.
These limits may not be violated. If these limits are violated, the 1Count24V generates a parameter assignment error and
will not go into isochronous mode.
8SGDWHWLPH
&RXQWSXOVHV
,QWHUQDOJDWH
6WDUWRIURWDWLRQDOVSHHG
PHDVXUHPHQW
Figure 2-26
(QGRI
URWDWLRQDOVSHHGPHDVXUHPHQW
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
65
1Count24V
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
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
66
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.7 Measurement Modes
2.7.7
Definition
In period measurement mode, the 1Count24V 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
Boundary conditions
Integration time
Range of n
nmin
Non-isochronous mode
Isochronous mode
Any TDP
nmax
n x 10 ms
TDP < 10 ms
n x TDP
TDP 10 ms
n x TDP
1
10 ms/TDP [ms]
1
12000
+1 1
12000
120000 ms/TDP [ms] 1
Any digits after the decimal point resulting from division by TDP are omitted.
These limits may not be violated. If these limits are violated, the 1Count24V generates a parameter assignment error and
will not go into isochronous mode.
1
Period measurement
The value of the calculated period is given in the unit 1 s or 1/16 s. The measured period
can be read in the feedback interface (byte 0 to 3).
,QWHJUDWLRQWLPH
,QWHJUDWLRQWLPH
3HULRG
&RXQWSXOVHV
,QWHUQDOJDWH
6WDUWRISHULRG
PHDVXUHPHQW
Figure 2-27
(QGRISHULRG
PHDVXUHPHQW
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
67
1Count24V
2.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
1/16 s resolution
Low limit Tu
High limit To
T absolute error
100 s
1 s* (10 0)
10 s
1 s* (10 0)
1s
1 s* (10 0)
0.1 s
1 s* (10 0)
0.01 s
1 s* (10 0)
1 s* (10 000 1)
1/16 s resolution
Integration time
100 s
68
T absolute error
1/16 s* (160 0)
10 s
1/16 s* (160 0)
1s
1/16 s* (160 0)
0.1 s
1/16 s* (160 0)
0.01 s
1/16 s* (160 0)
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.7 Measurement Modes
2.7.8
Definition
In period measurement mode, the 1Count24V 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 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
Boundary conditions
Update time
Range of n
nmin
Non-isochronous mode
Isochronous mode
Any TDP
n x 10 ms
TDP < 10 ms
n x TDP
TDP 10 ms
n x TDP
nmax
1
10 ms/TDP [ms] +1
1
12000
1
12000
120000 ms/TDP [ms] 1
Any digits after the decimal point resulting from division by TDP are omitted.
These limits may not be violated. If these limits are violated, the 1Count24V generates a parameter assignment error and
will not go into isochronous mode.
1
Period measurement
The value of the calculated period is given in the unit 1 s or 1/16 s. The measured period
can be read in the feedback interface (byte 0 to 3).
8SGDWHWLPH
8SGDWHWLPH
3HULRG
&RXQWSXOVHV
,QWHUQDOJDWH
6WDUWRISHULRGPHDVXUH
PHQW
Figure 2-28
(QGRISHULRGPHDVXUH
PHQW
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
69
1Count24V
2.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
1/16 s resolution
Low limit Tu
High limit To
1 s* (10 0)
1 s* (100 0)
1 s* (1 000 0)
1 s* (10 000 0)
1/16 s resolution
70
1/16 s* (160 1)
1/16 s* (1 600 1)
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.7 Measurement Modes
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
71
1Count24V
2.7 Measurement Modes
2.7.9
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 isochronous 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 isochronous 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.
72
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.7 Measurement Modes
2.7.10
Introduction
The various ways of setting the behavior of the output are described in this section.
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 isochronous mode, the output is switched at time To.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
73
1Count24V
2.7 Measurement Modes
Limit-Value Monitoring
2)/:
8)/:
*DWHVWDUW
0HDVXUHGYDOXH
/RZ
OLPLW
Figure 2-29
+LJK
OLPLW
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
In isochronous mode the output is switched at the end of measurement at time Ti.
74
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.7 Measurement Modes
2.7.11
Assignment Tables
Table 2- 17
Address
Bytes 0 to 3
Byte 4
Measured value
Bit 7:
Short circuit of the encoder supply
Bit 6:
Short circuit / wire break / overtemperature
Bit 5:
Parameter assignment error
Bit 4:
Reserve = 0
Bit 3:
Reserve = 0
Bit 2:
Resetting of status bits active
Bit 1:
Load function error
Bit 0:
Load function is running
Byte 5
Bit 7:
Down direction status
Bit 6:
Up direction status
Bit 5:
Reserve = 0
Bit 4:
Reserve = 0
Bit 3:
DO1 status
Bit 2:
Reserve = 0
Bit 1:
DI status
Bit 0:
Internal gate status
Byte 6
Bit 7:
Reserve = 0
Bit 6:
Low limit of measuring range
Bit 5:
High limit of measuring range
Bit 4:
Reserve = 0
Bit 3:
Measurement completed
Bit 2:
Reserve = 0
Bit 1:
Reserve = 0
Bit 0:
Reserve = 0
Byte 7
Reserve = 0
Bytes 8 to 11
Count value 1
1 Modified user data interface
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
Designation
ERR_24V
ERR_DO1
ERR_PARA
RES_STS_A
ERR_LOAD
STS_LOAD
STS_C_DN
STS_C_UP
STS_DO1
STS_DI
STS_GATE
STS_UFLW
STS_OFLW
STS_CMP1
75
1Count24V
2.7 Measurement Modes
Table 2- 18
Address
Assignment
Bytes 0 to 3
Bit 1
Bit 0
Function DO1
Output
Bytes 1 to 3:
Reserve = 0
Integration time
Byte 0, 1:
Byte 4
Byte 5
Bytes 6 to 7
1
Byte 2, 3:
Reserve = 0
Bit 7:
Bit 6:
Reserve = 0
Bit 5:
Reserve = 0
Bit 4:
Bit 3:
Bit 2:
Bit 1:
Reserve = 0
Bit 0:
Bit 7:
Reserve = 0
Bit 6:
Reserve = 0
Bit 5:
Reserve = 0
Bit 4:
Bit 3:
Reserve = 0
Bit 2:
Bit 1:
Bit 0:
Reserve = 0 1
76
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.7 Measurement Modes
Control bits
Notes
C_DOPARAM
C_INTTIME
CTRL_DO1
Enable DO1
EXTF_ACK
Error acknowledgment
LOAD_VAL
RES_STS
SET_DO1
SW_GATE
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
77
1Count24V
2.7 Measurement Modes
Feedback bits
Notes
ERR_24V
ERR_DO1
ERR_LOAD
ERR_PARA
RES_STS_A
STS_C_DN
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
STS_LOAD
STS_OFLW
STS_UFLW
78
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.7 Measurement Modes
Feedback interface
Control interface
Load and transfer commands are also possible with CPU 3xxC, CPU 3xx with MMC, CPU 4xx (V3.0 and later), and
WinLC RTX (PC CPU).
)HHGEDFNVLJQDOV
RQHRIWKHVWDWXVELWV
&RQWUROELW
5(6B676
)HHGEDFNELW
5(6B676B$
W
5HVHWH[HFXWHG
5HTXHVWFDQFHOHG
&RXQW9H[HFXWHVWKHUHVHW
5HTXHVWUHVHW
Figure 2-30
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
79
1Count24V
2.7 Measurement Modes
)HHGEDFNELW
676B/2$'
W
9DOXHDSSOLHG(QGRIWUDQVIHU
5HPRYDORIUHTXHVWDQGYDOXH
FRQWLQXHSURYLGLQJ
&RXQW9KDVXQGHUVWRRGWKHUHTXHVW
5HTXHVWYDOXHWUDQVIHUDQGPDNHYDOXHDYDLODEOH
Figure 2-31
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.
80
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.7 Measurement Modes
QG'3F\FOH
UG'3F\FOH
WK'3F\FOH
&RQWUROELW
LQXVHU
SURJUDP
6WDWXVELW
RIPRGXOH
7L
7'3
Figure 2-32
7L
7'3
7L
7'3
7L
7'3
7L
7'3
Error Detection
The diagnostic errors must be acknowledged. They have been detected by the 1Count24V
and are indicated at the feedback interface. Channel-specific diagnostics are performed if
you have enabled group diagnostics in your configuration (see device manual of the
interface module used).
The parameter assignment error bit is acknowledged by means of correct parameter
assignment.
$QHUURUKDVRFFXUUHGWKH&RXQW9VHWVDQHUURUELWD
GLDJQRVWLFPHVVDJHPD\DSSHDUHUURUGHWHFWLRQFRQWLQXHV
(UURUHOLPLQDWHGZKHQ(;7)B$&.LVVHWE\WKHXVHU
SURJUDPWKH&RXQW9GHOHWHVWKHHUURUELWDGLDJQRVWLF
PHVVDJHPD\DSSHDU
HJHUURUELW
(55B9
(UURUDFNQRZOHGJPHQW
(;7)B$&.
Figure 2-33
Error Acknowledgment
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
81
1Count24V
2.7 Measurement Modes
2.7.12
Introduction
You can use either of the following to assign parameters for the 1Count24V:
STEP 7 V5.3 SP2 or later
A GSD file (http://www.automation.siemens.com/csi/gsd)
Parameter
Value Range
Default
Disable/enable
Disable
Enable
Group diagnostics
2.5 s/25 s
2.5 s
2.5 s/25 s
2.5 s
- At digital input DI
2.5 s/25 s
2.5 s
Sensor A, B, DI
Direction input B
Normal/Inverted
Normal
Diagnostics DO1 1
Off/on
Off
Function DO1
Output/
Outside the limits/
Under the low limit/
Over the high limit
Output
0/1
Encoder parameters
Signal evaluation A, B
Encoder and input filter
Output parameters
82
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.7 Measurement Modes
Parameter
Mode
Value Range
Default
Measuring mode
Frequency measurement/
Rotational speed measurement/
Period measurement
Frequency measurement
Measuring method
Resolution of period
1 s
1 s
1/16 s
Function DI
Input/HW gate
Input
Normal/Inverted
Normal
Low limit
Frequency measurement:
0...fmax-1
Period measurement:
0...Tmax-1
Frequency measurement:
low limit+1...fmax
fmax
nmax
Period measurement:
low limit+1...Tmax
tmax
Frequency measurement:
1 to 1000
10
10
Period measurement:
1 to 12000
10
1...65535
High limit
DO1 diagnostics (wire break, short circuit) is possible only with pulse lengths of > 90 ms on digital output DO1.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
83
1Count24V
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 encompasses 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.
You can find the parameter assignment for "Fast Mode" in the chapter "Assigning
parameters for fast mode (Page 89)".
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.
Isochronous Mode
In each cycle, the 1Count24V transfers the counter satus and the status bits that were valid
at time Ti.
84
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
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.
2.8.3
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
Operating Instructions, 06/2010, A5E00124867-07
85
1Count24V
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.
86
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.8 Fast mode
2.8.5
Assignment Tables
Address
Assignment
Name
Bytes 0 to 3
Bit 31
Sign of life
LZ
Bit 30
STS_TIC
Bit 29
ERR_PARA
Bit 28
Group error
Encoder supply short circuit
EXTF
Bit 27
DI status
STS_DI
Bit 26
STS_DIR
Bit 25
STS_GATE
Bits 0 to 24
Count value
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
ERR_PARA
EXTF
Group error
Possible cause:
Encoder supply short circuit
EXTF is reset when the causes of the errors are eliminated.
STS_DI
STS_DIR
STS_GATE
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
87
1Count24V
2.8 Fast mode
88
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.8 Fast mode
2.8.6
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
Value Range
Default
Rotary encoder
single/double/quadruple
Encoder and input filter
At counter input (track A)
At direction input (track B)
At digital input DI
Sensor A, B, DI
2.5 s/25 s
2.5 s
2.5 s/25 s
2.5 s
2.5 s/25 s
2.5 s
24V M switch
Direction input B
Normal/inverted
Normal
Fast mode
Fast mode
Fast mode
Gate function
Cancel counting/
Cancel counting
Mode
Interrupt counting
Input signal HW gate
Normal/inverted
Normal
Function DI
Input /
Input
HW gate/
Synchronization at positive edge
Load value
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
89
1Count24V
2.9 Position feedback
2.9
Position feedback
2.9.1
Overview
Description
This mode encompasses a subset of the functionality of the continuous counting mode. It is
intended for isochronous 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 run this mode, you have to assign parameters to the 1Count24V (see section "Assigning
Parameters for Position Feedback (Page 107)").
Load value
You can specify a load value for the 1Count24V.
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, you have to use the gate functions.
90
RESET States
Value
RESET state
Load value
Count value
Latch value
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.9 Position feedback
Isochronous mode
In isochronous mode, the 1Count24V 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 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.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
91
1Count24V
2.9 Position feedback
2.9.2
Position Detection
Definition
In this mode, the 1Count24V counts continuously starting from the load value:
If the 1Count24V reaches the high count limit when counting up, and another count pulse
then comes, it will jump to the low count limit and continue counting from there without
losing a pulse.
If the 1Count24V reaches the low count limit when counting down, and another count
pulse then comes, it will jump to the high count 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
*DWHVWDUW
Figure 2-34
*DWHVWRS
7LPH
92
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.9 Position feedback
2.9.3
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, 06/2010, A5E00124867-07
93
1Count24V
2.9 Position feedback
Figure 2-35
*DWHVWRS
*DWHVWDUW
7LPH
+LJKFRXQWLQJOLPLW
/RDGYDOXH
/RZFRXQWLQJOLPLW
*DWHVWDUW
Figure 2-36
94
*DWHVWRS
*DWHVWDUW
7LPH
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.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 counter status
or
Counting starts from the load value
If the SW gate is opened in isochronous 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 counter status.
When the HW gate is opened, one of the following occurs, depending on the parameter
assignment:
Counting continues from the current counter status
or
Counting starts from the load value
If the SW gate is opened in isochronous 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, 06/2010, A5E00124867-07
95
1Count24V
2.9 Position feedback
2.9.4
Latch Function
Overview
There are two latch functions:
The Latch and Retrigger function
The Latch function
&RXQWSXOVHV
6:B*$7(
',GLJLWDOLQSXW
&RXQWHUVWDWXV
/DWFKYDOXH
Figure 2-37
This function stores the current internal counter status of the 1Count24V 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
1Count24V 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 counter status rather than the current counter status 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 counter status to be
changed.
96
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.9 Position feedback
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 isochronous mode with each edge on the digital
input. The counter status that was valid at the time of the last edge before Ti is displayed in
the feedback interface.
&RXQWSXOVHV
6:B*$7(
',GLJLWDOLQSXW
&RXQWHUVWDWXV
/DWFKYDOXH
Figure 2-38
Counter status 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 begins at the
load value.
The latch value is always the exact counter status at the time of the positive edge on the
digital input DI.
The stored counter status rather than the current counter status 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 counter status to be
changed.
In isochronous mode, the counter status 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
Operating Instructions, 06/2010, A5E00124867-07
97
1Count24V
2.9 Position feedback
98
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.9 Position feedback
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
If you have configured synchronization, the positive edge of a reference signal on the input
sets the 1Count24V to the load value.
You can select between once-only and periodic synchronization ("Synchronization"
parameter).
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
99
1Count24V
2.9 Position feedback
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.
Synchronize once only: If the enable bit is set, the first edge loads the 1Count24V with
the load value.
Synchronization periodically: If the enable bit is set, the first and every further edge loads
the 1Count24V with the load value.
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 isochronous 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.
100
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.9 Position feedback
2.9.6
Assignment Tables
Table 2- 24
Address
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
Bit 6:
Reserve = 0
Bit 5:
Parameter assignment error
Bit 4:
Reserve = 0
Bit 3:
Reserve = 0
Bit 2:
Resetting of status bits active
Bit 1:
Load function error
Bit 0:
Load function is running
Byte 5
Bit 7:
Down direction status
Bit 6:
Up direction status
Bit 5:
Reserve = 0
Bit 4:
Reserve = 0
Bit 3:
Reserve = 0
Bit 2:
Reserve = 0
Bit 1:
DI status
Bit 0:
Internal gate status
Byte 6
Bit 7:
Zero crossing
Bit 6:
Low counting limit
Bit 5:
High counting limit
Bit 4:
Reserve = 0
Bit 3:
Reserve = 0
Bit 2:
Reserve = 0
Bit 1:
Reserve = 0
Bit 0:
Synchronization status
Byte 7
Reserve = 0
Bytes 8 to 11
Count value 1
1 Modified user data interface
Designation
Bytes 0 to 3
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
ERR_24V
ERR_PARA
RES_STS_A
ERR_LOAD
STS_LOAD
STS_C_DN
STS_C_UP
STS_DI
STS_GATE
STS_ND
STS_UFLW
STS_OFLW
STS_SYN
101
1Count24V
2.9 Position feedback
Table 2- 25
Address
Assignment
Bytes 0 to 3
Bit 1
Bit 0
Function DO1
Output
blocked
blocked
blocked
Bit 5
Bit 4
Function DO2
Output
Byte 2:
Byte 3:
Reserve = 0
Bit 7:
Bit 6:
Reserve = 0
Bit 5:
Reserve = 0
Bit 4:
Reserve = 0
Bit 3:
Reserve = 0
RES_STS
Bit 2:
CTRL_SYN
Bit 1:
Enable synchronization
SW_GATE
Bit 0:
Bit 7:
Reserve = 0
Bit 6:
Reserve = 0
Bit 5:
Reserve = 0
Bit 4:
Reserve = 0
Bit 3:
Reserve = 0
Bytes 1 to 3
Byte 4
EXTF_ACK
Byte 5
Bytes 6 to 7
1
Bit 2:
Reserve = 0
LOAD_PREPARE
Bit 1:
LOAD_VAL
Bit 0:
Reserve = 0 1
102
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.9 Position feedback
Control bits
Notes
CTRL_SYN
EXTF_ACK
Error acknowledgment
The error bits must be acknowledged with the EXTF_ACK control bit after the cause is removed.
LOAD_PREPARE
LOAD_VAL
The value from bytes 0 to 3 is loaded directly as the new count value.
RES_STS
SW_GATE
The SW gate is opened/closed via the control interface with the SW_GATE bit.
Feedback bits
Notes
ERR_24V
ERR_LOAD
ERR_PARA
RES_STS_A
STS_C_DN
STS_C_UP
Up direction status
STS_DI
DI status
STS_GATE
STS_LOAD
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
STS_UFLW
The status of the DI is indicated in all modes with the STS_DI bit in the feedback interface.
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, 06/2010, A5E00124867-07
103
1Count24V
2.9 Position feedback
Feedback interface
Control interface
Load and transfer commands are also possible with CPU 3xxC, CPU 3xx with MMC, CPU 4xx (V3.0 and later), and
WinLC RTX (PC CPU).
)HHGEDFNVLJQDOV
RQHRIWKHVWDWXVELWV
&RQWUROELW
5(6B676
)HHGEDFNELW
5(6B676B$
W
5HVHWH[HFXWHG
5HTXHVWFDQFHOHG
&RXQW9H[HFXWHVWKHUHVHW
5HTXHVWUHVHW
Figure 2-40
104
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.9 Position feedback
)HHGEDFNELW
676B/2$'
W
9DOXHDSSOLHG(QGRIWUDQVIHU
5HPRYDORIUHTXHVWDQGYDOXH
FRQWLQXHSURYLGLQJ
&RXQW9KDVXQGHUVWRRGWKHUHTXHVW
5HTXHVWYDOXHWUDQVIHUDQGPDNHYDOXHDYDLODEOH
Figure 2-41
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
Operating Instructions, 06/2010, A5E00124867-07
105
1Count24V
2.9 Position feedback
QG'3F\FOH
UG'3F\FOH
WK'3F\FOH
&RQWUROELW
LQXVHU
SURJUDP
6WDWXVELW
RIPRGXOH
7L
7'3
Figure 2-42
7L
7'3
7L
7L
7'3
7'3
7L
7'3
Error Detection
The program errors must be acknowledged. They have been detected by the 1Count24V
and are indicated at the feedback interface. Channel-specific diagnostics are performed if
you have enabled group diagnostics in your configuration (see device manual of the
interface module used).
The parameter assignment error bit is acknowledged by means of correct parameter
assignment.
$QHUURUKDVRFFXUUHGWKH&RXQW9VHWVDQHUURUELWD
GLDJQRVWLFPHVVDJHPD\DSSHDUHUURUGHWHFWLRQFRQWLQXHV
(UURUHOLPLQDWHGZKHQ(;7)B$&.LVVHWE\WKHXVHU
SURJUDPWKH&RXQW9GHOHWHVWKHHUURUELWDGLDJQRVWLF
PHVVDJHPD\DSSHDU
HJHUURUELW
(55B9
(UURUDFNQRZOHGJPHQW
(;7)B$&.
Figure 2-43
Error Acknowledgment
106
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.9 Position feedback
2.9.7
Introduction
You can use either of the following to assign parameters for the 1Count24V:
STEP 7 V5.3 SP2 or later
A GSD file (http://www.automation.siemens.com/csi/gsd)
Parameter
Value Range
Enable
Group diagnostics
Disable/enable
Response to failure of the higher-level controller
Response to CPU/master STOP
Turn off
Continue working mode
Encoder parameters
Signal evaluation A, B
Pulse and direction/
Rotary encoder single/double/quadruple
Encoder and input filter
- At count input (track A)
2.5 s/25 s
- At direction input (track B)
2.5 s/25 s
- At digital input DI
2.5 s/25 s
Sensor A, B, DI
24V P switch, normal mode/
24V M switch
Direction input B
Normal/Inverted
Mode
Position feedback
Position detection
Gate function
Cancel counting/
Interrupt counting
Input signal HW gate
Normal/Inverted
Function DI
Input /
HW gate /
Latch and retrigger at positive edge /
Synchronization at positive edge /
Latch at positive edge
Synchronization 1
Once-only/Periodic
1 Only relevant if Function DI = Synchronization at positive edge
Default
Disable
Turn off
2.5 s
2.5 s
2.5 s
24V P switch, normal mode
Normal
Position detection
Cancel counting
Normal
Input
Once-only
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
107
1Count24V
2.10 Evaluation of count and direction signal
2.10
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 for the "Sensor A, B, DI"
parameter, you must use the M-switching sensors.
108
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.10 Evaluation of count and direction signal
6LJQDO%DV
GLUHFWLRQLQGLFDWRU
XS
8SFRXQWSXOVHV
'RZQFRXQWSXOVHV
Figure 2-45
Rotary Encoder
The 1Count24V 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
8S
Figure 2-46
'RZQ
Single Evaluation
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
109
1Count24V
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
Figure 2-47
GRZQ
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
Figure 2-48
GRZQ
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.
110
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.11 Diagnostics
2.11
Diagnostics
2.11.1
6)
83
'1
UP
DN
Cause
Remedy
No configuration or incorrect
module plugged in. There is a
diagnostic message.
On
On
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
111
1Count24V
2.11 Diagnostics
2.11.2
Error types
For information on the structure of the channel-related diagnostics, refer to the manual on
the interface module used in your ET 200S station.
Meaning
Remedy
1D
5D
00101: Overtemperature
6D
9D
01001: Error
16D
112
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.12 Behavior at CPU-Master-STOP
2.12
Behavior at CPU-Master-STOP
What Happens if
New Parameters Have Been Assigned?
DO 1 substitute a value
If 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 executed during startup, set the SW gate control bit and transfer
the values to the 1Count24V.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
113
1Count24V
2.12 Behavior at CPU-Master-STOP
114
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.13 Technical Specifications
2.13
Technical Specifications
Technical specifications
General technical specifications
Dimensions and Weight
Dimensions W x H x D (mm)
Weight
15x81x52
Approx. 40 g
Counter range
32 bits
24 VDC
Yes
Galvanic isolation
Between backplane bus and counter function
Between counter function and load voltage
Yes
Encoder supply
Output voltage
Output current
L+ (-0.8 V)
No
Current consumption
From the backplane bus
From load voltage L+ (no load)
max. 10 mA
Power dissipation
Typ. 1 W
Input voltage
Rated value
0 signal
1 signal
Input current
0 signal
1 signal
Minimum pulse width (maximum counting
frequency)
Filter on
Filter off
max. 42 mA
24 VDC
-30 V to 5 V
11 V to 30 V
2 mA (quiescent current)
9 mA (typically)
25 s
2.5 s
Possible
In accordance with IEC 1131, Part 2, Type 2
50 m
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
100 m
115
1Count24V
2.13 Technical Specifications
General technical specifications
Data for the Digital Output
Output voltage
Rated value
0 signal
1 signal
Output current
0 signal (residual current)
1 signal
Permitted range
Rated value
24 VDC
3V
L+ (-1V)
0.5 mA
5 mA to 2.0 A
40C
2A
50C
1A
60C
0.5 A
Switching frequency
Resistive load
Inductive load
Lamp load
100 Hz
2 Hz
10 Hz
Lamp load
5W
100 s
Yes
Response threshold
2.6 A to 4 A
Inductive extinction
Yes; L+ -(50 to 60 V)
Yes
Cable lengths
Unshielded
Shielded
600 m
1000 m
Status, Diagnostics
Digital input DI status display
LED 8 (green)
LED 4 (green)
UP LED (green)
DN LED (green)
Fault indicator
SF LED (red)
Diagnostic information
Yes
Response times
Update rate of the counting modes
Non-isochronous mode
Isochronous mode
116
1 ms
TDP
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count24V
2.13 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
0 s
ToiMin
0 s
TDPMin
815 s
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
117
1Count24V
2.13 Technical Specifications
118
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.1
Product Overview
Order Number:
6ES7 138-4DE02-0AB0
Compatibility
The 1Count5V with the order number 6ES7 138-4DE02-0AB0 replaces the
1Count5V/500kHz with the order number 6ES7 138-4DE01-0AB0 with full compatibility. 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 is a double-width module and can only be used with a 4-row terminal
module (e. g. TM-E30S44-01).
Isochronous mode
Modified user data interface 1
1 Instead
of 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
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
119
1Count5V
3.1 Product Overview
Operating modes of the 1Count5V:
Counting modes:
Count continuously
Count once
Count periodically
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-1AA040AB0 and later and IM 151-1 High Feature: 6ES7151-1BA01-0AB0 and later.
Configuration
In order to configure the 1Count5V use
STEP 7 V5.3 SP2 or higher
The HSP (hardware support package, available online) as of STEP 7 Version V5.2 SP1
120
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.1 Product Overview
Firmware update
In order to extend the functionality and eliminate errors, firmware updates can be
downloaded to the operating system memory of the 1Count5V by means of the STEP 7 HW
Config software.
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 will no longer function correctly as a
result. Restart the firmware update and wait until it has completed successfully.
Identification Data 1
Hardware release status
Firmware release status
Serial number
1See
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
121
1Count5V
3.2 Isochronous mode
3.2
Isochronous mode
Note
For basic information on isochronous mode, refer to the Isochronous mode
(http://support.automation.siemens.com/WW/view/en/15218045) function manual.
Hardware Requirements
You will require the following for the 1Count5V in isochronous mode:
A CPU that supports isochronous mode
PROFIBUS master or PROFINET controller that supports the constant bus cycle time
An IM 151 that supports isochronous mode
Features
Depending on the system parameter assignment, the 1Count5V/500kHz works in either nonisochronous or isochronous mode.
In isochronous mode, data communication between the master and 1Count5V is
isochronous to the bus cycle (PROFIBUS DP/PROFINET).
In isochronous mode, all 8 bytes / 12 bytes of the feedback interface are consistent.
If a parameter assignment error occurs, the 1Count5V does not go into isochronous mode.
If isochronous mode fails due to faults or failure/delay of global control (GC), the 1Count5V
returns 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 143)
122
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.3 Brief instructions on commissioning the 1Count5V
3.3
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. The counting mode used in this example is "Count
continuously".
Requirements
The following requirements must be satisfied:
You must have put an ET 200S station on an S7 station with a DP master into operation.
You must have the following:
A terminal module (e. g. TM-E30S44-01)
A 1Count5V,
A 5 V encoder with a 24 V encoder supply and the material required for wiring
9LQFUHPHQWDO
HQFRGHU
83
'1
6<1
70(6DQG
&RXQW9
(6'($%
$ $
'2 '2
9 0
0 0
% %
9'& 9'&
1 1
',
Figure 3-1
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
123
1Count5V
3.3 Brief instructions on commissioning the 1Count5V
Integration into the User Program (Not for Modified User Data Interface)
Create block FC 101 and integrate it in your control program (in OB 1, for example). This
block requires the DB1 data block 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
DB1.DBD0
DB1.DBD4
SET
S
DB1.DBX4.0
//Open SW gate
DB1.DBD0
PAD 256
DB1.DBW4
PAW 260
124
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.3 Brief instructions on commissioning the 1Count5V
STL
Network 3: Read from the feedback interface
Description
//Read 8 bytes from the 1Count5V
PED 256
DB1.DBD8
PED 260
DB1.DBD12
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 is on. The status of the UP LED changes with each new
pulse.
The count value in the block changes.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
125
1Count5V
3.4 Terminal Assignment Diagram
3.4
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 (http://support.automation.siemens.com/WW/view/en/1144348) operating
instructions).
Table 3- 1
View
Terminal Assignment
Remarks
A, /A: Track A
&RXQW
9N+]
6)
70(6DQG
&RXQW9
B, /B: Track B
N, /N: Track N
24 VDC: Sensor supply
M: Chassis ground
DI: Digital input
DO1: Digital output
DO2: Digital output
9LQFUHPHQWDO
HQFRGHU
83
'1
6<1
(6'($%
126
$ $
'2 '2
9 0
0 0
% %
9'& 9'&
1 1
',
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.5 Operating modes and application areas of the 1Count5V
3.5
Introduction
To begin with, decide how you want to use the 1Count5V. You can choose from the following
operating modes:
Counting modes
Measuring modes
Position feedback
Fast mode
Count continuously
Frequency measurement
Position detection
Count once
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 in your project in two different ways. Decide whether you want to work with a GSD file or
with STEP 7.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
127
1Count5V
3.5 Operating modes and application areas of the 1Count5V
Note
Fast mode is designed for use in especially short isochronous cycles. You need STEP 7 to
configure isochronous operation.
128
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
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 run one of these modes, you have to assign parameters to the 1Count5V (see section
"Parameter Assignment for the Count Modes (Page 163)").
Load Value
You can specify a count value through a load value for the 1Count5V.
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
Gate Control
To control the 1Count5V, you have to use the gate functions.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
129
1Count5V
3.6 Count Modes
RESET States
Value
RESET state
Load value
None
Up
Down
0
0
Assigned high counting limit
Count value
None
Up
Down
0
0
Assigned high counting limit
None
Up
Down
0
0
Assigned high counting limit
Latch value
None
Up
Down
0
0
Assigned high counting limit
Isochronous Mode
In isochronous mode, the 1Count5V 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 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 Isochronous Mode (http://support.automation.siemens.com/WW/view/en/15218045)
function manual)
130
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.6 Count Modes
3.6.2
Endless Counting
Definition
In this mode, the 1Count5V counts continuously starting from the load value:
If the 1Count5V reaches the high count limit when counting up, and another count pulse
then comes, it will jump to the low count limit and continue counting from there without
losing a pulse.
If the 1Count5V reaches the low count limit when counting down, and another count
pulse then comes, it will jump to the high count 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
*DWHVWDUW
Figure 3-2
*DWHVWRS
7LPH
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
131
1Count5V
3.6 Count Modes
132
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.6 Count Modes
3.6.3
Once-Only Counting
Definition
In this mode, the 1Count5V 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 count 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 count limit is reached, the counter jumps to the load value and the gate
is closed.
The high count limit can be assigned parameters, and the load value has RESET state
of 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 1Count5V jumps to the load value and the
gate is closed.
The low count limit is fixed at 0, and the load value can be assigned parameters
(parameter: high count limit) and can be changed.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
133
1Count5V
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
+LJK
FRXQWLQJOLPLW
676B2)/:
/RDGYDOXH
676B1'
/RZ
FRXQWLQJOLPLW
676B8)/:
*DWHVWDUW
Figure 3-3
$XWRPDWLF
JDWHVWRS
*DWHVWDUW
$XWRPDWLF
JDWHVWRS
7LPH
With an interrupting gate function, the counter status remains at the underflow when the gate
is started.
&RXQWHUVWDWXV
676B2)/:
+LJK
FRXQWLQJOLPLW
/RDGYDOXH
/RZ
FRXQWLQJOLPLW
*DWHVWDUW $XWRPDWLF
JDWHVWRS
Figure 3-4
134
*DWHVWDUW
$XWRPDWLF
JDWHVWRS
7LPH
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.6 Count Modes
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
135
1Count5V
3.6 Count Modes
3.6.4
Periodic Counting
Definition
In this mode, the 1Count5V counts periodically, 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 count limits are fixed at the maximum count range.
In the event of an overflow or underflow at the respective count limit, the 1Count5V
jumps to the load value and continues counting from there.
When the main count direction is up:
Counts starting from the load value.
Counts up or down.
The high limit can be assigned parameters, and the load value has a RESET status of
0 and can be changed.
When the high count limit is reached, the 1Count5V jumps to the load value and
continues counting from there.
When the count direction is down:
Counts starting from the load value.
Counts up or down.
When the low count limit is reached, the 1Count5V jumps to the load value and
continues counting from there.
The low count limit is fixed at 0, and the load value can be assigned parameters
(parameter: high count limit) and can be changed.
&RXQWHUYDOXH
+LJKFRXQWLQJ
OLPLW
676B2)/:
/RDGYDOXH
676B1'
/RZFRXQWLQJ
OLPLW
676B8)/:
*DWHVWDUW
Figure 3-5
136
*DWHVWRS
7LPH
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.6 Count Modes
&RXQWHUVWDWXV
+LJKFRXQWLQJ
OLPLW
676B2)/:
/RDGYDOXH
/RZFRXQWLQJ
OLPLW
*DWHVWDUW
Figure 3-6
*DWHVWRS
7LPH
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
137
1Count5V
3.6 Count Modes
3.6.5
138
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.6 Count Modes
3.6.6
Figure 3-7
*DWHVWRS
*DWHVWDUW
7LPH
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
139
1Count5V
3.6 Count Modes
&RXQWHUVWDWXV
+LJKFRXQWLQJOLPLW
/RDGYDOXH
/RZFRXQWLQJOLPLW
*DWHVWDUW
Figure 3-8
*DWHVWRS
*DWHVWDUW
7LPH
140
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.6 Count Modes
3.6.7
Latch Function
Introduction
There are two latch functions:
The Latch and Retrigger function
The Latch function
&RXQWSXOVHV
6:B*$7(
',GLJLWDOLQSXW
&RXQWHUVWDWXV
/DWFKYDOXH
Figure 3-9
This function stores the current internal counter status of the 1Count5V 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 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 counter status rather than the current counter status 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 counter status 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 DI digital input remains active even when the SW
gate is closed.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
141
1Count5V
3.6 Count Modes
Counting is also latched and triggered in isochronous mode with each edge on the digital
input. The counter status that was valid at the time of the last edge before Ti is displayed in
the feedback interface.
&RXQWSXOVHV
6:B*$7(
',GLJLWDOLQSXW
&RXQWHUVWDWXV
/DWFKYDOXH
Figure 3-10
Counter status 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 begins at the
load value.
The latch value is always the exact counter status at the time of the positive edge on the
digital input DI.
The stored counter status rather than the current counter status 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 counter status to be
changed.
In isochronous mode, the counter status 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.
142
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.6 Count Modes
3.6.8
Synchronization
Introduction
You can synchronize the 1Count5V by two methods:
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
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
143
1Count5V
3.6 Count Modes
If you have configured synchronization, the positive edge of a reference signal on the input
sets the 1Count5V 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.
Synchronize once only: If the enable bit is set, the first edge loads the 1Count5V with the
load value.
Synchronization periodically: If the enable bit is set, the first and every further edge loads
the 1Count5V with the load value.
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 isochronous 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.
144
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.6 Count Modes
'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
If you have configured 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.
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.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
145
1Count5V
3.6 Count Modes
Synchronize once only: If the enable bit is set and the HW enable is present, the first zero
mark loads the 1Count5V with the load value.
Synchronization periodically: If the enable bit is set and the HW enable is present, the
first and every further zero mark loads the 1Count5V with the load value.
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 isochronous 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.
146
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.6 Count Modes
3.6.9
Introduction
The 1Count5V allows you to store two comparison values, which are assigned to the digital
outputs. The outputs can be activated, depending on the counter status and comparison
values. The various ways of setting the behavior of the outputs are described in this section.
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.
Isochronous mode: In isochronous mode, the outputs DO1 and DO2 are switched at time To.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
147
1Count5V
3.6 Count Modes
148
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.6 Count Modes
V2 counter status V1
V2 = V1
V2 = counter status = V1
V2 counter status V1
V1 counter status 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
Operating Instructions, 06/2010, A5E00124867-07
149
1Count5V
3.6 Count Modes
Isochronous mode: In isochronous mode, as well, the DO1 output is switched as soon as the
comparison condition is fulfilled and is therefore independent of the bus cycle.
&RXQWHUVWDWXV
9
9
W
'2
Figure 3-13
W
&RXQWHUVWDWXV
9
9
W
'2
Figure 3-14
W
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
Hysteresis
An encoder can remain at a particular position and then fluctuate around this position. This
state causes the counter status 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. The 1Count5V is equipped with
programmable hysteresis to prevent this switching in response to small fluctuations. You can
assign a range between 0 and 255 (0 means: hysteresis switched off).
Hysteresis also works with overflow and underflow.
150
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.6 Count Modes
Method of Operation with Counter Status Comparison Value and Counter Status Comparison
Value
The diagram below provides an example of how hysteresis works. The figure shows the
various responses of an output with a hysteresis of 0 (= switched off) 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 counter status 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.
&RXQWYDOXH
+\V
+\V
Figure 3-15
Note
If the count direction changes on the comparison value when hysteresis is active, the output
is reset.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
151
1Count5V
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.
&RXQWYDOXH
+\V
+\V
Figure 3-16
152
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
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
various responses of an output with a hysteresis of 0 (= switched off) 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 is enabled, the 1Count5V stores the count direction. If the hysteresis range
is exited in a different direction to the one stored, a pulse is output.
&RXQWYDOXH
+\V
+\V
Figure 3-17
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
153
1Count5V
3.6 Count Modes
-2147483648
to
high counting limit -1
1
to
2147483647
154
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.6 Count Modes
3.6.10
Assignment of the Feedback and Control Interface for the Count Modes
Note
For the 1Count5V, the following data of the control and feedback interface are consistent:
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
Address
Assignment
Bytes 0 to 3
Count value or stored count value in the case of the latch function on the digital input
Byte 4
ERR_24V
ERR_DO1
ERR_PARA
ERR_DO2
ERR_ENCODER
RES_STS_A
ERR_LOAD
Byte 5
Designation
STS_LOAD
STS_C_DN
STS_C_UP
Bit 5: Reserve = 0
Bit 4: DO2 status
STS_DO2
STS_DO1
Bit 2: Reserve = 0
Bit 1: DI status
STS_DI
STS_GATE
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
155
1Count5V
3.6 Count Modes
Address
Byte 6
Assignment
Designation
Bit 7: Zero-crossing in the count range when counting without a main count direction
STS_ND
STS_UFLW
STS_OFLW
STS_CMP2
STS_CMP1
Bit 2: Reserve = 0
Bit 1: Reserve = 0
STS_SYN
Reserve = 0
Bytes 8 to 11
Count value 1
Table 3- 5
Address
Assignment
Bytes 0 to 3
Bit 1
Bit 0
Function DO1
Output
blocked
blocked
blocked
Bit 5
Bit 4
Function DO2
Output
156
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.6 Count Modes
Address
Assignment
Byte 4
EXTF_ACK
CTRL_DO2
SET_DO2
CTRL_DO1
SET_DO1
RES_STS
CTRL_SYN
SW_GATE
Byte 5
Bit 6: Reserve = 0
Bit 5: Reserve = 0
C_DOPARAM
CMP_VAL2
CMP_VAL1
LOAD_PREPARE
LOAD_VAL
Bytes 6 to 7
1 Not
Reserve = 0 1
Control bits
Notes
C_DOPARAM
CMP_VAL1
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
EXTF_ACK
Error acknowledgment
The error bits must be acknowledged with the EXTF_ACK control bit after the cause is removed.
LOAD_PREPARE
LOAD_VAL
The value from bytes 0 to 3 is loaded directly as the new count value.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
157
1Count5V
3.6 Count Modes
Control bits
Notes
RES_STS
SET_DO1
SET_DO2
Switches the DO1 digital output on and off when CTRL_DO1 is set.
Switches the DO2 digital output on and off when CTRL_DO2 is set.
SW_GATE
Feedback bits
Notes
ERR_24V
ERR_DO1
ERR_DO2
ERR_ENCODER
ERR_LOAD
ERR_PARA
RES_STS_A
STS_C_DN
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.
158
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.6 Count Modes
Feedback bits
Notes
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.
STS_GATE
STS_LOAD
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
STS_UFLW
STS_SYN
Synchronization status
After successful synchronization, the STS_SYN bit is set. It must be reset by the RES_STS control
bit.
Feedback interface
Control interface
Load and transfer commands are also possible with CPU 3xxC, CPU 3xx with MMC, and CPU 4xx (V3.0 and later).
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
159
1Count5V
3.6 Count Modes
)HHGEDFNVLJQDOV
2QHRIWKHVWDWXV
ELWV
&RQWUROELW
5(6B676
)HHGEDFNELW
5(6B676B$
W
5HVHWH[HFXWHG
5HTXHVWFDQFHOHG
&RXQW9H[HFXWHVWKHUHVHW
5HTXHVWUHVHW
Figure 3-18
)HHGEDFNELW
676B/2$'
W
9DOXHDSSOLHG(QGRIWUDQVIHU
5HPRYDORIUHTXHVWDQGYDOXH
FRQWLQXHSURYLGLQJ
7KH&RXQW9KDVXQGHUVWRRGWKHUHTXHVW
5HTXHVWYDOXHWUDQVIHUDQGPDNHYDOXHDYDLODEOH
Figure 3-19
160
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
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.
QG'3F\FOH
UG'3F\FOH
WK'3F\FOH
&RQWUROELW
LQXVHU
SURJUDP
6WDWXVELW
RIPRGXOH
7L
7'3
Figure 3-20
7L
7'3
7L
7'3
7L
7'3
7L
7'3
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
161
1Count5V
3.6 Count Modes
Error Detection
The program errors must be acknowledged. They have been detected by the 1Count5V and
are indicated at the feedback interface.
Channel-specific diagnostics are performed if you have enabled group diagnostics in your
configuration (see device manual of the interface module used).
The parameter assignment error bit is acknowledged by means of correct parameter
assignment.
$QHUURUKDVRFFXUUHGWKH&RXQW9VHWVDQHUURUELWD
GLDJQRVWLFPHVVDJHPD\DSSHDUHUURUGHWHFWLRQFRQWLQXHV
(UURUHOLPLQDWHGZKHQ(;7)B$&.LVVHWE\WKHXVHU
SURJUDPWKH&RXQW9GHOHWHVWKHHUURUELWDGLDJQRVWLF
PHVVDJHPD\DSSHDU
HJHUURUELW
(55B9
(UURUDFNQRZOHGJPHQW
(;7)B$&.
Figure 3-21
Error Acknowledgment
162
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.6 Count Modes
3.6.11
Introduction
You can use either of the following to assign parameters for the 1Count5V:
STEP 7 V5.3 SP2 or later
A GSD file (http://www.automation.siemens.com/csi/gsd)
Parameter
Value Range
Default
Disable/enable
Disable
Enable
Group diagnostics
Turn off DO
Signal evaluation A, B
Diagnostics A and B
Off/on
Off
Encoder parameters
Diagnostics N
Off/on
Off
Direction input B
Normal/inverted
normal
Function DO1
Output/
Switch on at counter status comparison value/
Switch on at counter status comparison value/
Pulse on reaching the comparison value/
Switch at comparison values
Output
Function DO2
Output/
Switch on at counter status comparison value/
Switch on at counter status comparison value/
Pulse on reaching the comparison value
Output
0/1
0/1
Off/on
Off
Output parameters
Diagnostics
DO11
Diagnostics
DO21
Off/on
Off
0...255
0...255
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
163
1Count5V
3.6 Count Modes
Parameter
Mode
Value Range
Default
Counting mode
Continuous counting/
Once-only counting/
Periodic counting
Count continuously
Gate function
Cancel counting/
Interrupt counting
Cancel counting
Normal/inverted
Normal
Function DI
Input/
HW gate/
Latch and retrigger at positive edge/
Synchronization at positive edge/
Latch at positive edge/
HW enable for synchronization
Input
Synchronization2
Once only/Periodic
Once-only
None/Up/Down
None
2 7FFF FFFF
7FFF FFFF
DO1/DO2 diagnostics (wire break) is possible only with pulse lengths of > 90 ms on digital output DO1/DO2.
164
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.7 Measurement Modes
3.7
Measurement Modes
3.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
To run one of these modes, you have to assign parameters to the 1Count5V (see section
"Parameter Assignment for Measurement Modes (Page 195)").
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
Operating Instructions, 06/2010, A5E00124867-07
165
1Count5V
3.7 Measurement Modes
3.7.2
Measuring Principle
The 1Count5V 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.
Rule for pulse sequences with one or several pulses 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.
166
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
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
'\QDPLF
PHDVXULQJWLPH
'\QDPLF
PHDVXULQJWLPH
8SGDWHWLPH
8SGDWHWLPH
8SGDWHWLPH
'\QDPLF
PHDVXULQJWLPH
8SGDWHWLPH
'\QDPLF
PHDVXULQJWLPH
'\QDPLF
PHDVXULQJWLPH
'\QDPLF
PHDVXULQJWLPH
Figure 3-22
Measuring Principle
The 1Count5V 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, 06/2010, A5E00124867-07
167
1Count5V
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
Gate Control
To control the 1Count5V, you have to use the gate functions.
Isochronous Mode
In isochronous mode, the 1Count5V 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 transfers a measured value and the status bits that were valid
at time Ti.
The measurement starts and ends at time Ti.
168
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.7 Measurement Modes
Note
When you change the configuration from non-isochronous to isochronous 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, 06/2010, A5E00124867-07
169
1Count5V
3.7 Measurement Modes
3.7.3
Definition
In frequency measurement mode, the 1Count5V 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
Boundary conditions
Integration time
Range of n
nmin
Non-isochronous mode
Isochronous mode
Any TDP
n x 10 ms
TDP < 10 ms
n x TDP
TDP 10 ms
n x TDP
nmax
1
1000
1
1000
10000 ms/TDP [ms] 1
1 Any
digits after the decimal point that come about after dividing by TDP are omitted.
It is not permitted to violate these limits. If these limits are violated, the 1Count5V generates a parameter assignment error
and will not go into isochronous mode.
Frequency measurement
The value of the calculated frequency is made available in the unit 10-3 Hz. The measured
frequency value can be read in the feedback interface (byte 0 to 3).
,QWHJUDWLRQWLPH
,QWHJUDWLRQWLPH
&RXQWSXOVHV
,QWHUQDOJDWH
%HJLQQLQJRIIUHTXHQF\
PHDVXUHPHQW
Figure 3-24
170
(QGRI
)UHTXHQF\PHDVXUHPHQW
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.7 Measurement Modes
Limit-Value Monitoring
The following value ranges are permitted for limit-value monitoring:
Low limit fu
0 to 499,999,999
High limit fo
10-3
Hz
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
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
171
1Count5V
3.7 Measurement Modes
3.7.4
Definition
In frequency measurement mode, the 1Count5V counts the pulses that arrive within a
dynamic measuring period.
Update Time
The 1Count5V 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
Boundary conditions
Update time
Range of n
nmin
Non-isochronous mode
Isochronous mode
Any TDP
n x 10 ms
TDP < 10 ms
n x TDP
TDP 10 ms
n x TDP
nmax
1
1000
1
1000
10000 ms/TDP [ms] 1
Any digits after the decimal point resulting from division by TDP are omitted.
These limits may not be violated. If these limits are violated, the 1Count5V generates a parameter assignment error and
will not go into isochronous mode.
Frequency measurement
The value of the calculated frequency is made available in the unit 10-3 Hz. The measured
frequency value can be read in the feedback interface (byte 0 to 3).
8SGDWHWLPH
8SGDWHWLPH
&RXQWSXOVHV
,QWHUQDOJDWH
6WDUWRIIUHTXHQF\
PHDVXUHPHQW
Figure 3-25
172
(QGRI
IUHTXHQF\PHDVXUHPHQW
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.7 Measurement Modes
Limit-Value Monitoring
The following value ranges are permitted for limit-value monitoring:
Encoder type
Low limit fu
5-V encoders
High limit fo
0 to 499,999,999
10-3
Hz
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
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
173
1Count5V
3.7 Measurement Modes
174
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.7 Measurement Modes
3.7.5
Definition
In rotational speed measurement mode, the 1Count5V 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
Boundary conditions
Integration time
Range of n
nmin
Non-isochronous mode
Isochronous mode
Any TDP
n x 10 ms
TDP < 10 ms
n x TDP
TDP 10 ms
n x TDP
nmax
1
1000
1
1000
10000 ms/TDP [ms] 1
Any digits after the decimal point resulting from division by TDP are omitted.
These limits may not be violated. If these limits are violated, the 1Count5V generates a parameter assignment error and
will not go into isochronous mode.
1
,QWHJUDWLRQWLPH
&RXQWSXOVHV
,QWHUQDO*DWH
%HJLQQLQJRIURWDWLRQDO
VSHHGPHDVXUHPHQW
Figure 3-26
(QGRIURWDWLRQDO
VSHHGPHDVXUHPHQW
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
175
1Count5V
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
10-3
/min
Possible Measuring Ranges with Error Indication (Number of Pulses per Encoder
Revolution = 60)
Integration time
176
10 s
1s
0.1 s
0.01 s
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.7 Measurement Modes
3.7.6
Definition
In rotational speed measurement mode, the 1Count5V 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 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
Boundary conditions
Update time
Range of n
nmin
Non-isochronous mode
Isochronous mode
nmax
Any TDP
n x 10 ms
1000
TDP < 10 ms
n x TDP
1000
TDP 10 ms
n x TDP
1 Any
digits after the decimal point that come about after dividing by TDP are omitted.
These limits may not be violated. If these limits are violated, the 1Count5V generates a parameter assignment error and
will not go into isochronous mode.
8SGDWHWLPH
&RXQWSXOVHV
,QWHUQDOJDWH
6WDUWRIURWDWLRQDOVSHHG
PHDVXUHPHQW
Figure 3-27
(QGRI
URWDWLRQDOVSHHGPHDVXUHPHQW
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
177
1Count5V
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
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
178
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.7 Measurement Modes
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
179
1Count5V
3.7 Measurement Modes
3.7.7
Definition
In period measurement mode, the 1Count5V 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 the table below).
Boundary conditions
Integration time
Range of n
nmin
Non-isochronous mode
Isochronous mode
Any TDP
n x 10 ms
TDP < 10 ms
n x TDP
TDP 10 ms
n x TDP
nmax
1
10 ms/TDP [ms] +1
1
12000
1
12000
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 generates a parameter assignment error and
will not go into isochronous mode.
Period Measurement
The value of the calculated period is given in the unit 1 s or 1/16 s. The measured period
can be read in the feedback interface (byte 0 to 3).
,QWHJUDWLRQWLPH
,QWHJUDWLRQWLPH
3HULRG
&RXQWSXOVHV
,QWHUQDOJDWH
6WDUWRISHULRG
PHDVXUHPHQW
Figure 3-28
180
(QGRISHULRG
PHDVXUHPHQW
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
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
1/16 s resolution
Low limit Tu
High limit To
T absolute error
100 s
1 s* (10 0)
10 s
1 s* (10 0)
1s
1 s* (10 0)
0.1 s
1 s* (10 0)
0.01 s
1 s* (10 0)
1 s* (10 000 1)
1/16 s resolution
Integration time
100 s
T absolute error
1/16 s* (160 0)
10 s
1/16 s* (160 0)
1s
1/16 s* (160 0)
0.1 s
1/16 s* (160 0)
0.01 s
1/16 s* (160 0)
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
181
1Count5V
3.7 Measurement Modes
3.7.8
Definition
In period measurement mode, the 1Count5V 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 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
Non-isochronous mode
Isochronous mode
Any TDP
n x 10 ms
TDP < 10 ms
n x TDP
TDP 10 ms
n x TDP
nmax
1
12000
1
12000
120 000 ms/TDP [ms] 1
1 Any digits after the decimal point that come about after dividing by TDP are omitted.
These limits may not be violated. If these limits are violated, the 1Count5V generates a parameter assignment error and
will not go into isochronous mode.
Period measurement
The value of the calculated period is given in the unit 1 s or 1/16 s. The measured period
can be read in the feedback interface (byte 0 to 3).
8SGDWHWLPH
8SGDWHWLPH
3HULRG
&RXQWSXOVHV
,QWHUQDOJDWH
6WDUWRISHULRGPHDVXUH
PHQW
Figure 3-29
182
(QGRISHULRGPHDVXUH
PHQW
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
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
1/16 s resolution
Low limit Tu
High limit To
Period
Tmin absolute error
1 s* (10 0)
1 s* (100 0)
1 s* (1 000 0)
1 s* (10 000 1)
1/16 s resolution
Period
Tmin absolute error
Period
Tmin absolute error
1/16 s* (160 1)
1/16 s* (1 600 1)
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
183
1Count5V
3.7 Measurement Modes
184
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.7 Measurement Modes
3.7.9
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 isochronous 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 isochronous 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, 06/2010, A5E00124867-07
185
1Count5V
3.7 Measurement Modes
3.7.10
Introduction
The various ways of setting the behavior of the outputs are described in this section.
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 isochronous mode, the outputs are switched at time To.
186
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.7 Measurement Modes
Limit-Value Monitoring
2)/:
8)/:
*DWHVWDUW
0HDVXUHGYDOXH
/RZ
OLPLW
Figure 3-30
+LJK
OLPLW
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
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
187
1Count5V
3.7 Measurement Modes
3.7.11
Assignment Tables
Table 3- 15
Address
Bytes 0 to 3
Byte 4
Measured value
Bit 7: Short circuit of the encoder supply
Bit 6: Short circuit / wire break / overtemperature
Bit 5: Parameter assignment error
Bit 4: Short circuit / wire break / overtemperature
Bit 3: Short circuit / wire break / encoder signal
Bit 2: Resetting of status bits active
Bit 1: Load function error
Bit 0: Load function is running
Byte 5
Bit 7: Down direction status
Bit 6: Up direction status
Bit 5: Reserve = 0
Bit 4: DO2 status
Bit 3: DO1 status
Bit 2: Reserve = 0
Bit 1: DI status
Bit 0: Internal gate status
Byte 6
Bit 7: Reserve = 0
Bit 6: Low limit of measuring range
Bit 5: High limit of measuring range
Bit 4: Reserve = 0
Bit 3: Measurement completed
Bit 2: Reserve = 0
Bit 1: Reserve = 0
Bit 0: Reserve = 0
Byte 7
Reserve = 0
Bytes 8 to 11
Count value 1
1 Modified user data interface
188
Designation
ERR_24V
ERR_DO1
ERR_PARA
ERR_DO2
ERR_ENCODER
RES_STS_A
ERR_LOAD
STS_LOAD
STS_C_DN
STS_C_UP
STS_DO2
STS_DO1
STS_DI
STS_GATE
STS_UFLW
STS_OFLW
STS_CMP1
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.7 Measurement Modes
Table 3- 16
Address
Assignment
Bytes 0 to 3
Bytes 1 to 3:
Bit 1
Bit 0
Function DO1
Output
Reserve = 0
Byte 4
Byte 5
Bytes 6 to 7
1
Byte 2, 3:
Reserve = 0
Bit 7:
Bit 6:
Bit 5:
Bit 4:
Bit 3:
Bit 2:
Bit 1:
Reserve = 0
Bit 0:
Bit 7:
Reserve = 0
Bit 6:
Reserve = 0
Bit 5:
Reserve = 0
Bit 4:
Bit 3:
Reserve = 0
Bit 2:
Bit 1:
Bit 0:
Reserve = 01
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
189
1Count5V
3.7 Measurement Modes
Control bits
Notes
C_DOPARAM
C_INTTIME
CTRL_DO1
Enable DO1
CTRL_DO2
Enable DO2
Error acknowledgment
The error bits must be acknowledged with the EXTF_ACK control bit after the cause is removed.
LOAD_PREPARE
LOAD_VAL
RES_STS
SET_DO1
SET_DO2
SW_GATE
190
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.7 Measurement Modes
Feedback bits
Notes
ERR_24V
ERR_DO1
ERR_DO2
ERR_ENCODER
ERR_LOAD
ERR_PARA
RES_STS_A
STS_C_DN
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
STS_LOAD
STS_OFLW
STS_UFLW
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
191
1Count5V
3.7 Measurement Modes
Feedback interface
Control interface
Load and transfer commands are also possible with CPU 3xxC, CPU 3xx with MMC, and CPU 4xx (V3.0 and later).
)HHGEDFNVLJQDOV
2QHRIWKHVWDWXV
ELWV
&RQWUROELW
5(6B676
)HHGEDFNELW
5(6B676B$
W
5HVHWH[HFXWHG
5HTXHVWFDQFHOHG
&RXQW9H[HFXWHVWKHUHVHW
5HTXHVWUHVHW
Figure 3-31
192
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.7 Measurement Modes
W
W
)HHGEDFNELW
676B/2$'
W
9DOXHDSSOLHG(QGRIWUDQVIHU
5HPRYDORIUHTXHVWDQGYDOXH
FRQWLQXHSURYLGLQJ
7KH&RXQW9KDVXQGHUVWRRGWKHUHTXHVW
5HTXHVWYDOXHWUDQVIHUDQGPDNHYDOXHDYDLODEOH
Figure 3-32
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, 06/2010, A5E00124867-07
193
1Count5V
3.7 Measurement Modes
QG'3F\FOH
UG'3F\FOH
WK'3F\FOH
&RQWUROELW
LQXVHU
SURJUDP
6WDWXVELW
RIPRGXOH
7L
7'3
Figure 3-33
7L
7'3
7L
7L
7'3
7'3
7L
7'3
Error Detection
The diagnostic errors must be acknowledged. They have been detected by the 1Count5V
and are indicated at the feedback interface. Channel-specific diagnostics are performed if
you have enabled group diagnostics in your configuration (see device manual of the
interface module used).
The parameter assignment error bit is acknowledged by means of correct parameter
assignment.
$QHUURUKDVRFFXUUHGWKH&RXQW9VHWVDQHUURUELWD
GLDJQRVWLFPHVVDJHPD\DSSHDUHUURUGHWHFWLRQFRQWLQXHV
(UURUHOLPLQDWHGZKHQ(;7)B$&.LVVHWE\WKHXVHU
SURJUDPWKH&RXQW9GHOHWHVWKHHUURUELWDGLDJQRVWLF
PHVVDJHPD\DSSHDU
HJHUURUELW
(55B9
(UURUDFNQRZOHGJPHQW
(;7)B$&.
Figure 3-34
Error Acknowledgment
194
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.7 Measurement Modes
3.7.12
Introduction
You can use either of the following to assign parameters for the 1Count5V:
STEP 7 V5.3 SP2 or later
A GSD file (http://www.automation.siemens.com/csi/gsd)
Parameter
Value Range
Default
Disable/enable
Disable
Enable
Group diagnostics
Turn off DO
Diagnostics A and B
Off/on
Off
Direction input B
Normal/Inverted
Normal
Diagnostics DO1 1
Off/on
Off
Diagnostics DO2 1
Off/on
Off
Function DO1
Output/
Outside the limits/
Under the low limit/
Over the high limit
Output
0/1
0/1
Frequency measurement/
Rotational speed measurement/
Period measurement
Frequency measurement
Measuring method
Resolution of period
1 s
1 s
Output parameters
Mode
Measuring mode
1/16 s
Function DI
Input/HW gate
Input
Normal/Inverted
Normal
Low limit
Frequency measurement:
0 to fmax-1
Period measurement:
0 to Tmax-1
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
195
1Count5V
3.7 Measurement Modes
Parameter
Value Range
Default
High limit
Frequency measurement:
Low limit+1 to fmax
fmax
nmax
Period measurement:
Low limit+1 to Tmax
Tmax
Frequency measurement:
1...1000
10
10
Period measurement:
1... 12000
10
1...65535
DO1/DO2 diagnostics (wire break, short circuit) are possible only with pulse lengths of >90 ms on digital output
DO1/DO2.
196
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
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 encompasses 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.
You can find the parameter assignment for "Fast Mode" in the chapter "Assigning
parameters for fast mode (Page 203)".
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 the HW gate.
Isochrone Mode
In each cycle, the 1Count5V transfers the count and the status bits that were valid at time Ti.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
197
1Count5V
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.
3.8.3
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.
198
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
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, 06/2010, A5E00124867-07
199
1Count5V
3.8 Fast mode
'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.
200
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.8 Fast mode
3.8.5
Assignment Tables
Address
Assignment
Name
Bytes 0 to 3
Bit 31
Sign of life
LZ
Bit 30
STS_TIC
Bit 29
ERR_PARA
Bit 28
Group error
Encoder supply short circuit
Short circuit / wire break / encoder signal
EXTF
Bit 27
DI status
STS_DI
Bit 26
STS_DIR
Bit 25
STS_GATE
Bits 0 to 24
Count value
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
ERR_PARA
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
STS_DIR
STS_GATE
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
201
1Count5V
3.8 Fast mode
202
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.8 Fast mode
3.8.6
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
Value Range
Default
Off/on
Off
Diagnostics N
Off/on
Off
Signal evaluation A, B
Rotary encoder
single/double/quadruple
Direction input B
Normal/inverted
Normal
Fast mode
Fast mode
Fast mode
Gate function
Cancel counting/
Cancel counting
Mode
Interrupt counting
Input signal HW gate
Function DI
Normal/inverted
Normal
Input /
Input
HW gate/
Synchronization at positive edge/
HW enable for synchronization
Load value
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
203
1Count5V
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 isochronous 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 run this mode, you have to assign parameters to the 1Count5V (see section "Assigning
Parameters for Position Feedback (Page 221)").
Load value
You can specify a load value for the 1Count5V.
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, you have to use the gate functions.
204
RESET States
Value
RESET state
Load value
Count value
Latch value
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.9 Position feedback
Isochronous mode
In isochronous mode, the 1Count5V 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 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.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
205
1Count5V
3.9 Position feedback
3.9.2
Position detection
Definition
In this mode, the 1Count5V counts continuously starting from the load value:
If the 1Count5V reaches the high count limit when counting up, and another count pulse
then comes, it will jump to the low count limit and continue counting from there without
losing a pulse.
If the 1Count5V reaches the low count limit when counting down, and another count
pulse then comes, it will jump to the high count 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
*DWHVWDUW
Figure 3-35
*DWHVWRS
7LPH
206
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.9 Position feedback
3.9.3
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, 06/2010, A5E00124867-07
207
1Count5V
3.9 Position feedback
Figure 3-36
*DWHVWRS
*DWHVWDUW
7LPH
+LJKFRXQWLQJOLPLW
/RDGYDOXH
/RZFRXQWLQJOLPLW
*DWHVWDUW
Figure 3-37
208
*DWHVWRS
*DWHVWDUW
7LPH
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
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 isochronous 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 isochronous 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, 06/2010, A5E00124867-07
209
1Count5V
3.9 Position feedback
3.9.4
Latch Function
Overview
There are two latch functions:
The Latch and Retrigger function
The Latch function
&RXQWSXOVHV
6:B*$7(
',GLJLWDOLQSXW
&RXQWHUVWDWXV
/DWFKYDOXH
Figure 3-38
This function stores the current internal counter status of the 1Count5V 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 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 counter status rather than the current counter status 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 counter status to be
changed.
210
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.9 Position feedback
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 isochronous mode with each edge on the digital
input. The counter status that was valid at the time of the last edge before Ti is displayed in
the feedback interface.
&RXQWSXOVHV
6:B*$7(
',GLJLWDOLQSXW
&RXQWHUVWDWXV
/DWFKYDOXH
Figure 3-39
Counter status 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 begins at the
load value.
The latch value is always the exact counter status at the time of the positive edge on the
digital input DI.
The stored counter status rather than the current counter status 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 counter status to be
changed.
In isochronous mode, the counter status 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, 06/2010, A5E00124867-07
211
1Count5V
3.9 Position feedback
212
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
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
If you have configured synchronization, the positive edge of a reference signal on the input
sets the 1Count5V to the load value.
You can select between once-only and periodic synchronization ("Synchronization"
parameter).
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
213
1Count5V
3.9 Position feedback
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.
Synchronize once only: If the enable bit is set, the first edge loads the 1Count5V with the
load value.
Synchronization periodically: If the enable bit is set, the first and every further edge loads
the 1Count5V with the load value.
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 isochronous 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.
214
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.9 Position feedback
3.9.6
Assignment Tables
Table 3- 22
Address
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
Bit 6:
Reserve = 0
Bit 5:
Parameter assignment error
Bit 4:
Reserve = 0
Bit 3:
Reserve = 0
Bit 2:
Resetting of status bits active
Bit 1:
Load function error
Bit 0:
Load function is running
Byte 5
Bit 7:
Down direction status
Bit 6:
Up direction status
Bit 5:
Reserve = 0
Bit 4:
Reserve = 0
Bit 3:
Reserve = 0
Bit 2:
Reserve = 0
Bit 1:
DI status
Bit 0:
Internal gate status
Byte 6
Bit 7:
Zero crossing
Bit 6:
Low counting limit
Bit 5:
High counting limit
Bit 4:
Reserve = 0
Bit 3:
Reserve = 0
Bit 2:
Reserve = 0
Bit 1:
Reserve = 0
Bit 0:
Synchronization status
Byte 7
Reserve = 0
Bytes 8 to 11
Count value 1
1 Modified user data interface
Designation
Bytes 0 to 3
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
ERR_24V
ERR_PARA
RES_STS_A
ERR_LOAD
STS_LOAD
STS_C_DN
STS_C_UP
STS_DI
STS_GATE
STS_ND
STS_UFLW
STS_OFLW
STS_SYN
215
1Count5V
3.9 Position feedback
Table 3- 23
Address
Bytes 0 to 3
Byte 4
Bit 6:
Reserve = 0
Bit 5:
Reserve = 0
Bit 4:
Reserve = 0
Bit 3:
Reserve = 0
RES_STS
Bit 2:
CTRL_SYN
Bit 1:
Enable synchronization
SW_GATE
Bit 0:
Bit 7:
Reserve = 0
Bit 6:
Reserve = 0
Bit 5:
Reserve = 0
Bit 4:
Reserve = 0
Bit 3:
Reserve = 0
EXTF_ACK
Byte 5
Bit 2:
Reserve = 0
LOAD_PREPARE
Bit 1:
LOAD_VAL
Bit 0:
Bytes 6 to 7
1
Assignment
Reserve = 0 1
Control bits
Notes
CTRL_SYN
EXTF_ACK
Error acknowledgment
The error bits must be acknowledged with the EXTF_ACK control bit after the cause is removed.
LOAD_PREPARE
LOAD_VAL
The value from bytes 0 to 3 is loaded directly as the new count value.
RES_STS
SW_GATE
216
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.9 Position feedback
Feedback Bits
Notes
ERR_24V
ERR_LOAD
ERR_PARA
RES_STS_A
STS_C_DN
STS_C_UP
Up direction status
STS_DI
DI status
STS_GATE
STS_LOAD
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
STS_UFLW
STS_SYN
Synchronization status
The status of the DI is indicated in all modes with the STS_DI bit in the feedback interface.
Feedback interface
Control interface
Load and transfer commands are also possible with CPU 3xxC, CPU 3xx with MMC, CPU 4xx (V3.0 and later), and
WinLC RTX (PC CPU).
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
217
1Count5V
3.9 Position feedback
)HHGEDFNVLJQDOV
2QHRIWKHVWDWXV
ELWV
&RQWUROELW
5(6B676
)HHGEDFNELW
5(6B676B$
W
5HVHWH[HFXWHG
5HTXHVWFDQFHOHG
&RXQW9H[HFXWHVWKHUHVHW
5HTXHVWUHVHW
Figure 3-41
W
W
)HHGEDFNELW
676B/2$'
W
9DOXHDSSOLHG(QGRIWUDQVIHU
5HPRYDORIUHTXHVWDQGYDOXH
FRQWLQXHSURYLGLQJ
7KH&RXQW9KDVXQGHUVWRRGWKHUHTXHVW
5HTXHVWYDOXHWUDQVIHUDQGPDNHYDOXHDYDLODEOH
Figure 3-42
218
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.9 Position feedback
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.
QG'3F\FOH
UG'3F\FOH
WK'3F\FOH
&RQWUROELW
LQXVHU
SURJUDP
6WDWXVELW
RIPRGXOH
7L
7'3
Figure 3-43
7L
7'3
7L
7'3
7L
7'3
7L
7'3
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
219
1Count5V
3.9 Position feedback
Error Detection
The program errors must be acknowledged. They have been detected by the 1Count5V and
are indicated at the feedback interface. Channel-specific diagnostics are performed if you
have enabled group diagnostics in your configuration (see device manual of the interface
module used).
The parameter assignment error bit is acknowledged by means of correct parameter
assignment.
$QHUURUKDVRFFXUUHGWKH&RXQW9VHWVDQHUURUELWD
GLDJQRVWLFPHVVDJHPD\DSSHDUHUURUGHWHFWLRQFRQWLQXHV
(UURUHOLPLQDWHGZKHQ(;7)B$&.LVVHWE\WKHXVHU
SURJUDPWKH&RXQW9GHOHWHVWKHHUURUELWDGLDJQRVWLF
PHVVDJHPD\DSSHDU
HJHUURUELW
(55B9
(UURUDFNQRZOHGJPHQW
(;7)B$&.
Figure 3-44
Error Acknowledgment
220
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.9 Position feedback
3.9.7
Introduction
You can use either of the following to assign parameters for the 1Count5V:
STEP 7 V5.3 SP2 or later
A GSD file (http://www.automation.siemens.com/csi/gsd)
Parameter
Value Range
Default
Disable/enable
Disable
Enable
Group diagnostics
Turn off
Continue working mode
Turn off
Encoder parameters
Diagnostics A and B
Off/on
Off
Diagnostics N
Off/on
Off
Signal evaluation A, B
Direction input B
Normal/inverted
Normal
Position feedback
Position detection
Position detection
Gate function
Cancel counting/
Interrupt counting
Cancel counting
Normal/inverted
Normal
Function DI
Input /
HW gate /
Latch and retrigger at positive edge /
Synchronization at positive edge /
HW enable for synchronization /
Latch at positive edge
Input
Synchronization 1
Once only/Periodic
Once-only
Mode
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
221
1Count5V
3.10 Evaluation of count and direction signal
3.10
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 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
8S
Figure 3-45
222
'RZQ
Single Evaluation
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
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
Figure 3-46
GRZQ
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
Figure 3-47
GRZQ
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, 06/2010, A5E00124867-07
223
1Count5V
3.11 Diagnostics
3.11
Diagnostics
3.11.1
83
6<1
'1
UP
DN
SYN
Cause
13
16
On
DO 1 is activated.
On
DO 2 is activated.
On
224
Remedy
DI is activated.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.11 Diagnostics
3.11.2
Error types
For information on the structure of the channel-related diagnostics, refer to the manual on
the interface module used in your ET 200S station.
Meaning
Remedy
1D
5D
00101: Overtemperature
6D
9D
01001: Error
16D
26D
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
225
1Count5V
3.12 Behavior at CPU-Master-STOP
3.12
Behavior at CPU-Master-STOP
What Happens if
New Parameters Have Been Assigned?
Turn off DO
DO substitute a value
If 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 executed during startup, set the SW gate control bit and transfer
the values to the 1Count5V.
226
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.12 Behavior at CPU-Master-STOP
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
227
1Count5V
3.13 Technical Specifications
3.13
Technical Specifications
Technical specifications
General technical specifications of the 1Count5V
Dimensions and Weight
Dimensions W x H x D (mm)
308152
Weight
Approx. 65 g
Counter range
32 bits
24 VDC
Yes
Galvanic isolation
Between backplane bus and counter function
Between counter function and load voltage
Yes
Encoder supply
Output voltage
Output current
L+ (-0.8 V)
Current consumption
From the backplane bus
From load voltage L+ (no load)
max. 10 mA
Power dissipation
Typ. 2 W
No
45 mA, typical
228
Input current
0 signal
1 signal
2 mA (quiescent current)
2.5 s
Possible
Input characteristic
50 m, maximum
9 mA (typically)
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1Count5V
3.13 Technical Specifications
General technical specifications of the 1Count5V
Encoder Signals
Level
Terminating resistance
330
1 V, minimum
500 kHz
Yes
50 m, maximum
24 VDC
3V
L+ (-1V)
0.5 mA
5 mA to 2.4 A
2A
100 Hz
2 Hz
10 Hz
Lamp load
10 W
100 s
Yes
Response threshold
2.6 A to 4 A
Inductive extinction
Yes; L+ -(50 to 60 V)
Yes
Cable lengths
Unshielded
Shielded
600 m
1000 m
Status, Diagnostics
Digital input DI status display
LED 16 (green)
LED 9 (green)
LED 13 (green)
UP LED (green)
DN LED (green)
Synchronization
Fault indicator
SF LED (red)
Diagnostic information
Yes
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
229
1Count5V
3.13 Technical Specifications
General technical specifications of the 1Count5V
Measuring Ranges in the Measuring Modes
Maximum measuring range
Frequency measurement
Rotational Speed Measurement
Period measurement
Response Times
Update rate of the counting modes
Non-isochronous mode
Isochronous mode
1 ms
TDP
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
230
TCI
370 s
TCO
0 s
ToiMin
0 s
TDPMin
815 s
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1SSI
4.1
Order Number
Compatibility
Features
Product Overview
6ES7 138-4DB03-0AB0
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.
The 1SSI is an interface between an absolute encoder (SSI) and the higher-level
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
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-1AA000AB0).
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
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
231
1SSI
4.1 Product Overview
Firmware update 1
To add functions and for troubleshooting, you can load firmware updates to the operating
system memory of the 1SSI using STEP 7 HW Config.
Note
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.
Restart the firmware update and wait until it has completed successfully.
Identification Data 1
Hardware release status
Serial number
See also ET 200S Distributed I/O operating instructions
(http://support.automation.siemens.com/WW/view/en/1144348), "Identification data" section.
The function is only available if the used interface module supports the required system
services.
Configuration
You can use either of the following to configure the 1SSI:
STEP 7 V5.4 SP2 and later, or with the HSP (hardware support package, available
online) STEP 7 V5.3 SP2 and later.
A GSD file (http://www.automation.siemens.com/csi/gsd)
232
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1SSI
4.2 Isochronous Mode
4.2
Isochronous Mode
Note
For basic information on isochronous mode, refer to the Isochronous mode
(http://support.automation.siemens.com/WW/view/en/15218045) function manual.
Hardware Requirements
You will require the following for the 1SS in isochronous mode:
A CPU that supports isochronous mode
PROFIBUS master or PROFINET controller that supports the constant bus cycle time
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 communication 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
Operating Instructions, 06/2010, A5E00124867-07
233
1SSI
4.3 Example: Starting 1SSI
4.3
Introduction
These instructions provide an example to guide you to a functioning application that will
enable you to become familiar and check the basic hardware and software functions of the
1SSI. For this example, you will operate the 1SSI in standard mode, rather than isochronous
mode.
Requirements
The following requirements must be satisfied:
You must have put an ET 200S station on an S7 station with a DP master into operation.
You must have the following:
A TM-E15S24-01 terminal module
An 1SSI
An SSI encoder and the necessary wiring material
70(6DQG(066,
6)
83
'1
&03
(6
'%$%
'
9'&
9'&
0
',
&
&
Figure 4-1
234
'
'
7ZLVWHGSDLUFDEOHV
'
9'&
66,
0
&
&
7ZLVWHGSDLUFDEOHV
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1SSI
4.3 Example: Starting 1SSI
Description
Block: FC101
Network 1: Presettings
L
DB1.DBD0
DB1.DBD4
DB1.DBD0
PAD 256
DB1.DBD4
PAD 260
PED 256
DB1.DBD8
PED 260
DB1.DBD12
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
235
1SSI
4.3 Example: Starting 1SSI
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.
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.
236
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1SSI
4.4 Terminal Assignment Diagram
4.4
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 contact (see the ET
200S Distributed I/O System (http://support.automation.siemens.com/WW/view/en/1144348)
operating instructions).
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
237
1SSI
4.4 Terminal Assignment Diagram
Terminal Assignment
You will find the terminal assignment for the 1SSI in the table below.
Table 4- 1
View
Terminal Assignment
Remarks
Terminals 1 to 8:
1/5: Data from the SSI encoder 1
83
'1
&03
70(6DQG(066,
3: Chassis ground
(6
'%$%
'
9'&
0
',
&
&
83
'1
&03
2QHSDLUWZLVWHG
SDLUFDEOHV
'
'
'
9'&
9'&
0
&
2QHSDLUWZLVWHG
SDLUFDEOHV
&
70(6$DQG(066,
'
9'&
',
$
$8;
&
$
$8;
$
$8;
$
$8;
&
66,
2QHSDLUWZLVWHG
SDLUFDEOHV
'
9'&
(6
'%$%
'
'
9'&
66,
&
&
2QHSDLUWZLVWHG
SDLUFDEOHV
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
2
238
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1SSI
4.5 Configuring standard mode and fast mode
4.5
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
Fast
Standard
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 .
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
239
1SSI
4.6 Functions of the 1SSI
4.6
4.6.1
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.
240
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1SSI
4.6 Functions of the 1SSI
4.6.2
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-isochronous 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
Mode
"Detection" Parameter
Non-isochronous mode
Free-wheeling
Synchronous
- (irrelevant)
Isochronous mode
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.
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.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
241
1SSI
4.6 Functions of the 1SSI
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.
4.6.4
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.
242
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1SSI
4.6 Functions of the 1SSI
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
%LWVWRLQGLFDWHGDERYHE\[DUHGLVFRXQWHG
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
243
1SSI
4.6 Functions of the 1SSI
4.6.5
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.
244
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1SSI
4.6 Functions of the 1SSI
4.6.6
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
Not active
In the up direction
In both directions
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
Operating Instructions, 06/2010, A5E00124867-07
245
1SSI
4.6 Functions of the 1SSI
)HHGEDFNELW
676B/2$'
66,9DOXHDFFHSWHGHQGRIWUDQVIHU
SRVVLEO\ZLWKDQHUURU
8VHU5HPRYHUHTXHVWDQGNHHSYDOXHDYDLODEOH
66,5HTXHVWXQGHUVWRRG
8VHU5HTXHVWYDOXHWUDQVIHUDQGPDNHYDOXHDYDLODEOH
Figure 4-2
Value Transfer
246
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1SSI
4.6 Functions of the 1SSI
4.6.7
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.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
247
1SSI
4.6 Functions of the 1SSI
66,/DWFKIXQFWLRQLVWHUPLQDWHG
HQFRGHUYDOXHLVFXUUHQW
8VHU/$7&+B$&.PXVWEHFOHDUHG
IUHH]LQJLVSRVVLEOHDJDLQDVVRRQDV
66,GHWHFWV/$7&+B$&.
%LWVHW
LQHQFRGHUYDOXH
/$7&+B$&.
',
Figure 4-3
248
Latch Function
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1SSI
4.6 Functions of the 1SSI
4.6.8
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. Channelspecific diagnostics are performed if you have enabled group diagnostics in your
configuration (see device manual of the interface module used).
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
4.6.9
Description
The absolute value encoder and sensor supply short circuit errors have been detected by the
1SSl and are indicated at the feedback interface. Channel-specific diagnostics are performed
if you have enabled group diagnostics in your configuration (see device manual of the
interface module used).
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
Operating Instructions, 06/2010, A5E00124867-07
249
1SSI
4.7 Behavior at CPU/master STOP
4.7
Description
The 1SSI detects the CPU/master STOP. The reaction to this is to stop the active operation.
250
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1SSI
4.8 Setting parameters for the 1SSI
4.8
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
Encoder type 1
Gray/binary converter
Gray/binary
Transmission rate 1 3
Monoflop time 1 2 3
16 s / 32 s / 48 s / 64 s
Parity
Normalization
Off/on
0 to 15
Direction reversal
Off/on
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
251
1SSI
4.8 Setting parameters for the 1SSI
Parameters
Value Range
Note
If you find "Total steps - highword" and "Total steps lowword" in your parameter assignment software
instead of "Total steps", the following definition applies:
Comparator 1
Sign of life
Off, On
252
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1SSI
4.8 Setting parameters for the 1SSI
Parameters
Value Range
Encoder sampling rate No limitation, 0.1 kHz to 6.3 kHz (in 0.1kHz steps)
Note
Any encoder sampling rate to be taken into account is
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.
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
Operating Instructions, 06/2010, A5E00124867-07
253
1SSI
4.9 Diagnostics
4.9
Diagnostics
4.9.1
6)
83
'1
&03
UP
DN
CMP
Cause
7
On
No parameter assignment.
There is a diagnostic
message.
On
254
Remedy
DI (latch) is activated.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1SSI
4.9 Diagnostics
4.9.2
Error types
For information on the structure of the channel-related diagnostics, refer to the manual on
the interface module used in your ET 200S station.
Meaning
Remedy
1D
9D
01001: Error
16D
26D
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
255
1SSI
4.10 Control and Feedback Interfaces in Standard Mode
4.10
Description
The two tables show the assignment of the control interface (outputs) and the feedback
interface (inputs):
Table 4- 3
Address
Assignment
Bytes 0 to 3
Byte 4
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
256
Reserved = 0
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1SSI
4.10 Control and Feedback Interfaces in Standard Mode
Table 4- 4
Address
Assignment
Bytes 0 to 3
Byte 4
Byte 5
Reserved = 0
Bytes 6 to 7
Reserved = 0
Notes
CMP
CMP2
CMP_VAL1
CMP_VAL2
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
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
LZ
STS_DI
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.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
257
1SSI
4.10 Control and Feedback Interfaces in Standard Mode
Bits
Notes
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.
Feedback interface
Control interface
Load 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).
258
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1SSI
4.11 Feedback Interface in Fast Mode
4.11
Description
Refer to the table below for the assignment of the feedback interface (inputs):
Table 4- 5
Address
Assignment
Bytes 0 to 3
Notes
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
LZ
STS_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
Operating Instructions, 06/2010, A5E00124867-07
259
1SSI
4.11 Feedback Interface in Fast Mode
Feedback interface
260
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1SSI
4.12 Technical Specifications
4.12
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
24 VDC
Yes
Yes
No
Encoder supply
Output voltage
Output current
L+ (-0.8 V)
Current consumption
From the backplane bus
From load voltage L+ (no load)
max. 10 mA
1.0 W
max. 40 mA
Absolute
According to RS422
Digital Input
Input voltage
Input current
Input delay
Possible
50 m
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
261
1SSI
4.12 Technical Specifications
General technical specifications
Interrupts
Status display for digital input DI
LED 7 (green)
UP LED (green)
DN LED (green)
Group error
SF LED (red)
Maximum age
Standard mode
Fast mode
Jitter
Standard mode
Fast mode
Age
Standard mode
Fast mode
Frame runtime + 1 ms
Frame transfer rate + 700 s
Age in standard mode and fast mode Encoder value at time Ti of the current bus cycle
Jitter
Standard mode
Fast mode
1 ms
700 s
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
262
16 s / 32 s / 48 s / 64 s
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
1SSI
4.12 Technical Specifications
General technical specifications
Response Times in Non-Isochronous Mode
Update rate of the 1SSI
In standard mode
In fast mode
1 ms
700 s
In standard mode
TCI
TCO
125 s
ToiMin
0 s
TDPMin
In fast mode
TCI
TCO
0 s
ToiMin
0 s
TDPMin
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
Operating Instructions, 06/2010, A5E00124867-07
263
1SSI
4.12 Technical Specifications
264
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.1
Product Overview
Order number
6ES7 138-4DD01-0AB0
Compatibility
The 2PULSE with the order number 6ES7 138-4DD01-0AB0 replaces the 2PULSE with the
order number 6ES7 138-4DD00-0AB0 compatibly. In STEP 7 as of Version V5.4 SP4 +
HSP 2072, you can use it in non-isochronous and isochronous modes.
Features
2-channel
The two channels of the 2PULSE can be used independently of one another; they permit
pulse output in 5 different modes.
Minimum pulse duration: 100 s,
Accuracy: (period duration x 100 ppm) 100 s
Digital output DO 0 for channel 0 and digital output DO 1 for channel 1 to output the
pulses.
Integrated freewheeling diodes in the digital outputs. No external freewheeling diode
required at inductive loads
Digital input DI 0 for Channel 0 and digital input DI 1 for Channel 1 for enabling (starting
of output).
Can be used with short and long control interface
Short control interface: 8 bytes compatible to predecessor module
Long control interface: 12 bytes improved controlling options
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
265
2PULSE
5.1 Product Overview
Operating Modes
"Pulse output" operating mode
A pulse with variable pulse duration is output at the digital output of the 2PULSE.
"Pulse width modulation" operating mode
A pulse sequence (square wave signal) with defined time period and variable
pulse/pause ratio is output at the digital output of the 2PULSE.
"Pulse train" operating mode
A variable number of pulses with defined time period and pulse duration is output at the
digital output of the 2PULSE.
"On/Off-delay" operating mode
The signal pending at the digital input DI is output with an on/off-delay at the digital output
DO by the 2PULSE.
"Frequency output" operating mode
A square wave signal with variable frequency is output at the digital output of the
2PULSE.
Functions
Measurement of current in the "Pulse width modulation" and "Pulse train" operating
modes
Direct control of the digital output by means of the control program
Error detection/diagnostics (short circuit of the digital output and encoder supply)
Parallel connection of both channels of the 2PULSE to achieve a higher output current
Programmable response to CPU/master STOP
Configuration
In order to configure the 2PULSE use one of the following options
STEP 7 as of Version V5.4 SP4 with the HSP 2072 (Hardware Support Package from the
Internet)
A GSD file (http://www.automation.siemens.com/csi/gsd)
Firmware update
In order to extend the functionality and eliminate errors, firmware updates can be
downloaded to the operating system memory of the 2PULSE by means of the STEP 7 HW
Config software.
Note
When you launch the firmware update, the old firmware is deleted. If the firmware update is
interrupted or canceled for any reason, the 2PULSE will no longer function correctly as a
result. Restart the firmware update and wait until it has completed successfully.
266
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.2 Isochronous mode
5.2
Isochronous mode
Note
For basic information on isochronous mode, refer to the Isochronous mode
(http://support.automation.siemens.com/WW/view/en/15218045) function manual.
Hardware requirements
You will require the following for the 2PULSE in isochronous mode:
A CPU that supports isochronous mode
PROFIBUS master or PROFINET controller that supports the constant bus cycle time
IM 151 that supports isochronous mode
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
267
2PULSE
5.3 Example: Starting 2PULSE
5.3
Task
These brief instructions guide you to a functioning application that will enable you to become
familiar and check the basic hardware and software functions of your 2PULSE. The "Pulse
output" mode is used as an example here. Channel 0 of the 2PULSE is used in the example.
Requirements
The following requirements must be satisfied:
You must have put an ET 200S station on an S7 station with a DP master into operation.
You must have the following:
An interface module IM151-1 (as of order number 6ES7 151-1AA04-0AB0) or
IM151-1 HIGH FEATURE (as of order number 6ES7 151-1BA02-0AB0) or
IM151-8 PN/DP CPU (as of order number 6ES7 151-8AB00-0AB0) or
IM151-7 CPU (as of order number 6ES7 151-7AA20-0AB0)
A terminal module TM-E15S24-01 or TM-E15x26-A1
(order number 6ES7 193-4CBx0-0AA0 or 6ES7 193-4CAx0-0AA0)
A "2 PULSE"
(order number 6ES7 138-4DD01-0AB0).
70(6DQG38/6(
&KDQQHO
&KDQQHO
(6
''$%
9'&
9'&
0
0
'2
'2
',
Figure 5-1
268
',
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.3 Example: Starting 2PULSE
Description
Block: FC101
L
PEB256
MB20
5000
PAW256
MB10
M30.0
M10.0
//Set SW_ENABLE = 1
MB10
PAB258
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
269
2PULSE
5.3 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
obtained:
STS_ENABLE = 1
STS_DO = 1
LED 4 for DO 0 lights up
STS_ENABLE = 0
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.
270
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
5.4
5.4.1
Overview
Principle
The 2PULSE has two channels. You can select a separate mode for each channel.
Configuration of the operating mode is carried out using HW Config. The mode that has
been assigned parameters can then no longer be changed with your control program.
You can select from 5 different modes for each channel:
Pulse output
Pulse-width modulation
Pulse train
On/Off-delay
Frequency output
In addition to the set mode, the 2PULSE also has the following functions:
Measurement of current in the "Pulse width modulation" and "Pulse train" operating
modes
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.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
271
2PULSE
5.4 Modes and Functions
Parallel connection of both channels to achieve a higher output current.
Response to CPU/master STOP; the 2PULSE recognizes the CPU/master STOP for both
channels and responds in accordance with your parameter assignment.
&KDQQHO
3DUDPHWHUV
'2
&RQWUROVLJQDOV
',
3URFHVV
&RQWURO3URJUDP
)HHGEDFNVLJQDOV
0RGHVDQG
IXQFWLRQV
&KDQQHO
3DUDPHWHUV
'2
&RQWUROVLJQDOV
)HHGEDFNVLJQDOV
Figure 5-2
0RGHVDQG
IXQFWLRQV
',
272
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
5.4.2
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
6RIWZDUHHQDEOH
6:B(1$%/(
6
676B(1$%/(
4
'2
5
2QGHOD\
Figure 5-3
5
3XOVH
GXUDWLRQ
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
273
2PULSE
5.4 Modes and Functions
Pulse Diagram
6RIWZDUHHQDEOH
6:B(1$%/(
$&.B6:B(1$%/(
+:HQDEOH
',GLJLWDOLQSXW
'2GLJLWDORXWSXW
676B(1$%/(
(55B38/6
2QGHOD\
6WDUWRIWKHRXWSXWVHTXHQFH
Figure 5-4
3XOVHGXUDWLRQ
(QGRIWKHRXWSXWVHTXHQFH
Truth Table
Software enable
SW_ENABLE
Hardware enable
(digital input DI)
DO Digital Output
STS_ENABLE
Output
Sequence
01
0, if on-delay > 0
1, if on-delay = 0
01
Start
01
Not used
0, if on-delay > 0
1, if on-delay = 0
01
Start
Any status
Terminate
Any status
01
274
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
You can set times from 0.2 ms to 6.5535 s with a resolution of 0.1 ms.
Set the on-delay and change when using the short control interface
Set the on-delay as a value between 0 and 65535 in the parameters.
Configured on-delay = Time base x specified 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 configured on-delay
If you change the on-delay factor during the output sequence, the new on-delay is activated
at the next output sequence.
Isochronous mode
Generally applicable information is available in the section "Isochronous mode (Page 267)".
In the "Pulse output" operating mode, isochronous mode does not have any influence on the
functionality.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
275
2PULSE
5.4 Modes and Functions
Meaning
Value Range
Mode
Time base
Default
Pulse output
Pulse-width modulation
Pulse train
On/Off-delay
Frequency output
Pulse width
modulation
0.1 ms
1 ms
0.1 ms
Function DI
Input
HW enable
Input
On-delay 1)
0 to 65535
1)
Meaning
Value range
Channel
0
Address
Channel
1
Address
0 = SW_ENABLE canceled
1 = SW_ENABLE set 01 = start of
output sequence; may be dependent
on the hardware enable
Byte 2:
Byte 6:
Bit 0
Bit 0
Pulse duration
Word 0
Word 4
Byte 3
Byte 7
On-delay factor
276
0 to 255
If the on-delay <0.2 ms or if factor =
0, the effective on-delay is = 0.
If there is an on-delay > 65.535 s, the
on-delay is limited to 65.535 s.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
Control and Feedback
Signals
Meaning
Value range
Channel
0
Address
Channel
1
Address
Control signals when the long control interface is used (12 bytes)
Software enable
SW_ENABLE
0 = SW_ENABLE canceled
1 = SW_ENABLE set 01 = start of
output sequence; may be dependent
on the hardware enable
Byte 4:
Byte 10:
Bit 0
Bit 0
Pulse duration
Word 0
Word 6
Word 2
Word 8
On-delay
0 to 65535
Byte 0:
Byte 4:
Bit 0
Bit 0
Byte 0:
Byte 4:
Bit 1
Bit 1
Byte 0:
Byte 4:
Bit 2
Bit 2
0 = SW_ENABLE cleared.
Byte 0:
Byte 4:
1 = SW_ENABLE set
Bit 3
Bit 3
Byte 0:
Byte 4:
Bit 4
Bit 4
Without HW enable: 0 1
Byte 1:
Byte 5:
With HW enable: 0 15
Bit 0 to 3
Bit 0 to 3
Word 2
Word 6
Feedback Signals
STS_ENABLE
STS_DO
STS_DI
ACK_SW_ENABLE
ERR_PULS
SEQ_CNT
Reserved
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
277
2PULSE
5.4 Modes and Functions
Meaning
Value range
Channel
0
Terminal
Channel 1
Terminal
0 = HW enable cleared
1 = HW enable issued
0 1 = Start of the output
sequence; dependent on the
software enable
(SW_ENABLE)
0 = no pulse
Input Signal
HW enable
Output Signal
Pulse at the DO digital output
278
1 = pulse
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
5.4.3
Definition
You specify an output value for 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
6:B(1$%/(
6
'2
3:0
5
2QGHOD\
Figure 5-5
5
2XWSXWYDOXH
676B(1$%/(
3:0LQ
RSHUDWLRQ
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
279
2PULSE
5.4 Modes and Functions
Pulse Diagram
6RIWZDUHHQDEOH
6:B(1$%/(
$&.B6:B(1$%/(
+:HQDEOH
'LJLWDOLQSXW',
7LPHSHULRG
7LPHSHULRG
3XOVH ,QWHU
GXUD
SXOVH
WLRQ
SHULRG
2XWSXWYDOXH
2XWSXWYDOXH
'LJLWDORXWSXW'2
2QGHOD\
676B(1$%/(
6WDUWRXWSXWVHTXHQFH
Figure 5-6
Truth table
Software enable
SW_ENABLE
Hardware enable
(digital input DI)
Digital output DO
STS_ENABLE
Output
sequence
01
0, if on-delay > 0
1, if on-delay = 0
01
Start
01
Not used
0, if on-delay > 0
1, if on-delay = 0
01
Start
Any status
Cancel
Any status
01
280
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
3HULRGGXUDWLRQ
3HULRGGXUDWLRQPLQLPXP
LQWHUSXOVHSHULRG
0LQLPXPSXOVHGXUDWLRQ
Figure 5-7
2XWSXWYDOXHLQ
You can set times from 0.2 ms to 6.5535 s with a resolution of 0.1 ms.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
281
2PULSE
5.4 Modes and Functions
Non-isochronous mode
282
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
Isochronous mode
Generally applicable information is available in the section "Isochronous mode (Page 267)".
The following particular aspects apply to isochronous mode in the "Pulse width modulation"
operating mode:
The output always begins without an on-delay, a configured on-delay is ignored.
The output always begins after the software enable has been issued, a configured
hardware enable is ignored.
A change of the time period during runtime is not possible. Corresponding specifications
via the control interface are ignored.
In isochronous mode, the output sequence is synchronized with the moment To. The time
period is coordinated to the DP cycle. It is possible that your defined time period cannot be
implemented exactly.
The configured value of the time period is adjusted by the 2PULSE to the DP cycle based on
a calculation algorithm. The calculation is performed to minimize the difference between the
specified and calculated time period. In the most unfavorable case, the deviation amounts to
half the DP cycle. The table below shows examples.
DP cycle time TDP1)
10 ms
5 ms
5 ms
10 ms
2 ms
2 ms
10 ms
6 ms
5 ms
10 ms
16 ms
20 ms
1)
The calculated time period and the DP cycle time always have an integer ratio.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
283
2PULSE
5.4 Modes and Functions
The correlation between the and the DP cycle is represented graphically below. The pulsepause ratio is shown in the examples with 50% each. For additional information, refer to the
Isochronous Mode (http://support.automation.siemens.com/WW/view/en/15218045) function
manual.
The time period is equal to the DP cycle
7LPHSHULRG
'LJLWDORXWSXW
'2
'3F\FOH
72
72
72
72
6WDUWRXWSXWVHTXHQFH
'LJLWDORXWSXW
'2
'3F\FOH
72
72
72
72
6WDUWRXWSXWVHTXHQFH
72
72
72
6WDUWRXWSXWVHTXHQFH
284
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
Note
If the time period changes in runtime, a brief minor increase in the time period can result
(approx. 10 s).
Note
A change in the time period using the control interface has no effect in isochronous mode.
Measurement of current
An important application for current measurement in the "Pulse width modulation" operating
mode is the current regulation of a proportional valve. This allows you to compensate for
thermal effects at the valve, for example.
For more information, refer to the section "Function: Measurement of current (Page 310)".
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
285
2PULSE
5.4 Modes and Functions
Meaning
Value range
Operating mode
Time base
Default
Pulse output
Pulse-width modulation
Pulse train
On/Off-delay
Frequency output
Pulse width
modulation
0.1 ms
1 ms
0.1 ms
Output format
Per mill
S7 analog output
Per mill
Function DI
Input
HW enable
Input
On-delay
0 to 65535
20000 2 s
Read the information provided above on "Setting the time period" and on "Isochronous mode".
286
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
Control and feedback signals of the "Pulse width modulation" operating mode
Control and feedback
signals
Meaning
Value range
Channel 0
address
Channel 1
address
0 = SW_ENABLE canceled
1 = SW_ENABLE set 01 = start
of output sequence; may be
dependent on the hardware
enable
Byte 2:
Byte 6:
Bit 0
Bit 0
Output value
Word 0
Word 4
Byte 3
Byte 7
Factor: 0 to 255
Period duration:
0 = SW_ENABLE canceled
1 = SW_ENABLE set 01 = start
of output sequence; may be
dependent on the hardware
enable
Byte 4:
Byte 10:
Bit 0
Bit 0
Output value
Word 0
Word 6
Word 2
Word 8
Byte 5
Byte 11
On-delay factor
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
0 to 255
If the on-delay <0.2 ms or if factor
= 0, the effective on-delay is = 0.
If there is an on-delay > 65.535 s,
the on-delay is limited to 65.535 s.
287
2PULSE
5.4 Modes and Functions
Control and feedback
signals
Meaning
Value range
Channel 0
address
Channel 1
address
Byte 0:
Byte 4:
Bit 0
Bit 0
Byte 0:
Byte 4:
Bit 1
Bit 1
Byte 0:
Byte 4:
Bit 2
Bit 2
0 = SW_ENABLE cleared.
Byte 0:
Byte 4:
1 = SW_ENABLE set
Bit 3
Bit 3
0 to 27648 (overrange up to
32767)
Feedback signals
STS_ENABLE
STS_DO
Byte 1:
Byte 5:
Bit 0 to 3
Bit 0 to 3
Word 2
Word 6
Input and output signals of the "Pulse width modulation" operating mode
Input and output signal
Meaning
Value range
Channel 0
terminal
Channel 1
terminal
0 = HW enable cleared
1 = HW enable issued
0 1 = Start of the output
sequence; dependent on the
software enable
0 = no pulse
Input signal
HW enable
Output signal
Pulse train on the digital
output DO
288
1 = pulse
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
5.4.4
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
6:B(1$%/(
6
5
2QGHOD\
Figure 5-8
5
1XPEHU
RISXOVHV
676B(1$%/(
'2
7KHSXOVH
WUDLQLVLQ
RSHUDWLRQ
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
289
2PULSE
5.4 Modes and Functions
Pulse diagram
6:HQDEOH
$&.B6:B(1$%/(
+:HQDEOH
',GLJLWDOLQSXW
'2GLJLWDORXWSXW
2QGHOD\
3XOVH ,QWHU
GXUD SXOVH
WLRQ
SHULRG
3HULRG
GXUDWLRQ
(QGRIWKH
RXWSXW
VHTXHQFH
6WDUWRIWKHRXWSXWVHTXHQFH
1XPEHURISXOVHV
676B(1$%/(
(55B38/6
Figure 5-9
Truth table
Software enable
SW_ENABLE
Hardware enable
(digital input DI)
Digital output DO
STS_ENABLE
Output
sequence
01
0, if on-delay > 0
1, if on-delay = 0
01
Start
01
Not used
0, if on-delay > 0
1, if on-delay = 0
01
Start
Any status
Cancel
Any status
01
290
You can set times from 0.2 ms to 6.5535 s with a resolution of 0.1 ms.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
Set the time period and change when using the short control interface
Set the period duration as a value between 2 and 65535 in the parameters:
Configured time period = Time base x specified 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:
Time period = Factor x 0.1 x configured time period
If you change the factor during the output sequence, the new period duration will take effect
at the start of the next output sequence.
Isochronous mode
Generally applicable information is available in the section "Isochronous mode (Page 267)".
In the "Pulse train" operating mode, isochronous mode does not have any influence on the
functionality.
Measurement of current
For more information, refer to the section "Function: Measurement of current (Page 310)".
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
291
2PULSE
5.4 Modes and Functions
Meaning
Value range
Operating mode
Pulse output
Pulse width modulation
Pulse train
On/Off-delay
Frequency output
Pulse width
modulation
Time base
0.1 ms
1 ms
0.1 ms
Function DI
Input
HW enable
Input
On-delay
0 to 65535
Pulse duration 1)
Pulse duration:
10000 1 s
Default
Time period 1)
20000 2 s
292
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
Meaning
Value range
Channel 0
address
Channel 1
address
0 = SW_ENABLE cleared.
Byte 2:
Byte 6:
1 = SW_ENABLE set
Bit 0
Bit 0
Word 0
Word 4
Byte 3
Byte 7
0 = SW_ENABLE cleared.
Byte 4:
Byte 10:
1 = SW_ENABLE set
Bit 0
Bit 0
Word 0
Word 6
Word 2
Word 8
Byte 5
Byte 11
0 to 65535
If the number of pulses is 0, the
2PULSE does not output any
pulses. The output sequence is
terminated with ERR_PULS = 1.
Control signals when the long control interface is used (12 bytes)
Software enable
SW_ENABLE
Period duration
0 to 65535
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
0 to 255
E.g the value of 128 corresponds
to a ratio of 50:50.
293
2PULSE
5.4 Modes and Functions
Control and feedback
signals
Feedback signals
Meaning
Value range
Channel 0
address
Channel 1
address
STS_ENABLE
Byte 0:
Byte 4:
Bit 0
Bit 0
Byte 0:
Byte 4:
Bit 1
Bit 1
Byte 0:
Byte 4:
Bit 2
Bit 2
ACK_SW_ENABLE
0 = SW_ENABLE cleared.
Byte 0:
Byte 4:
1 = SW_ENABLE set
Bit 3
Bit 3
ERR_PULS
Byte 0:
Byte 4:
Bit 4
Bit 4
SEQ_CNT
Without HW enable: 0 1
Byte 1:
Byte 5:
With HW enable: 0 15
Bit 0 to 3
Bit 0 to 3
0 to 27648 (overrange up to
32767)
Word 2
Word 6
STS_DO
Meaning
Value range
Channel 0
terminal
Channel 1
terminal
0 = HW enable cleared
0 = no pulse
Input signal
HW enable
1 = HW enable issued
0 1 = Start of the output
sequence; dependent on the
software enable
(SW_ENABLE)
Output Signal
Pulse train at the DO digital
output
294
1 = pulse
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
5.4.5
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$%/(
',
'2
5
2QGHOD\
5
2IIGHOD\
Figure 5-10
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
295
2PULSE
5.4 Modes and Functions
Pulse Diagram
SW_ENABLE is set, while DI = 0:
6RIWZDUHHQDEOH
6:B(1$%/(
$&.B6:B(1$%/(
+:HQDEOH
',GLJLWDOLQSXW
'2GLJLWDORXWSXW
676B(1$%/(
(55B38/6
2QGHOD\
Figure 5-11
2IIGHOD\
$&.B6:B(1$%/(
+:HQDEOH
',GLJLWDOLQSXW
'2GLJLWDORXWSXW
676B(1$%/(
(55B38/6
2QGHOD\
Figure 5-12
2IIGHOD\
296
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
Truth Table
Software enable
SW_ENABLE
Digital input DI
Digital output DO
STS_ENABLE
Output
sequence
01
0, if on-delay > 0
1, if on-delay = 0
Start
10
1, if off-delay > 0
0, if off-delay = 0
Start
Any status
Cancel
Any status
01
'2GLJLWDORXWSXW
Figure 5-13
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
297
2PULSE
5.4 Modes and Functions
,QWHUSXOVHSHULRG
2QGHOD\
2IIGHOD\
',GLJLWDOLQSXW
Figure 5-14
,QWHUSXOVH
SHULRG
',GLJLWDOLQSXW
2IIGHOD\
2QGHOD\
5HWULJJHU
'2GLJLWDORXWSXW
Figure 5-15
298
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
,QWHUSXOVH
SHULRG
',GLJLWDOLQSXW
2IIGHOD\
5HWULJJHU
2QGHOD\
2QGHOD\
'2GLJLWDORXWSXW
Figure 5-16
You can set times from 0.2 ms to 6.5535 s with a resolution of 0.1 ms.
Set the on-delay and change when using the short control interface
You specify the on-delay as a value between 0 and 65535 in the parameters.
Configured on-delay = Time base x specified 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 configured 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.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
299
2PULSE
5.4 Modes and Functions
Isochronous mode
Generally applicable information is available in the section "Isochronous mode (Page 267)".
In the "On/Off-delay" operating mode, isochronous mode does not have any influence on the
functionality.
Meaning
Mode
Pulse output
Pulse-width modulation
Pulse train
On/Off-delay
Frequency output
Pulse width
modulation
Time base
0.1 ms
1 ms
0.1 ms
On-delay 1)
0 to 65535
1)
Value Range
Default
300
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
Meaning
Value range
Channel 0
address
Channel 1
address
0 = SW_ENABLE cleared.
Byte 2:
Byte 6:
1 = SW_ENABLE set
Bit 0
Bit 0
Word 0
Word 4
Byte 3
Byte 7
0 = SW_ENABLE cleared.
Byte 4:
Byte 10:
1 = SW_ENABLE set
Bit 0
Bit 0
Word 0
Word 6
Word 2
Word 8
Off-delay
The time between a negative edge With time base 0.1 ms:
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
Factor: 0 to 255
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.
Control signals when the long control interface is used (12 bytes)
Software enable
SW_ENABLE
Off-delay
The time between a negative edge With time base 0.1 ms:
of the digital input DI and its output 2 to 65535
on the digital output DO.
With time base 1 ms: 1 to 65535
If you violate the low limit of the
range, the off-delay will not
function.
On-delay
The time between a positive edge With time base 0.1 ms:
of the digital input DI and its output 2 to 65535
on the digital output DO.
With time base 1 ms: 1 to 65535
If you violate the low limit of the
range, the on-delay will not
function.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
301
2PULSE
5.4 Modes and Functions
Control and Feedback
Signals
Feedback signals
Meaning
Value range
Channel 0
address
Channel 1
address
STS_ENABLE
Byte 0:
Byte 4:
Bit 0
Bit 0
Byte 0:
Byte 4:
Bit 1
Bit 1
Byte 0:
Byte 4:
Bit 2
Bit 2
ACK_SW_ENABLE
0 = SW_ENABLE cleared.
Byte 0:
Byte 4:
Bit 3
Bit 3
ERR_PULS
Byte 0:
Byte 4:
Bit 4
Bit 4
SEQ_CNT
0 15
Byte 1:
Byte 5:
STS_DO
1 = SW_ENABLE set
Bit 0 to 3
Bit 0 to 3
Word 2
Word 6
Meaning
Value Range
Channel 0
terminal
Channel 1
terminal
0 = no pulse
0 = no signal
Input signal
Digital input DI
1 = pulse
Output signal
Pulse on the digital output DO
302
1 = signal
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
5.4.6
Definition
A square wave signal with a specified frequency is output at the digital output of the
2PULSE.
The output sequence is started on expiration of the configured on-delay on the DO digital
output of the 2PULSE.
+:HQDEOH
RSWLRQDO
6RIWZDUHHQDEOH
6:B(1$%/(
6
4
6
4
'2
Frequency
5
2QGHOD\
Figure 5-17
5
676B(1$%/(
)UHTXHQF\RXWSXWUXQQLQJ
2XWSXWYDOXH
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
303
2PULSE
5.4 Modes and Functions
Pulse diagram
6RIWZDUHHQDEOH
6:B(1$%/(
$&.B6:B(1$%/(
+:HQDEOH
'LJLWDOLQSXW',
7LPHSHULRG
7LPHSHULRG
'LJLWDORXWSXW'2
2QGHOD\
3XOVH ,QWHU
GXUD
SXOVH
WLRQ
SHULRG
2XWSXWYDOXHN+]
2XWSXWYDOXH+]
676B(1$%/(
6WDUWRXWSXWVHTXHQFH
Figure 5-18
Truth Table
Software enable
SW_ENABLE
Hardware enable
(digital input DI)
Digital output DO
STS_ENABLE
Output
sequence
01
0, if on-delay > 0
1, if on-delay = 0
01
Start
01
Not used
0, if on-delay > 0
1, if on-delay = 0
01
Start
Any status
Cancel
Any status
01
304
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
You can set times from 0.2 ms to 6.5535 s with a resolution of 0.1 ms.
Isochronous mode
Generally applicable information is available in the section "Isochronous mode (Page 267)".
In the "Frequency output" operating mode, isochronous mode does not have any influence
on the functionality.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
305
2PULSE
5.4 Modes and Functions
Meaning
Value range
Operating mode
Pulse output
Pulse-width modulation
Pulse train
On/Off-delay
Frequency output
Pulse width
modulation
Time base
0.1 ms
1 ms
0.1 ms
Output format
1 Hz
S7 analog output
1 Hz
Function DI
Input
HW enable
Input
On-delay 1)
0 to 65535
1)
Default
306
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
Meaning
Value range
Channel 0
address
Channel 1
address
0 = SW_ENABLE canceled
1 = SW_ENABLE set 01 = start
of output sequence; may be
dependent on the hardware
enable
Byte 2:
Byte 6:
Bit 0
Bit 0
Output value
Word 0
Word 4
Byte 3
Byte 7
0 to 255
If the on-delay <0.2 ms or if factor
= 0, the effective on-delay is = 0.
If there is an on-delay > 65.535 s,
the on-delay is limited to 65.535 s.
Control signals when the long control interface is used (12 bytes)
Software enable
(SW_ENABLE)
0 = SW_ENABLE canceled
1 = SW_ENABLE set 01 = start
of output sequence; may be
dependent on the hardware
enable
Byte 4:
Byte 10:
Bit 0
Bit 0
Output value
Word 0
Word 6
Word 2
Word 8
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
0 to 65535
On-delay = Time basis x Specified
numerical value
307
2PULSE
5.4 Modes and Functions
Control and feedback
signals
Feedback signals
Meaning
Value range
Channel 0
address
Channel 1
address
STS_ENABLE
Byte 0:
Byte 4:
Bit 0
Bit 0
Byte 0:
Byte 4:
Bit 1
Bit 1
Byte 0:
Byte 4:
Bit 2
Bit 2
ACK_SW_ENABLE
0 = SW_ENABLE cleared.
Byte 0:
Byte 4:
1 = SW_ENABLE set
Bit 3
Bit 3
SEQ_CNT
Byte 1:
Byte 5:
STS_DO
Bit 0 to 3
Bit 0 to 3
Word 2
Word 6
Meaning
Value Range
Channel 0
terminal
Channel 1
terminal
0 = HW enable cleared
1 = HW enable issued
0 1 = Start of the output
sequence; dependent on the
software enable
Input signal
HW enable
Output signal
Frequency on the digital
output DO
308
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
5.4.7
Sequence counter
The 2PULSE has a sequence counter for each channel with which the completed output
sequences are counted.
You can monitor the completion of an output sequence with the sequence counter SEC_CNT
in the feedback interface.
The counter has a width of 4 bits. After an overflow it jumps back to 0.
Application options
The sequence counter can be used in particular for:
Detecting (counting) very short pulses
Counting output sequences in connection with the hardware enable
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
309
2PULSE
5.4 Modes and Functions
5.4.8
Principle of operation
A measurement of current only takes place during the pulse output in the "Pulse width
modulation" and "Pulse train" operating modes. Without a pulse output (at
STS_ENABLE = 0), 0 is supplied as the measured value. The measured value is valid at
STS_ENABLE = 1.
In the "Pulse output", On/Off-delay" and "Frequency output" operating modes, 0 is always
measured as the measured value of the current.
The returned measured value of the current is a mean value of measured values that is
recorded during the duration of a period. At period durations < 5 ms, the interval between
two individual measuring points amounts to a maximum of 40 s. When longer periods are
involved, 128 measuring points per period are always recorded. This results in
correspondingly longer intervals between the measuring points.
In isochronous mode, a new measured value of the current is always made available in the
feedback interface at the moment Ti. In non-isochronous mode, a new measured value of
the current is made available about every 500 s.
Note
In order for the current measurement to work correctly, no freewheeling diode may be
applied to the load.
Accuracy
The accuracy of the measurement of current amounts to 3% of the measuring range.
Note
This accuracy during current measurement can only be achieved if the time period is not
changed during the measurement.
310
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
5.4.9
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 SW_ENABLE control bit cleared. The function
Supports you in commissioning a plant
Allows you to utilize an unused channel of the 2PULSE as DO
After you have selected the function, the feedback bits STS_ENABLE and ERR_PULS are
cleared by the 2PULSE, and an active output sequence is aborted. The function takes
precedence over the currently selected operating mode.
You specify the status of the digital output DO with the SET_DO control bit.
When you clear the MANUAL_DO control bit, you deselect the "Direct control of the digital
output DO" function. This deletes the digital output DO. You can then restart an output
sequence with the rising edge of SW_ENABLE.
Meaning
Value range
MANUAL_DO
SET_DO
0 = SW_ENABLE cleared.
Byte 2:
Byte 6:
Byte 4:
Byte 10:
1 = SW_ENABLE set
Bit 0
Bit 0
Bit 0
Bit 0
Byte 2:
Byte 6:
Byte 4:
Byte 10:
Bit 1
Bit 1
Bit 1
Bit 1
Byte 2:
Byte 6:
Byte 4:
Byte 10:
Bit 2
Bit 2
Bit 2
Bit 2
Feedback signals
STS_ENABLE
Byte 0:
Byte 4:
Byte 0:
Byte 4:
Bit 0
Bit 0
Bit 0
Bit 0
STS_DO
Byte 0:
Byte 4:
Byte 0:
Byte 4:
Bit 1
Bit 1
Bit 1
Bit 1
Byte 0:
Byte 4:
Byte 0:
Byte 4:
Bit 2
Bit 2
Bit 2
Bit 2
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
311
2PULSE
5.4 Modes and Functions
Signals
Meaning
Value range
312
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
5.4.10
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
313
2PULSE
5.4 Modes and Functions
Diagnostic Message
If a short circuit occurs in the encoder supply or in the digital output, the 2PULSE generates
a diagnostic message for the connected CPU/master. You must enable the "Group
diagnostics" parameter in this case.
Note
Diagnostic messages provide you the information that an error has occurred in one or both
channels of the 2PULSE. You can evaluate the diagnostics with STEP 7.
The diagnostic record DS1 only contains the information for Channel 0. However, a
diagnostic interrupt is also triggered at errors in Channel 1. The feedback signals provide
detailed information about the occurring errors from both channels. Evaluate the feedback
interface in new user programs (see below).
Parameters
Parameter
Meaning
Value Range
Default
Group diagnostics
Disable/enable
Disable
Diagnostics DO
Off/on
On
Feedback Signals
Feedback Signals
Meaning
Value Range
Channel 0
address
Channel 1
address
ERR_PARA
Indicates a parameter
assignment error.
0 = no parameter assignment
error
Byte 0:
Byte 4:
Bit 5
Bit 5
Byte 0:
Byte 4:
Bit 4
Bit 4
Byte 0:
Byte 4:
Bit 7
Bit 7
Byte 0:
Byte 4:
Bit 6
Bit 6
314
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
5.4.11
Definition
In order to achieve higher output current, you can connect both channels of the 2PULSE in
parallel. You then obtain a rated current of 4 A. This allows you to also operate final
controlling elements with a higher power requirement directly at the 2PULSE.
Measurement of current
During the measurement of current, the measured values from both channels are averaged
once more. This results in a measuring range up to 4 A.
The measured value of the current is supplied as a SIMATIC S7 analog value in the
feedback interface. A current of 4 A corresponds here to the SIMATIC S7 analog value of
27648.
The accuracy of the current measurement also amounts to 3% of the measuring range in
case of parallel connection.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
315
2PULSE
5.4 Modes and Functions
6)
70(6DQG
38/6(
(6
''$%
',
9'&
9'&
0
'2
',
'2
&RQQHFWLRQEHWZHHQWKHWHUPLQDOV
Figure 5-19
316
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.4 Modes and Functions
5.4.12
Behavior at CPU-Master-STOP
Definition
You can configure the reaction of the 2PULSE to failure of the higher-level controller for the
two channels together.
Response to CPU/master STOP
Turn off DO
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
Startup
To start a new output sequence after CPU/master STOP and a set ACK_SW_ENABLE, first
delete SW_ENABLE. Keep deleting until ACK_SW_ENABLE is also 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 executed during startup, set the "Software enable" (SW_ENABLE = 1) control bit.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
317
2PULSE
5.5 Parameter assignment and compatibility
5.5
5.5.1
318
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.5 Parameter assignment and compatibility
The "DO substitute value" parameter may only have a value not equal to 0 if the
"Response to CPU/Master stop" parameter is set to "DO switch substitute value".
Different channel-specific parameters are activated depending on the selected operating
mode. The following table lists the active parameters for the individual operating modes.
Parameters that are not listed must be set to 0.
Operating mode
Pulse output
Time base
On-delay
Function DI
Diagnostics DO
Time base
Function DI
Diagnostics DO
Time base
On-delay
Minimum / Pulse duration
Time period
Output format
Function DI
Diagnostics DO
Time base
On-delay
Minimum / Pulse duration
Output format
Function DI
Diagnostics DO
Pulse train
Time base
On-delay
Minimum / Pulse duration
Time period
Function DI
Diagnostics DO
Time base
Function DI
Diagnostics DO
On/Off-delay
Time base
On-delay
Diagnostics DO
Time base
Diagnostics DO
Frequency output
Time base
On-delay
Output format
Function DI
Diagnostics DO
Time base
Output format
Function DI
Diagnostics DO
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
319
2PULSE
5.5 Parameter assignment and compatibility
5.5.2
Compatibility mode
If you
Have selected the entry 2PULSE (6ES7 138-4DD00-0AB0) when configuring in HW
Config
Have plugged the 2PULSE (6ES7 138-4DD01-0AB0) into a slot that is configured for the
2PULSE (6ES7 138-4DD00-0AB0)
The 2PULSE (6ES7 138-4DD01-0AB0) then operates in compatibility mode.
In compatibility mode, the 2PULSE has the functional differences listed in the table.
2PULSE
320
Not in compatibility
mode
In compatibility mode
Yes
No
100 s
200 s
Yes
No
Yes
No
Yes
No
Isochronous mode
Yes
No
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.6 Diagnostics
5.6
Diagnostics
5.6.1
6)
Cause
Remedy
On
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
321
2PULSE
5.6 Diagnostics
5.6.2
Error types
For information on the structure of the channel-related diagnostics, refer to the manual on
the interface module used in your ET 200S station.
Meaning
Remedy
01001: Error
16D
A simple error evaluation is also possible through the corresponding bits in the feedback
interface (Page 353).
322
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.7 Application Examples
5.7
Application Examples
5.7.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
Pulse train
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, 06/2010, A5E00124867-07
323
2PULSE
5.7 Application Examples
5.7.2
Description
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
9DOYH
,QLWLDWRU
Figure 5-20
9FRQWUROVLJQDO
IURP38/6(
9HQDEOHVLJQDO
WR38/6(
Filling of liquids
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.
324
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.7 Application Examples
Procedure
1. Start of the 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 01) and start the filling process.
2. Monitoring the filling process: The error detection/diagnostic function allows you to check
in the program that the process is running correctly.
3. End of the 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
SRVLWLRQHG
Figure 5-21
)LOOLQJVWDUWV
)LOOLQJHQGV
&RQWDLQHULV
PRYHGDZD\
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
325
2PULSE
5.7 Application Examples
Parameters
The following parameters are required for channel 0 of the 2PULSE to fill liquids in pulse
output mode.
Table 5- 1
Parameters
Set Value
Meaning
Group diagnosis
Enable
Diagnostics DO 0
On
Turn off DO 0
Mode
Pulse output
Time base
1 ms
DI function 0
Input
On-delay
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.
326
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.7 Application Examples
Programming/flow diagrams
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. Configured
with a short control interface.
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
MB20
5000
PAW256
MB10
M20.2
Container is positioned
M30.0
M10.0
Set SW_ENABLE=1
MB10
PAB258
Generate SW_ENABLE
6)
70(6DQG
38/6(
&KDQQHO
&KDQQHO
(6
''$%
9HQDEOHVLJQDO
,QLWLDWRU
',
',
9'&
9'&
9FRQWUROVLJQDO
0
9DOYH
'2
Figure 5-22
0
'2
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
327
2PULSE
5.7 Application Examples
5.7.3
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.
(OHFWULFDOKHDWLQJ
HOHPHQW
Figure 5-23
9FRQWUROVLJQDO
IURPWKH38/6(
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.
Sequence
1. Starting heating process: To start the heating process, use the software enable
(SW_ENABLE) in your control program.
328
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.7 Application Examples
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-24
Parameters
The following parameters are required for channel 0 of the 2PULSE to heat a liquid in pulsewidth modulation mode.
Table 5- 2
Parameter
Set Value
Meaning
Group diagnostics
Enable
Diagnostics DO 0
On
Turn off DO 0
Mode
Pulse-width modulation
Output format
Per mill
Time base
1 ms
Function DI 0
Input
On-delay
500
Period
30000
The parameters for channel 1 are not relevant in this application example.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
329
2PULSE
5.7 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. Configured
with a short control interface.
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
MB20
MW32
PAW256
10
PAB259
MB10
M30.0
M10.0
Set SW_ENABLE=1
MB10
PAB258
6)
70(6DQG
38/6(
&KDQQHO
&KDQQHO
(6
''$%
',
',
9'&
9'&
9FRQWUROVLJQDO
&RQWDFWRU
0
'2
Figure 5-25
330
'2
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.7 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-26
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
331
2PULSE
5.7 Application Examples
5.7.4
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(
3XVKHU
&RPSDUWPHQWDOL]HG
FRQYH\RU
)ROGLQJ
ER[
&RQYH\RU
Figure 5-27
)ROGLQJ
ER[
)ROGLQJ
ER[
,QLWLDWRU
9HQDEOHVLJQDO
WRWKH38/6(
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.
332
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.7 Application Examples
Sequence
1. Starting the packing process: To enable the start, use the software enable (SW_ENABLE
01) 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
WKHSXVKHU
VWDUWV
Figure 5-28
3UHVHWQXPEHURI
JRRGVSDFNHG
)ROGLQJER[LV
PRYHGDZD\
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
333
2PULSE
5.7 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
Set Value
Meaning
Group diagnostics
Enable
Diagnostics DO 0
On
Turn off DO 0
Operating mode
Pulse train
Time base
1 ms
Function DI 0
HW enable
On-delay
500
Period
1000
The parameters for Channel 1 are not relevant in this application example.
334
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.7 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. Configured
with a short control interface.
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
MB20
PAW256
10
PAB259
MB10
M30.0
M10.0
Set SW_ENABLE=1
MB10
PAB258
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
335
2PULSE
5.7 Application Examples
6)
70(6DQG
38/6(
&KDQQHO
&KDQQHO
(6
''$%
9HQDEOHVLJQDO
,QLWLDWRU
',
',
9'&
9'&
9FRQWUROVLJQDO
3XVKHU
0
'2
Figure 5-29
336
0
'2
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.7 Application Examples
5.7.5
Description
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
Figure 5-30
9HQDEOHVLJQDOWR
WKH38/6(
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.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
337
2PULSE
5.7 Application Examples
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.
Sequence
1. Starting the procedure: 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 offdelay has expired.
2. Monitoring the procedure: The error detection/diagnostic function allows you to check by
means of a program that the valve is being controlled correctly.
3. End of the procedure: 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
DWWKHLQLWLDWRU
Figure 5-31
338
9DOYHRSHQ
0HWDOREMHFW
SDVWWKHLQLWLDWRU
&ORVHYDOYH
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.7 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
Parameters
Set Value
Meaning
Group diagnosis
Enable
Diagnostics DO 0
On
Turn off DO
Operating mode
On/Off-delay
Time base
1 ms
On-delay
500
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
Operating Instructions, 06/2010, A5E00124867-07
339
2PULSE
5.7 Application Examples
Programming/Flow Diagram
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. Configured
with a short control interface.
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
MB20
MW32
PAW256
10
PAB259
MB10
M30.0
M10.0
Set SW_ENABLE=1
MB10
PAB258
6)
70(6DQG
38/6(
&KDQQHO
&KDQQHO
(6
''$%
9HQDEOHVLJQDO
,QLWLDWRU
',
',
9'&
9'&
9FRQWUROVLJQDO
9DOYH
0
'2
Figure 5-32
340
0
'2
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.7 Application Examples
5.7.6
Preliminary remark
In order to successfully design a control loop for current regulation of a valve, corresponding
knowledge of control technology and the concrete control task is required.
Description
A proportional valve is used to control the pressure in a vessel. In order to compensate for
thermal effects in the valve, it is addressed with a controlled current. Together with the
higher-level control loop (pressure control), a cascade control system results in which the
current regulation of the valve forms the inner component. The structure of the higher-level
pressure control is not addressed in this example.
The valve is controlled directly through the 24 V control signal of the 2PULSE. Pulse width
modulation is selected as the operating mode. The execution of the current measurement
required for the control is integrated in the 2PULSE.
For the higher-level pressure control, an analog input module detects the data from a
pressure sensor mounted correspondingly. The pressure measured values determined are
input to the pressure regulator that runs on the CPU.
In order to achieve particularly high-performance control, 2PULSE can also be operated in
isochronous mode (see section "Isochronous mode (Page 267)").
3UHVVX
UH
VHQVRU
3XPS
7RWKH
SURFHVV
9FRQWUROVLJQDO
IURP38/6(
3URSRUWLRQDOYDOYH
3XOVHSDXVHUDWLR
&XUUHQW
FRQWUROOHU
0HDVXUHGYDOXHRIWKHFXUUHQW 38/6(
&38
3UHVVXUH
FRQWUROOHU
Figure 5-33
3UHVVXUHPHDVXUHGYDOXH
$QDORJ
LQSXW
PRGXOH
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
341
2PULSE
5.7 Application Examples
Requirements
A valve suitable for controlling (proportional valve)
Suitable electric data of the valve (24 V, max. 2 A or 4 A with parallel connection of both
channels of the 2PULSE)
When designing the control loop, take the additional data of the valve into consideration,
in particular the time constant of the contained inductance and the manufacturer's
recommendation regarding the time period of the PWM signal.
Parameters
The following parameters are required for Channel 0 of the 2PULSE for the current
regulation of a valve with the "Pulse width modulation" operating mode.
Table 5- 5
Parameter
Set value
Meaning
Group diagnostics
Enable
Diagnostics DO 0
On
Turn off DO 0
Operating mode
Output format
S7 analog output
Time base
0.1 ms
Function DI 0
Input
On-delay
Time period
50
1)
When setting this parameter, take the recommendations of the valve manufacturer into consideration.
The parameters for Channel 1 are not relevant in this application example.
342
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.7 Application Examples
Programming/flow diagrams
Below you will find a section from a STEP 7 STL program.
Take the following points into consideration:
The configured start address of the inputs and outputs of the 2PULSE is 256. Configured
with a short control interface.
The standard block FB 41 with DB 1 as the instance data block is used as the controller.
The differential component of the controller is deactivated. The block is therefore only
used as a PI controller. The FB 41 "CONT_C" is contained in the "Standard Library"
supplied with STEP 7 in the "PID Control Blocks" directory. Detailed information about
FB 41 is available in the System and Standard Functions
(http://support.automation.siemens.com/WW/view/en/1214574) reference manual.
The following example program does not provide for an explicit enable. The controller
starts operating immediately after the CPU start.
NOTICE
Therefore, take the required safety precautionary measures for your real system.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
343
2PULSE
5.7 Application Examples
First, you have to initialize the controller at a restart with the following STL program in
OB 100. Adapt the parameters of the FB 41 as required. The program furthermore sets the
factor for the time period to "10" (meaning that the active factor is 1.0) and sets the
SW_ENABLE bit to "1". This is used by the 2PULSE to start operation.
STL
Description
CALL FB41,DB1
COM_RST
:=TRUE
MAN_ON
:=FALSE
PVPER_ON
:=TRUE
P_SEL
:=TRUE
I_SEL
:=TRUE
INT_HOLD
:=FALSE
I_ITL_ON
:=FALSE
D_SEL
:=FALSE
CYCLE
:=T#5MS
SP_INT
:=0.000000e+000
PV_IN
:=
PV_PER
:=
MAN
:=
GAIN
:=2.000000e+000
TI
:=T#10MS
TD
:=
TM_LAG
:=
DEADB_W
:=
LMN_HLM
:=1.000000e+002
LMN_LLM
:=0.000000e+000
PV_FAC
:=1.000000e+000
PV_OFF
:=0.000000e+000
LMN_FAC
:=1.000000e+000
LMN_OFF
:=0.000000e+000
I_ITLVAL
:=0.000000e+000
DISV
:=
LMN
:=
LMN_PER
:=
QLMN_HLM
:=
QLMN_LLM
:=
LMN_P
:=
LMN_I
:=
LMN_D
:=
PV
:=
ER
:=
10
PAB 259
PAB 258
344
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.7 Application Examples
Afterwards, you have to call the control block cyclically in a cyclic interrupt OB (OB 30 to
OB 38). The cycle time of the cyclic interrupt OB has to be made known to the FB 41 using
the parameter CYCLE, in the above example 5 ms. When the controller is called, the
measured value of the current and the PWM setpoint of the 2PULSE are interconnected
directly with the controller. Other cyclic calls are not necessary.
STL
Description
CALL FB41,DB1
COM_RST
:=FALSE
MAN_ON
:=
PVPER_ON
:=
P_SEL
:=
I_SEL
:=
INT_HOLD
:=
I_ITL_ON
:=
D_SEL
:=
CYCLE
:=
SP_INT
:=
PV_IN
:=
PV_PER
:=PEW258
MAN
:=
GAIN
:=
TI
:=
TD
:=
TM_LAG
:=
DEADB_W
:=
LMN_HLM
:=
LMN_LLM
:=
PV_FAC
:=
PV_OFF
:=
LMN_FAC
:=
LMN_OFF
:=
I_ITLVAL
:=
DISV
:=
LMN
:=
LMN_PER
:=PAW256
QLMN_HLM
:=
QLMN_LLM
:=
LMN_P
:=
LMN_I
:=
LMN_D
:=
PV
:=
ER
:=
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
345
2PULSE
5.7 Application Examples
Display format
Description
DB1.SP_INT
FLOATING POINT
DB1.PV
FLOATING POINT
DB1.GAIN
FLOATING POINT
DB1.TI
FLOATING POINT
6)
70(6DQG
38/6(
&KDQQHO
&KDQQHO
(6
''$%
',
24 VDC
',
24 VDC
9FRQWUROVLJQDO
9DOYH
0
'2
Figure 5-34
346
0
'2
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.8 Technical Specifications of the 2PULSE, Terminal Assignment
5.8
Overview
General technical specifications
Dimensions and Weight
Dimensions W x H x D (mm)
15 81 52
Weight
Approx. 40 g
24 VDC
Yes 1)
Galvanic isolation
Between the channels
Between the channels and backplane bus
No
Yes
75 VDC, 60 VAC
500 VDC
Encoder supply
Output voltage
Output current
L+ -0.8 V
Current consumption
From the backplane bus
From load voltage L+ (no load)
max. 10 mA
Typ. 1.8 W
Approx. 30 mA
24 VDC
11 V to 30 V
-30 V to 5 V
Input current
with "1" signal
10 mA (typically)
25 s
100 s
Input characteristic
Possible
Max. 100 m
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2 mA
347
2PULSE
5.8 Technical Specifications of the 2PULSE, Terminal Assignment
General technical specifications
Data for the Digital Outputs
Output voltage
with "1" signal
Minimum L+ - 1 V
Output current
with "1" signal
Rated value
Permitted Range
With "0" signal (residual current)
Measurement of current
Accuracy
2 A 2) (4 A at parallel connection)
7 mA...2 A
max. 0.1 mA
Yes, in the "Pulse width modulation" and "Pulse
train" operating modes
3%
100 s
Accuracy
max. 100 s
Lamp load
Maximum 10 W
200 s
max. 200 s
Yes
Switching frequency
Up to 5 kHz
4)
L+ -(50 V ... 65 V)
Yes
Cable lengths
Unshielded
Shielded
Typ. 10 A to 16 A
600 m
1000 m
348
Status indicators
Diagnostic functions
Group error
Diagnostic information readable
1)
Polarity reversal can lead to the digital outputs being switched through.
2)
3)
With a load of 50
4)
Asymetrical edge slopes appear to be a higher percentage when switching the outputs on and
off at higher frequencies
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.8 Technical Specifications of the 2PULSE, Terminal Assignment
The figures below show you the maximum permissible output current in relation to the
ambient temperature and the frequency.
$
$
$
$
$
$
$
$
N+]PV
FRQWLQXRXVO\RQ
$
N+]V
$
$
&XUUHQW$
$
$ N+]V
$
N+]V
$PELHQWWHPSHUDWXUHr&
Figure 5-35
$
$
$
$
$
$
$
$ FRQWLQXRXVO\RQ
$ N+]PV
$
N+]V
&XUUHQW$
$
$
$
$
N+]V
N+]V
$PELHQWWHPSHUDWXUHr&
Figure 5-36
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
349
2PULSE
5.8 Technical Specifications of the 2PULSE, Terminal Assignment
N+]PV
$
$ RU
$
FRQWLQXRXVO\RQ
$ N+]V
$ N+]V
$
$
$
&XUUHQW$
$
N+]V
$PELHQWWHPSDUDWXUHr&
Figure 5-37
$
$
N+]PV
$
$
$ RU
FRQWLQXRXVO\RQ
$
$
$
$
$
$
&XUUHQW$
N+]V
N+]V
N+]V
$PELHQWWHPSHUDWXUHr&
Figure 5-38
350
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.8 Technical Specifications of the 2PULSE, Terminal Assignment
$
$
$
$
$
&XUUHQW$
$
$
$
$
$
$
N+]PV
FRQWLQXRXVO\RQ
N+]V
$
N+]V
$
$
N+]V
$PELHQWWHPSHUDWXUHr&
Figure 5-39
$
$
$
$
$ FRQWLQXRXVO\RQ
$
$
$ N+]PV
$
&XUUHQW$
$
N+]V
$
$
N+]V
$ N+]V
$PELHQWWHPSHUDWXUHr&
Figure 5-40
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
351
2PULSE
5.8 Technical Specifications of the 2PULSE, Terminal Assignment
Terminal Assignment
The following figure 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)
&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 appendix of the ET 200S
Distributed I/O System (http://support.automation.siemens.com/WW/view/en/1144348)
operating instructions).
352
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.9 Technical Specifications for Programming, Reference Lists
5.9
Assignment
Channel 0
Channel 1
Word 0
Word 4
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
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
353
2PULSE
5.9 Technical Specifications for Programming, Reference Lists
Assignment
Channel 0
Channel 1
Word 0
Word 6
Word 2
Word 8
Byte 4
Byte 10
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 5
354
Byte 11
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.9 Technical Specifications for Programming, Reference Lists
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
Byte 1
Byte 5
Word 2
Word 6
Note
Depending on the interface module IM 151 and the configuration, the feedback value
(substitute value) supplied is 16#7FFF7FFF or 16#00000000.
Notes
Pulse duration 1) 2)
The time that is set for the DO digital output on expiration of the ondelay.
On-delay factor 1)
You can change the configured on-delay before the start of the output
sequence:
On-delay = Factor 0.1 configured on-delay
On-delay 2)
The time from the start of the output sequence to the output of the pulse
train.
Output value 1)
Time period 2)
When specifying the time period take into account the set minimum
pulse duration and the response time of your final controlling element
that is connected to the digital output DO.
On-delay factor 2)
You can change the configured on-delay before the start of the output
sequence:
On-delay = Factor 0.1 configured on-delay
2)
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
355
2PULSE
5.9 Technical Specifications for Programming, Reference Lists
Control Signal
"Pulse train" operating mode:
Notes
Number of pulses 1)
You can change the configured time period before the start of the output
sequence:
Time period = Factor x 0.1 x configured time period
Time period 2)
When specifying the time period take into account the set minimum
pulse duration and the response time of your final controlling element
that is connected to the digital output DO.
Pulse-pause ratio
2)
2)
You can set the ratio of the pulse duration to the interpulse period:
Pulse-pause ratio = (Setpoint / 255) time period
Off-delay 1)
On-delay factor 1)
You can change the configured on-delay before the start of the output
sequence:
On-delay = Factor 0.1 configured on-delay
On-delay 2)
The time between a positive edge of the digital input DI and its output on
the digital output DO.
The time between a negative edge of the digital input DI and its output
on the digital output DO.
2)
Output frequency 1)
On-delay factor 1)
You can change the configured on-delay before the start of the output
sequence:
On-delay = Factor 0.1 configured on-delay
On-delay 2)
The time from the start of the output sequence to the output of the
frequency.
2)
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 digital output DO.
1)
2)
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.
356
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
2PULSE
5.9 Technical Specifications for Programming, Reference Lists
Notes
ACK_SW_ENABLE
ERR_24V
ERR_DO
ERR_PARA
ERR_PULS
STS_ DI
STS_DO
STS_ENABLE
SEQ_CNT
Counts the completed output sequences in the "Pulse output", "Pulse train" and "On/Offdelay" operating modes.
No function in the "Pulse width modulation" and "Frequency output" operating modes.
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
357
2PULSE
5.9 Technical Specifications for Programming, Reference Lists
Parameter List
Parameters
Value Range
Default
Group diagnostics
Disable/enable
Disable
Turn off DO
Off/on
Off
Diagnostics DO
Off/on
On
Substitute value DO
0/1
Operating mode
Pulse output /
Pulse width modulation (PWM) /
Pulse train /
On/Off-delay
Frequency output
Per mill
1 Hz / S7 analog output
1 Hz
Channel 0
Time base
0.1 ms/1 ms
0.1 ms
Function DI
Input/HW enable
Input
On-delay
0 65535
0 65535
Time period
1 65535 / 2 65535
20000
Diagnostics DO
Off/on
On
Substitute value DO
0/1
Operating mode
Pulse output /
Pulse width modulation (PWM) /
Pulse train /
On/Off-delay
Frequency output
Per mill
1 Hz / S7 analog output
1 Hz
Channel 1
Time base
0.1 ms/1 ms
0.1 ms
Function DI
Input/HW enable
Input
On-delay
0 65535
0 65535
Time period
1 65535 / 2 65535
20000
358
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
Index
1
1Count24V
Counting modes, 19
Isochrone mode, 12
Measuring modes, 54
Operating modes, 17
Technical specifications, 115
Terminal assignment, 16
1Count5V
Counting modes, 129
Isochronous mode, 122
Measuring Modes, 165
Operating modes, 127
Technical specifications, 228
Terminal assignment, 126
1SSI
Encoder types, 232
Encoder value detection, 241
In fast mode, 239
In standard mode, 239
Isochronous mode, 233
Normalization, 243
Technical Specifications, 261
Terminal assignment, 238
2
2PULSE
Application examples, 323
Direct control of the DO, 311
Frequency output, 303
Isochronous mode, 267
Measurement of current, 310
On/Off-delay, 295
Parallel connection of both channels, 315
Pulse output, 273
Pulse train, 289
Pulse width modulation, 279
Technical Specifications, 347
Terminal Assignment, 350
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07
C
Comparator of the 1SSI, 245
Control and feedback interface
Accessing with STEP 7 programming, 49, 79, 104,
192, 217, 258
Control interface
1Count24V counting modes, 45
1Count24V measuring modes, 75
1Count24V position feedback, 101
1Count5V counting modes, 155
1Count5V measuring modes, 188
1Count5V position feedback, 215
1SSI standard mode, 256
2PULSE (long), 352
2PULSE (short), 351
Count continuously, 21, 131
Counting modes
Control interface, 45, 155
Feedback interface, 45, 155
D
Direction detection, 244
Direction reversal, 244
E
Encoder value detection
Free-wheeling, 241
Isochronously, 241
Synchronous, 241
359
Index
Feedback interface
1Count24V counting modes, 45
1Count24V measuring modes, 75
1Count24V position feedback, 101
1Count5V counting modes, 155
1Count5V measuring modes, 188
1Count5V position feedback, 215
1SSI fast mode, 259
1SSI standard mode, 256
2PULSE, 353
Frequency Measurement, 59, 61, 172, 170
Parameters
1Count24V counting modes, 52
1Count24V measuring modes, 82
1Count24V position feedback, 107
1Count5V counting modes, 163
1Count5V measuring modes, 195
1Count5V position feedback, 221
1SSI, 251
2PULSE, 356
Period Measurement, 67, 69, 182
Periodic counting, 26, 136
Position feedback, 92, 206
Control interface, 101, 215
Feedback interface, 101, 215
G
Gate functions
in counting modes, 30, 139
in measuring modes, 72, 185
In position feedback, 93, 207
Isochronous mode
1Count24V, 12
1Count5V, 122
1SSI, 233
2PULSE, 267
L
Latch Function, 247
T
Technical Specifications
1Count24V, 115
1Count5V, 228
1SSI, 261
2PULSE, 347
M
Measuring
Frequency, 59, 61, 172
Period, 67, 69, 182
Rotational speed, 63, 65, 177
Measuring modes
Control interface, 75, 188
Feedback interface, 75, 188
Mode
Frequency measurement, 61, 172
Period measurement, 69, 182
Rotational speed measurement, 65, 177
360
Technological Functions
Operating Instructions, 06/2010, A5E00124867-07