
Chapter 5 Deployment I/O periphery
Manual VIPA System 300S SPEED7
5-10
HB140E - CPU SC - RE_313-6CF03 - Rev. 07/45
The counter signal is detected and evaluated during counting operation.
Every counter occupies one double word in the input range for the
counter
register
. In the operating modes "single count" and "periodical count" an
end respectively start value may be defined according to the counting
direction up respectively down.
Each counter has parameterizable additional functions as gate function,
latch function, comparison value, hysteresis and hardware interrupt.
Each counter parameter may be set by the
Count
submodule of the
Siemens CPU 313C-2DP. Here is defined among others:
•
Interrupt behavior
•
max. Frequency
•
Counter mode respectively behavior
•
Stat, end, comparison value and hysteresis
The SFB COUNT (SFB 47) should cyclically be called (e.g. OB 1) for
controlling the counter functions. The SFB is to be called with the
corresponding instance DB. Here the parameters of the SFB are stored.
Among others the SFB 47 contains a request interface. Hereby you get
read and write access to the registers of the appropriate counter.
So that a new job may be executed, the previous job must have be finished
with JOB_DONE = TRUE. 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. Writing accesses to outputs of the instance DB
is not permissible.
Note!
You must not call an SFB you have configured in your program in another
program section under another priority class, because the SFB must not
interrupt itself.
Example: It is not allowed to call the same SFB both in OB 1 and in the
interrupt OB.
The counter is controlled by the internal gate (i gate). The i gate is the
result of logic operation of hardware gate (HW gate) and software gate
(SW gate), where the HW gate evaluation may be deactivated by the
parameterization.
HW gate: open (activate):
Edge 0-1 at hardware gate
x
input of
the module
close
(deactivate):
Edge
1-0
at
hardware
gate
x
input of
the module
SW
gate:
open
(activate):
In application program by setting
SW_GATE of the SFB 47
close (deactivate):
In application program by resetting
SW_GATE of the SFB 47
Preset respectively
parameterize
counter
Controlling the
counter functions
Controlling the
counter
Содержание 313-6CF03
Страница 2: ...Lerrzeichen ...
Страница 40: ...Chapter 3 Hardware description Manual VIPA System 300S SPEED7 3 14 HB140E CPU SC RE_313 6CF03 Rev 07 45 ...
Страница 122: ...Chapter 5 Deployment I O periphery Manual VIPA System 300S SPEED7 5 36 HB140E CPU SC RE_313 6CF03 Rev 07 45 ...
Страница 140: ...Chapter 6 Deployment PtP communication Manual VIPA System 300S SPEED7 6 18 HB140E CPU SC RE_313 6CF03 Rev 07 45 ...