Counts Per Unit

What are Counts Per Unit (User Units)?

User Units are a way to format the values you work with into something more meaningful than raw counts. They are often used to change counts to distance (cm, inch, etc), degree, full rotation, etc.

How to Use Counts Per Unit?

Many people like to use linear units such as inches or centimeters. In this case you need to calculate how many motor revolutions there are in a centimeter then multiply that number by the motor resolution. See examples below.

IMPORTANT

User Units are a RapidCode Axis class member variable. It is not written or stored to the drives/controller memory. Gearing and other Controller operations will not apply User Unit scaling/inversion for you.

RapidSetup Parameters Scaled by Counts Per Unit

Motion and Tuning Tab

  • Velocity, Acceleration, Deceleration, Motion Profile Positions 1 and 2, and Relative Increment.

Limits and Actions Tab

  • Position error Trigger value, Positive and Negative Software trigger values.

Configuration Tab

  • Fine and Coarse Position tolerances, Velocity tolerance, and Estop modify deceleration rate.

Examples - Calculate Counts per Unit

EXAMPLE 1

If you have an AKD drive, a free-spinning motor that is not connected to anything, and you want to work in Degrees.

Resolution=220=1048576Counts/MtrRev= 2^{20} = 1048576 Counts/MtrRev (set by AKD drive)

Counts Per Unit =(1048576Counts/MtrRev)(0.002777...MtrRevs/Degree)=2912.7111...Counts/Degree= (1048576 Counts/MtrRev) * (0.002777... MtrRevs/Degree) = 2912.7111... Counts/Degree

EXAMPLE 2

If you have an AKD drive, a motor hooked up to a 5mm/rev ball screw, with a 2:1 timing belt and you want to work in Inches.

Helpful hints: There are 25.4mm in 1 Inch. The actuator travels 5mm in 1 ball screw revolution. The motor needs to turn 2 revs to turn the ball screw 1 rev.

Resolution = 2^20 = 1048576 Counts/MtrRev (set by AKD drive)

Counts per Unit = 1048576 Counts/MtrRev x 10.16 MtrRevs/Inch = 10653532.16 Counts/Inch

EXAMPLE 3

If you have an S300 drive with PRBASE set to 16, a motor hooked up to a conveyor belt that has a 5-in-diameter roller, a 25:1 gearhead and you want to work in meters.

Helpful hints: There are 0.0254 meters in 1 Inch. The linear distance that the belt travels in one roller revolution is the same as the roller circumference. The motor needs to turn 25 revs to turn the roller 1 rev.

Roller Circumference = 5in x pi = 15.707 inches

Resolution = 2^16 = 65536 Counts/MtrRev (set by PRBASE in S300 drive)

Counts per Unit = 65536 Counts/MtrRev x 62.663 MtrRevs/meter = 4106700 Counts/meter

EXAMPLE 4

If you have an AKD drive, a free-spinning motor that is not connected to anything, and you want to work in Revolutions.

Helpful hints: The AKD drive uses 1048576 Counts/MtrRev regardless of the motor feedback device.

Resolution = 2^20 = 1048576 Counts/MtrRev (set by AKD drive)

Counts per Unit = 1048576 Counts/MtrRev

EXAMPLE 5

If the drive resolution is 24 bits and you want to work in Revolutions.

Resolution = 2^24 = 16777216 Counts/MtrRev (set by drive)

Counts per Unit = 16777216 Counts/MtrRev

Last updated