Stores a number which gets incremented on each `INC` pulse.
v-zaehler
@/v-zaehler
Stores a number which gets incremented on each `INC` pulse.
Zaehlstufenumber
Value to add on each increment. Use a negative value (e.g. -1) to make decrements.
Zaehlenpulse
Triggers a single increment.
Neustartpulse
Resets the accumulated value to zero.
Ergebnisnumber
The accumulated value.
To use the node in your project you should have the hio/nwt-gus-hi library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.
C++ implementation
node {
void evaluate(Context ctx) {
Number count = getValue<output_Ergebnis>(ctx);
if (isInputDirty<input_Neustart>(ctx))
count = 0;
else if (isInputDirty<input_Zaehlen>(ctx))
count += getValue<input_Zaehlstufe>(ctx);
emitValue<output_Ergebnis>(ctx, count);
}
}