Connecting a rotary encoder (MPG)
Besides using switches it is also possible to use a rotary encoder (or Manual Pulse Generator, abbreviated to MPG).
In a CNC application the most common version that is used is the one below:
An MPG can be used for moving an axis. It's possible to connect up to 3 MPGs to the UIO-10.
An important parameter of the selected MPG is the number of pulses it gives for one rotation. The most common version is either 100 or 400 pulses.
We only support MPGs that offer 100 pulses per rotation.
How to connect the MPG?
An MPG has the following connections
- optional, /A (pronounced as 'not A')
- optional, /B (pronounced as 'not A')
The signals that are marked with '/' are inverted signals, in our application, these are not used. The output signals need to be TTL level, meaning it should be either 5V or 0V.
Connecting the MPG to the UIO-10 is very simple. In this case, we will choose to use handwheel input #1.
Please note that the MPGs can only be used on dedicated inputs of the UIO-10.
The following connections need to be made:
VCC --> +5V
0V --> Ground
A --> IO #16
B --> IO #18
The connections shown in the image below can vary for the MPG you use. Make sure you check in advance which signal is available where on the MPG.
Setting up the software
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 inputs #16 and #18 for MPG use. This is done by simply selecting the 'MPG' option in the Function column for input #16.
Please note that input #18 is automatically also configured as MPG. The indicator in front of '16' and '18' will turn green to indicate that MPG functions have been assigned to these inputs.
Do not forget to press 'Save settings' when finished.
Using the MPG on an axis
In order to use the handwheel, an axis needs to be selected. When an axis is selected this is shown in the DRO. The currently active axis will have a different color and a 'T' will appear indicating that the axis is in 'tracking mode'. So it will track the movement of the MPG.
Using 3 handwheels simultaneously
NEEDS TO BE DOUBLE CHECKED!!!!
If all three handwheels are used simultaneously they are assigned as:
X-axis --> Input #16,#18 Y-axis --> Input #24, #25 Z-axis --> Input #26,#28
Please note, that all axis need to be selected, this is indicated by the color of the DRO.
NOTE: Slect the axis before it will use the handwheel
The below will show you a little more about the steps.