CT_FUN

Down counter

This is a user-defined function from a system function block. Counters realized with the CT_FUN function are down counters. The count area SV (set value) is 1 to 32767.

Parameters

Input

Count (BOOL)

count contact (down)

each time a rising edge is detected at Count, the value 1 is subtracted from the elapsed value EV until the value 0 is reached

Reset (BOOL)

reset contact

each time a rising edge is detected at Reset, the value 0 is assigned to EV and the signal output C is reset; each time a falling edge is detected at Reset, the value at SV is assigned to EV

SV (INT)

Set value

value of EV after a reset procedure

Input/output

dutInstance(CT_FUN_INSTANCE_DUT)

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

Output

C (BOOL)

signal output

is set when EV becomes 0

EV (INT)

Elapsed value

  • current counter value

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

Remarks

Time chart

  1.  (1) download PROG mode
  2.  (2) RUN mode
Related topics:

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