Sunday, December 25, 2016

32. Iteration

An Iteration module acts as a for loop.


It will count from the event it receives at its In input. Since the Inc input is 1, it will count by 1 each time and end at the value set by N input which is 63.


A button controls the In input. We have events for On state and Off state. Change the On value to 0 and Off value to 1 from Properties with button selected. Thus now when the button is turned on, it will start count at 0.


Usually the iteration will count very fast, and thus you only get the end value with a Numeric Readout. Thus from the Properties set Iterations per Second to 1 and check Limited Speed. Now the Numeric Readout will count up every second until it reaches 63.


This is the structure view:


This is the panel view:


No comments:

Post a Comment