APIs, concepts, guides, and more

◆ UserUnitsSet()

void UserUnitsSet ( double countsPerUserUnit)
Description:
Allows you to change your default units from encoder counts to some other unit by supplying the number of encoder counts in said "User Unit."
Parameters
countsPerUserUnitThe number of Encoder Counts in desired User Unit
Sample Code:
Axis: Configuration
// Define counts per unit (user units)
// set
axis.ErrorLimitTriggerValueSet(1); // Position error limit trigger (see support page)
// get
double userUnits = axis.UserUnitsGet();
RapidSetup:
Go to axis screen->Motion and Tuning. In the image below, UserUnitsSet sets the value in the Counts per Unit box shown in the Motion Parameters box. It is currently set to 1 which means units are in counts.
See also
UserUnitsGet
Examples
MotionHoldReleasedBySoftwareAddress.cpp, MultiaxisMotion.cpp, PVTmotionMultiAxis.cpp, PathMotion.cpp, SingleAxisSyncOutputs.cpp, SyncOutputWithMotion.cpp, UpdateBufferPoints.cpp, _helpers.cs, _setup.cs, axis-config-userunits.cs, axis-configuration.cpp, axis-motion-hold-via-address.cs, basic-template.cs, and compensator-single-axis.cs.