Multi Port Switch

This function block provides a mechanism to switch between various input sources based on a reference number. It allows users to dynamically choose from several inputs.

📥 Inputs

Switch A number used to determine which input to output.

Input 0 The first possible input connection.

Input 1 The second possible input connection.

Additional input connections can be added, allowing you to switch up to 20 inputs based on the selected switch number.

📤 Outputs

Generic This output provides the selected input based on the switch value.

🕹️ Controls

Number of inputs A dropdown menu that allows you to select the total number of inputs available for the switching operation.

🎨 Features

Dynamic Input Switching Users can easily change the input source being utilized during runtime.

Customizable Inputs The number of available input sockets can be adjusted dynamically based on user selection.

📝 Usage Instructions

  1. Select Number of Inputs: Use the dropdown to set the number of inputs you want to work with, ranging from 2 to 20.

  2. Connect Inputs: Link your desired input sources to the appropriate input sockets (Input 0, Input 1, etc.).

  3. Set Switch Value: Provide a number through the Switch input to determine which of the inputs should be output.

  4. Evaluate: Run the block to examine the output from the chosen input based on the switch value.

📊 Evaluation

When executed, the block will output the data from the input corresponding to the value provided on the Switch.

💡 Tips and Tricks

Dynamic Control

You can create interesting scenarios where only specific inputs are activated based on conditions. For example, use blocks that provide the switch number based on certain criteria.

Combining with Logic Blocks

Integrate this with Logic Operations to provide more complex switching scenarios where multiple conditions can control input selection.

🛠️ Troubleshooting

Invalid Input Connections

If you encounter issues where the output is not as expected, ensure that the Switch value actually corresponds to a connected input. If the selected input is not connected, the block will indicate an invalid state.

Exceeded Number of Inputs

Ensure that the switch value does not exceed the number of inputs you have defined in the dropdown. If it does, it will return None as the output.

Last updated