Operating Modes, parameters and commands
7.3 Count modes
FM 350-1 Counter module
Manual, 05/2011, A5E03648639-01
103
7.3.6
Counting range
Introduction
There is a 32-bit wide count register on the module. With the Count range, you select
whether the module is to count only in the positive range or whether the 32nd bit is
interpreted as a sign bit thus allowing negative numbers to be represented. You can only
select a count range if no main counting direction is set.
Counting range
The FM 350-1 counts in different count ranges at the two count range limits 0 to +32 bits and
-31 to +31 bits. An overflow or an underflow is detected at the respective count limits.
In the -31 to +31 bits count mode, the counter status is represented in 2's complement.
Table 7- 14 Counting Ranges and Overflow/Underflow
Counting range
Overflow
Underflow
0 to +32 bits*
0 to 4 294 967 295
0 to FFFF FFFFH
When the counter status changes
from 4 294 967 295 to 0
When the counter status changes
from 0 to 4 294 967 295
-31 to +31 bit
–2 147 483 648 to 2 147
483 647
8000 0000H to 7FFF
FFFFH
When the counter status changes
from +2 147 483 647 to
–2 147 483 648
When the counter status changes
from –2 147 483 648 to 2 147 483
647
*In this count range, you can only specify and evaluate hexadecimal values.
Overflow, Underflow and Zero Pass
At both count limits, a bit is set in the DB of the FC CNT_CTRL1 in the event of overflow and
underflow (see chapter DB Assignment (Page 169)).
At the "-31 to +31-bit" count range, a bit is similarly set in the DB with a zero pass.
At the "0 to +32-bit" count range, an overflow or underflow, depending on the direction of
counting, is additionally indicated upon zero pass.
Table 7- 15 Status Bit in DB at Overflow/Underflow and Zero Pass
Event
Status bit in DB
Overflow
STS_OFLW is set
Underflow
STS_UFLW is set
Zero pass
STS_ZERO is set
Initiating Hardware Interrupts
You can also signal the overflow, underflow and zero pass events via hardware interrupts.
Содержание SIMATIC S7-300 FM 350-1
Страница 8: ...Table of contents FM 350 1 Counter module 8 Manual 05 2011 A5E03648639 01 ...
Страница 168: ...Encoder signals and their evaluation 8 4 Signal evaluation FM 350 1 Counter module 168 Manual 05 2011 A5E03648639 01 ...
Страница 186: ...Technical data 11 2 Technical data FM 350 1 Counter module 186 Manual 05 2011 A5E03648639 01 ...
Страница 188: ...Replacement parts FM 350 1 Counter module 188 Manual 05 2011 A5E03648639 01 ...
Страница 190: ...References FM 350 1 Counter module 190 Manual 05 2011 A5E03648639 01 ...
Страница 194: ...Glossary FM 350 1 Counter module 194 Manual 05 2011 A5E03648639 01 ...