User Units

Performing Motion in User Units

Projects go much smoother when we describe the solution in terms of the problem being solved rather than in the terms of the tools or components being used to solve the problem. User Units allow the description of positions, speeds, and accelerations in desired terms of the application itself rather than in steps, counts, or other units of measure normally used by motors or sensors. With User Units the machine can be told to go to a particular number of inches, or millimeters, or microns or degrees rather than stepper motor steps. Using desired user units requires understanding the total number of steps or counts required to produce a single user unit. This number is influenced by the resolution of the stepper motor or encoder and the effect of the transmissions between motor shaft rotation and resulting movement that is being described.

The first step is to identify what user units should be used. Select units that produce friendly numbers that do not have too many zeros after the decimal point or before the decimal point that are difficult to keep straight. As an example consider the case of describing the rotation of a turntable which is being directly driven by a microstepping stepper motor shaft. Angular degrees would be a good choice.

The second step is to consider a displacment of the machine and identify how many fundamental motor units occur during that displacement, and how many user units occur. Dividing the total counts for the displacement by the total user units for the displacement produces "Counts Per User Unit", the number we can use on the Setup Tab to configure an axis. In this example the motor is configured for 256 microsteps per step. This produces 51200 microsteps per motor rotation. In that one rotation there are 360 degrees. So the Counts Per User Unit for this direct drive turntable would be 51200/360 = 142.22222222.

To use this value click on the "Setup Tab":

Select the axis you want to configure from the Axis Group list and click the "Edit" button:

This produces a property editor for the axis that includes a "Counts Per User Unit" field:

Place the calculated value in this field. Note that the default speeds and accels will likely need to be changed in light of the new units.

Consider this more involved case. A stepper motor is driving a leadscrew through a timing belt:

We need to identify the counts per user unit for both the encoder and the stepper motor. First consider the stepper motor. Let's choose one rotation of the motor for the identifying displacement. One motor turn corresponds to 51200 counts (steps). One turn of the motor turns the shaft 1/2 turn. This produces 2.5mm of carriage motion. So the counts per user unit for the stepper axis is 51200/2.5 which is 20480.

For the encoder let's suppose it has 1000 slits. This encoder has 4000 counts per rotation because of the quadature effect. One rotation of the motor produces 4000 counts for the encoder and the same 2.5mm for the carriage. The counts per user unit for the encoder is then 4000/2.5 which is 1600. The stepper motor and encoder axes are separate items in the Axis Group list on the setup page so they each have their own Counts Per User Units field.

Related Topics

Move By
Move To
Counts Per User Unit