Independent of the number of activated counters for the CPU
312-5BE13 the maximum frequency amounts to 10kHz.
The controlling of the appropriate modes of operation is made from
the user program by the SFB COUNT (SFB 47).
Ä
Chapter 6.4 ‘Digital part’ on page 95
The counter signal is detected and evaluated during counting opera-
tion. Every counter occupies one double word in the input range for
the counter register. In the operating modes "single count" and "peri-
odical 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 312C. Here is defined among others:
n Interrupt behavior
n Max. frequency
n Counter mode respectively behaviour
n Stat, end, comparison value and hysteresis
1. Start the Siemens SIMATIC Manager with your project and open
the hardware configurator.
2. Place a profile rail.
3. Configure at slot 2 the corresponding CPU from Siemens CPU
312C.
4. Open the dialog window "Properties" by a double click to the
Count submodule of the CPU.
5. As soon as an operating mode to the corresponding channel is
selected, a dialog window for this operating mode is created and
displayed and filled with default parameters.
6. Execute the wished parameterization.
7.
Save the project with ‘Station è Save and compile
’.
8. Transfer the project to the CPU.
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 cor-
responding 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.
You must not call an SFB you have configured in your pro-
gram 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.
Pin assignment
Preset respectively
parameterize counter
Parameterization
Controlling the counter
functions
VIPA System 300S Deployment I/O periphery
Counter > Counter - Fast introduction
HB140 | CPU-SC | 312-5BE13 | GB | 15-50 99