Please enable JavaScript to view this site.

Instruction that set an input to increment a circular counter.

Syntax

ct_cur (counter cnt, inCond)

cnt

Counter name (defined as type of variable)

inCond

Count input (rising edge).

Can be any condition, even an expression (e.g., cp(1) > 1000)

Validity

Rule, Task

Note

A ct_cdr counter can also act on the same counter.

Counters are not retentive

On the rising edge of the input(inCond), the current value (CV) is incremented by 1. The output (QU) goes into the ON state when the current value (CV) becomes > of the preset value (PV).

The count (CV) and a variable of type i32 which once it reaches the preset value (PV) is reset to zero.

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC