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.
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
- Add a header file:
- Add a .cpp file:
In Solution Explorer, in Header Files, add a header file and name it "
In Solution Explorer, in Source Files, add a C++ file and name it "
Take the following steps to complete the training: