Chapter 4: Axis Configuration

Axes need to be configured before you use them. While they are moving, you need to keep reading and writing data into them to make sure they work as expected. In KINGSTAR, you use read and write functions to access the axis parameters stored in the McAxisParameter type, and change their values.

In this chapter, you'll learn how to configure an axis.

Feedback delay

After KINGSTAR sends a command, it needs some time to get the result from the servo drive. The time between the command sending and result receiving is feedback delay. To prevent new command affecting the previous command's result, we add delay cycles, so KINGSTAR can check the executed result of the command it sends before.

How many delay cycles should we add? Typically it's three. When the delay is 3 cycles, KINGSTAR compares the actual position (or velocity, torque) with the commanded position sent 3 cycles before, but the number of cycles can vary if the drive does not follow the synchronization properly. For more information about feedback delay, see Concepts > Feedback delay.

Add a header and .cpp file

You need to add a header and a .cpp file to learn the code of this chapter. The steps of adding them are written in Chapter 2 > Add a header and .cpp file.


Take the following steps to complete the training:

Complete code

Additional information

Axis Configuration functions