Every counter has an assigned output channel. For each counter you can specify the
behavior of the counter output via the parametrization with
‘Characteristics of the output’
and
‘Pulse duration’
Chapter 5.6.4.4 ‘Counter’ on page 100
5.6.3 Proceeding
In the Siemens SIMATIC Manager the following steps should be executed:
1.
Perform a hardware configuration for the CPU.
Chapter 4.4 ‘Hardware configura-
2.
Double-click the counter sub module of the CPU CPU 314C-2 PN/DP
(314-6EH04-0AB0 V3.3).
ð
The dialog
‘Properties’
is opened.
3.
As soon as you select the operating mode for the corresponding channel, a dialog
box with default values for this counter mode is created and shown.
5.6.5 ‘Counter operating modes’ on page 104
4.
Perform the required parameter settings.
5.
Safe your project with
‘Station
è
Safe and compile’
.
6.
Transfer your project to your CPU.
n
The SFB 47 should cyclically be called (e.g. OB 1) for controlling the counter func-
tions.
n
The SFB is to be called with the corresponding instance DB. Here the parameters of
the SFB are stored.
n
Among others the SFB 47 contains a request interface. Hereby you get read and
write access to the registers of the appropriate counter.
n
So that a new job may be executed, the previous job must have be finished with
JOB_DONE = TRUE.
n
Per channel you may call the SFB in each case with the same instance DB, since the
data necessary for the internal operational are stored here.
n
Writing accesses to outputs of the instance DB is not permissible.
n
Starting, stopping and interrupting a count function of
Counter 0
to
Counter 2
exclu-
sively happens via the SW gate by setting the SW gate of the SFB 47.
You can also activate input
‘Gate 3’
via the parametrization for
Counter 3
.
More information about the usage of this block may be found in the
manual "SPEED7 Operation List" from VIPA.
5.6.4 Parametrization
5.6.4.1
Address assignment
Sub module
Input address
Access
Assignment
Counter
816
DINT
Channel 0: Counter value / Frequency value
820
DINT
Channel 1: Counter value / Frequency value
824
DINT
Channel 2: Counter value / Frequency value
828
DINT
Channel 3: Counter value / Frequency value
Output channel Counter
x
Hardware configuration
User program
VIPA System MICRO
Deployment I/O periphery
Counting > Parametrization
HB400 | CPU | M13-CCF0000 | en | 16-47
99