CTD_FUN

Down counter

This is a user-defined function from a system function block. CTD_FUN (count down) allows you to program counting procedures.

Parameters

Input

CD (BOOL)

count down

the value 1 is subtracted from the current value CV for each rising edge detected at CD, except when Load is set or CV has reached the value zero.

Load (BOOL)

with Load the counter state is reset to PV

PV (INT)

Preset value

is the value subjected to subtraction during the first counting procedure

Input/output

dutInstance(CTD_FUN_INSTANCE_DUT)

Internal memory containing the internal values and states, which corresponds to the instance memory of the associated FB.

Output

Q (BOOL)

signal output

is set if CV = zero

CV (INT)

Current value

  • contains the current subtraction result (CV = current value)

  • The value can be changed during counting operation by writing to the variable from the programming editor.

Time chart

Related topics:

Modified on: 2021-03-30Feedback on this pagePanasonic hotline