Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I have a problem when connecting the variable (from the create a block) to a variable in the function because it's inside a switch. How can I link them?
I want to connect the variable to each (20) in the motor blocks
To get technical, this thing (pictured below) is a "parameter", not a "variable".
"Variables" look like this:
You can use a data wire to write the parameter value to a variable before the switch block and then read the variable inside of the nested switch blocks. Something like this...
Using variables is probably a better solution, but you can pass data wires into a switch block if it is tabbed view.
Required, but never shown