sys::Obj sys::Virtual sys::Component control::Count
public class Count
[niagaraIcon="module://icons/x16/control/util/step.png"]
pulse counter object, counts transitions form 0 to 1 of input "in" Counts up if dir == true, counts down if dir == false Forced to preset value if enable = false In the case where dir == false, the counter will stop counting down at 0
public property bool dir [config, falseText="down", defaultOnClone, trueText="up"]
Configures direction. True = "up", False = "down"
public property bool enable
enable input
public property bool in
input, transitions from false to true increment out by 1
public property int out [readonly]
Number of times "in" property has transitioned from 0 to 1
public property int preset [min=0, config, defaultOnClone]
Presets the counter to a specific value, defaults to 0
public property bool r
if r is true, out = preset and no counting takes place
public virtual override void execute()
Execute is called once every scan. increment/decrement the count on rising edge of "in" if "enable" is true
public action void reset()
Resets the counter to the "preset" value
public virtual override void start()
Override of start method to initialize the counter