libximc
2.14.27
|
In addition to working in basic units(steps, encoder value), the library allows you to work with user units. For this purpose are used:
To specify conversion of the basic units in the user and back, calibration_t structure is used. With the help of coefficients A and MicrostepMode, specified in this structure, steps and microsteps which are integers are converted into the user value of the real type and back.
Conversion formulas:
user_value = A*(step + mstep/pow(2,MicrostepMode-1))
step = (int)(user_value/A) mstep = (user_value/A - step)*pow(2,MicrostepMode-1)
Structures and functions for working with user units have the _calb postfix. The user using these functions can perform all actions in their own units without worrying about the computations of the controller. The data format of _calb structures is described in detail. For _calb functions particular descriptions are not used. They perform the same actions as the basic functions do. The difference between them and the basic functions is in the position, velocity, and acceleration of the data types defined as user-defined. If clarification for _calb functions is necessary, they are provided as notes in the description of the basic functions.
Some functions for working with user units support coordinate transformation using a correction table. To load a table from a file, the load_correction_table() function is used. Its description contains the functions and their data supporting correction.
File format:
Sample file:
X dX 0 0 5.0 0.005 10.0 -0.01