Connecting a rotary switch
Besides a normal switch also rotary switches can be used. The rotary switch is very similar to a normal switch, and in fact, it is actually a collection of switches into one housing. One side of these switches is common to all of them and is connected to one pin. Below is an example of such a rotary switch.

For your information, many of these rotary switches can be set to a certain amount of positions. This can often be done by a ring that is sitting on top of the housing, this ring limits the number of positions. Therefore, you could have a 12-position rotary switch but only use 4 positions.
To help in understanding the internals, the drawing below shows a little more of the 'inside' of such a rotary switch.

As you can see the switch will always only have one connection with one pin. The advantage of such a switch is that there will always be only one 'switch' turned on, the other automatically will have been switched off since there can only be one connection.
This example will connect the rotary switch to select an axis for using an MPG to control the axis position. We will make the following connections:
Rotary #pin | UIO-10 #pin | Function |
Common | Ground | |
#1 | IO #1 | Axis selection OFF |
#2 | IO #2 | Select Axis X |
#3 | IO #3 | Select Axis Y |
#4 | IO #4 | Select Axis Z |
The image below shows a diagram of how it is connected.

Software setup
The final step is setting up the software. For the example below software version, 4.03.58 was used.
To start the setup go to the setup tab, and click on the 'UIO-10' button.


The next step, is to configure the inputs. please not first the difference when selecting a 'switch' or 'rotary switch', a rotary switch is called a 'selector':

We first now configure a new selector, by selecting the appropriate inputs and selecting 'Selector' as function, next make sure that you group these together by giving them the same ID.

Next, we set the function for each of the four positions:

The video below shows again the step of connecting a rotary switch. Please note that the colors of the wires used in this video example are not related to the example above.