hit counter script

Siemens SIMATIC CFU Commissioning Manual page 38

Distributed i/o
Hide thumbs Also See for SIMATIC CFU:
Table of Contents

Advertisement

Operating modes and functions
5.3 Counting
You can read the count value in the feedback interface. The count value is displayed in S7
format.
Function
Explanation
Set count value
The count value is set to 0 when the following
events occur:
● Startup of the CFU
● Count value exceeds the high counting limit
● Restart of the CPU (STOP -> RUN)
● CPU/CFU connection is restored
Record and
The pulses at the digital input are recorded and
evaluate pulses
evaluated according to the parameter assign‐
ment.
High counting
The high counting limit is configurable.
limit
Reaction to vio‐
When the count value violates the high counting
lation of the high
limit, the further behavior of the counter depends
counting limit
on the configuration.
Stop counting
The counter stops at the following events:
● Internal gate closed (SW gate/HW gate)
● CPU in STOP
● CPU/CFU connection is terminated (for
example, PN cable disconnected)
Load counter
A count value can be loaded via the control in‐
terface.
Comparison val‐
A comparison value can be configured.
ue
Show range of
The range in which the current count value is lo‐
count value
cated as compared to the count limits and the
comparison value can be queried via the
STS_DQ status bit (bit in the feedback interface).
Hardware inter‐
It is possible to generate a hardware interrupt
rupt
when status bit STS_DQ changes from 0 to 1.
Output compari‐
It is possible to output the STS_DQ status bit di‐
son event at the
rectly at a digital output of the CFU.
digital output
* Note on use with PCS 7
The parameter permits values up to 32 bits without sign. The maximum value is FFFF FFFFH (4 294 967 295).
In PCS 7, the representation is limited to 2
38
-1 by the DINT data type.
31
Note
-
"Edge selection" parameter:
● On rising edge
● On falling edge
● On rising and falling edge
"High counting limit" parameter: range *:
1 to 4294967295 (2
-1)
32
Parameter "Reaction to violation of the high counting
limit (Page 41)":
● Stop counting
● Continue counting
Note:
If the HW gate is to be used, select a free channel of the
CFU at the "Hardware gate channel" parameter.
Load count value via control interface (Page 44):
● Control bit (LD_SLOT)
● "Load value" parameter range *: 0 to 4294967295
(2
-1)
32
"Comparison value" parameter; range *:
1 to 4294967295 (2
-1)
32
The status of STS_DQ depends on the setting of the
"Set output DQ (Page 41)" parameter:
● Between comparison value and high limit
● Between comparison value and low limit
"Hardware interrupt" parameter:
● Lock
● Comparison event for DQ occurred
"DQ channel" parameter:
To output the comparison event on a digital output, se‐
lect a free channel of the CFU at the "DQ channel" pa‐
rameter.
Commissioning Manual, 08/2019, A5E39252870-AD
SIMATIC CFU

Advertisement

Table of Contents
loading

Table of Contents