Command: Setting The Counter - Siemens SIMATIC S7-300 FM 350-1 Manual

Counter
Table of Contents

Advertisement

Operating Modes, parameters and commands
7.3 Count modes
7.3.10

Command: Setting the counter

Overview
If you want to start the count from a specific value (the load value), you must parameterize
the signal that is to be used to set this counter to the load value. You can set the counter as
follows:
● With the L_DIRECT or L_PREPAR input parameter of the FC_CNT_CTL1
● With an external signal, either by means of the DI Set input or by means of DI Set in
This section describes the different methods and the time sequence when setting a counter.
Load value
Any number within the limits of the count range can be set for the count range.
The load value is interpreted according to the selected count range. If, for example, you
specify FFFF FFFF H as the load value, this is interpreted as 4 294 967 295 within the count
range from 0 to +32 bit and as -1 within the count range from -31 to +31 bit.
Enter the load value in the DB of the CNT_CTL1 function and transfer it with the CNT_CTL1
function to the module. The counter is then set to the load value:
● Directly and in preparation if input parameter L_DIRECT is set,
● In preparation only if input parameter L_PREPAR is set,
The following ranges of values are permitted for the load value:
Table 7- 25
Range of values for
load values
Low limit
High limit
Setting the Counter via the User Program
You can set a counter with the FC CNT_CTL1 using the L_DIRECT input parameter
regardless of external events. This can also be done while a count is in progress.
The input parameter L_DIRECT is reset by FC CNT_CTRL once the job is successfully
completed.
If you set the counter via the FC_CNT_CTL1 call, this can initiate a hardware interrupt.
120
connection with the zero crossing of the encoder
Permissible Range of Values for Load Values
Maximum low count limit
Maximum high count limit Parameterized high
Main count direction
None
-2
+ 1
31
count limit - 2
Up
Down
2
2
- 1
31
FM 350-1 Counter module
Manual, 05/2011, A5E03648639-01

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents