libximc 3.0.3
calibration_t Struct Reference

Calibration structure More...

#include <ximc.h>

Data Fields

double A
 Conversion coefficient equal to the number of millimeters (or other user units) per one step.
unsigned int MicrostepMode
 Controller setting which is determine a step division mode

Detailed Description

Calibration structure

Where to find all values for calculations?

  • XILab (don’t forget to load the profile for your positioner. The profile should match the full name of your positioner, e.g., 8MT173-25-MEn1.cfg):
    • In XILab settings, go to the "User units" tab. Divide the second number by the first one — this is your A coefficient.
    • In the "DC motor" / "BLDC motor" / "Stepper motor" tab (depending on your motor type), find the "Encoder counts per turn" field and use it in the formula for calculating coefficient B.
  • Profile file (open with any text editor; make sure it matches the full name of your positioner, e.g., 8MT173-25-MEn1.cfg):
    • Find Step_multiplier= and Unit_multiplier=. Divide the second by the first — this is your A coefficient.
    • Find Encoder_CPT= and use this value in the B coefficient formula instead of ENCODER_COUNTS_PER_TURN.

How to calculate Speed, Accel, Decel, and AntiplaySpeed in user units when using a stepper motor with encoder or DC/BLDC motor?

  1. Load the correct profile in XILab for your positioner (e.g., 8MT173-25-MEn1.cfg).
  2. Enable Feedback encoder mode if not already enabled.
  3. Enter speed in the "Working speed" field in user units.
  4. In the "User units" tab, disable the "User units" flag to see RPM.
  5. Multiply the RPM value from "Working speed" by coefficient B. Example: 480 * 0.0000009375 = 0.00045. This value for the 8MT173-25-MEn1 in Encoder mode equals 2 mm/s.

    Acceleration, deceleration, and antiplay speed are calculated the same way.


Field Documentation

◆ A

double A

Conversion coefficient equal to the number of millimeters (or other user units) per one step.

Must be non-zero and positive. Used for position and movement conversion.

  • For stepper motor without encoder, only one coefficient A is used. Conversion formula: [user_unit/steps]. Example: 800 steps = 1 mm, then A = 1/800 = 0.00125
  • When using a stepper motor with encoder or DC/BLDC motors, the position is set in counts, but speed, acceleration/deceleration, and antiplay speed are set in RPM, so two coefficients are required:
    • A. Conversion for position: [user_unit/counts]. Example: 16000 counts = 1 mm, then A = 1/16000 = 0.0000625
    • B. Conversion for speed, acceleration/deceleration, and antiplay speed: [60/ENCODER_COUNTS_PER_TURN * A]. Example: 60 / 4000 * 0.0000625 = 0.0000009375