Block Group: | Logic |
Icon: |
The hub block outputs the most recently updated value from multiple inputs.
An initial output of a Script block that is set to autorun is an initial value of the property and is not considered a change.
For information on using dataflow blocks, see Dataflow.
The following property of the Hub block can take input and give output.
input n sets and returns one of the values watched by this hub.
The following properties of the Hub block can give output but cannot take input.
index returns the index of the most recently updated input n value. The index is the number in the input's property name, such as the number 2 for input 2.
output returns the value of the most recently updated input n property.
The following image shows a Hub block. In this example, Ella deposited at 11:00 a.m., Cara at 1:00 p.m., and Shan at 2:00 p.m. output is the value of Shan’s deposit. Because input 1 is the most recently updated input, index is 1.