Special function number 2 triggers a direct (software) capture and a direct (software) preset of the up/down counter on the counting channel. These two events are synchronized with the programmable output frequency (this output must not be used externally in this case).
Each rising edge of the programmable frequency output of the counting channel enables a direct (software) capture of the counter value followed by a direct (software) preset.
The principle of special function number 2 is shown below:
The following language objects behave differently in relation to the standard direct capture and preset functions:
-
the %Ir.m.c.2 capture done bit is then positioned on 1 (standard direct capture does not set this bit to 1),
-
the %Ir.m.c.l preset done bit is then positioned on 1 (standard direct preset does not set this bit to 1),