Single-Axis Motion header

This page contains the complete code of the header file in this chapter. Notice that the value we provide for END_VELOCITY is an example. You should customize the value for your end velocity. Other motion parameters such as velocity and acceleration are described in AxisConfiguration.h. For further details, see Chapter 4 > Axis Configration header.

In SingleAxisMotion.h, your Single-Axis Motion code should be as follows:

#pragma once

/* Motion Profile */
#define END_VELOCITY 2000

BOOL EnableAxis(int Index);
BOOL DisableAxis(int Index);
VOID MoveAbsolute(int Index, double Target);
VOID MoveContinuousAbsolute(int Index, double Target);
VOID MoveRelative(int Index, double Distance);
VOID MoveContinuousRelative(int Index, double Distance);
VOID MoveAdditive(int Index, double Distance);
VOID Halt(int Index);
VOID Stop(int Index);
VOID Jog(int Index);
VOID Inch(int Index, double Distance);
VOID Velocity(int Index);
VOID QueueSample01(int Index, double Distance1, double Distance2);
VOID QueueSample02(int Index, double Target, double Distance1, double Distance2);
VOID Blending(int Index, double Distance, double Target);
VOID SetAxisStartingPosition(int Index);
VOID GetAnAxisState(int& Index);
VOID GetAnAxisPosition(int& Index);
VOID GetAnAxisVelocity(int& Index);