Command: Set Counter - Siemens FM 450-1 Equipment Manual

Table of Contents

Advertisement

8.11

Command: Set counter

Overview
If you want to start or continue the counting process of a counter from a specific value (the load
value), you must assign parameters for the signal with which the counter is to be set to the load
value. You can set the counter as follows:
• With the L_DIRECT input parameter of the FC_CNT_CTRL
• With an external signal either via input 1I2 (2I2) or via the input in conjunction with the zero
mark of the encoder.
This section describes the different methods and the time sequence for setting a counter.
Load value
Any number within the count range can be set for the load value.
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 0 to
+32 bit and as -1 within the count range -31 to +31 bit.
The load value is entered in the DB of the FC°CNT_CTRL.
Setting the counter via the user program
Regardless of the external events, you can set a counter with the FC°CNT_CTRL by means of the
L_DIRECT input parameter. This is also possible while a count is in progress.
The input parameter L_DIRECT is reset by FC CNT_CTRL once the job is successful completed.
If you set the counter via the FC_CNT_CTRL call, setting cannot trigger a hardware interrupt.
Setting the counter with an external signal
The L_PREPAR input parameter prepares a new load value. You can choose between two
different external signals with which you set a counter to the load value
• Only input 1I2 (2I2)
• Input 1I2 (2I2) and the zero mark of the encoder
You use the zero mark of the encoder if you want to synchronize the counter to a specific counter
status at a specific point in your process. Hence you achieve greater precision in the count
process.
The counter is set independent of the mode.
Counter module FM 450-1
Equipment Manual, 03/2022, A5E03648739-AC
Modes, settings, parameters and commands
8.11 Command: Set counter
71

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-400

Table of Contents