Motion Master
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Profile Class Reference

#include <profile.h>

Public Member Functions

 Profile (Cia402Drive &cia402_drive, int64_t target, uint32_t velocity, uint32_t acceleration, uint32_t deceleration, uint32_t torque_slope, float sine_frequency, uint32_t sustain_time_ms, bool repeat, bool master_generated=false, bool absolute_target=false)
 
 ~Profile ()
 
MotionMasterError start_ramp_position_profile (std::function< void(MotionMasterWarning)> warning_callback=nullptr)
 Start executing a position trapezoidal profile from zero to target. (Z - zero; T - target) More...
 
MotionMasterError start_trapezoidal_position_profile (std::function< void(MotionMasterWarning)> warning_callback=nullptr)
 Start executing a position trapezoidal profile from zero to target, then back to zero. (Z - zero; T - target) More...
 
MotionMasterError start_bidirectional_position_profile (std::function< void(MotionMasterWarning)> warning_callback=nullptr)
 Start executing a position trapezoidal profile from zero to target, then back to negative target and then zero. (Z - zero; T - target; nT - negative target). More...
 
MotionMasterError start_sine_wave_position_profile ()
 Start executing a position sine wave profile. More...
 
MotionMasterError start_ramp_velocity_profile (std::function< void(MotionMasterWarning)> warning_callback=nullptr, bool non_stop=false)
 Start executing a velocity trapezoidal profile from zero to target. (Z - zero; T - target) More...
 
MotionMasterError start_trapezoidal_velocity_profile (std::function< void(MotionMasterWarning)> warning_callback=nullptr)
 Start executing a velocity trapezoidal profile from zero to target, then back to zero. (Z - zero; T - target) More...
 
MotionMasterError start_bidirectional_velocity_profile (std::function< void(MotionMasterWarning)> warning_callback=nullptr)
 Start executing a velocity trapezoidal profile from zero to target, then back to negative target and then zero. (Z - zero; T - target; nT - negative target). More...
 
MotionMasterError start_sine_wave_velocity_profile ()
 Start executing a velocity sine wave profile. More...
 
MotionMasterError start_ramp_torque_profile (std::function< void(MotionMasterWarning)> warning_callback=nullptr)
 Start executing a torque trapezoidal profile from zero to target. (Z - zero; T - target) More...
 
MotionMasterError start_trapezoidal_torque_profile (std::function< void(MotionMasterWarning)> warning_callback=nullptr)
 Start executing a torque trapezoidal profile from zero to target, then back to zero. (Z - zero; T - target) More...
 
MotionMasterError start_bidirectional_torque_profile (std::function< void(MotionMasterWarning)> warning_callback=nullptr)
 Start executing a torque trapezoidal profile from zero to target, then back to negative target and then zero. (Z - zero; T - target; nT - negative target). More...
 
MotionMasterError start_sine_wave_torque_profile ()
 Start executing a torque sine wave profile. More...
 
void stop ()
 Stop the currently running (repeating) profile after a full cycle. More...
 
bool was_aborted () const
 Indicates if the profile has been aborted before it finished. More...
 

Constructor & Destructor Documentation

◆ Profile()

Profile::Profile ( Cia402Drive cia402_drive,
int64_t  target,
uint32_t  velocity,
uint32_t  acceleration,
uint32_t  deceleration,
uint32_t  torque_slope,
float  sine_frequency,
uint32_t  sustain_time_ms,
bool  repeat,
bool  master_generated = false,
bool  absolute_target = false 
)

◆ ~Profile()

Profile::~Profile ( )

Member Function Documentation

◆ start_bidirectional_position_profile()

MotionMasterError Profile::start_bidirectional_position_profile ( std::function< void(MotionMasterWarning)>  warning_callback = nullptr)

Start executing a position trapezoidal profile from zero to target, then back to negative target and then zero. (Z - zero; T - target; nT - negative target).

\parameter warning_callback a function for sending warnings

Returns
MotionMasterError if any

◆ start_bidirectional_torque_profile()

MotionMasterError Profile::start_bidirectional_torque_profile ( std::function< void(MotionMasterWarning)>  warning_callback = nullptr)

Start executing a torque trapezoidal profile from zero to target, then back to negative target and then zero. (Z - zero; T - target; nT - negative target).

\parameter warning_callback a function for sending warnings

Returns
MotionMasterError if any

◆ start_bidirectional_velocity_profile()

MotionMasterError Profile::start_bidirectional_velocity_profile ( std::function< void(MotionMasterWarning)>  warning_callback = nullptr)

Start executing a velocity trapezoidal profile from zero to target, then back to negative target and then zero. (Z - zero; T - target; nT - negative target).

\parameter warning_callback a function for sending warnings

Returns
MotionMasterError if any

◆ start_ramp_position_profile()

MotionMasterError Profile::start_ramp_position_profile ( std::function< void(MotionMasterWarning)>  warning_callback = nullptr)

Start executing a position trapezoidal profile from zero to target. (Z - zero; T - target)

\parameter warning_callback a function for sending warnings

Returns
MotionMasterError if any

◆ start_ramp_torque_profile()

MotionMasterError Profile::start_ramp_torque_profile ( std::function< void(MotionMasterWarning)>  warning_callback = nullptr)

Start executing a torque trapezoidal profile from zero to target. (Z - zero; T - target)

\parameter warning_callback a function for sending warnings

Returns
MotionMasterError if any

◆ start_ramp_velocity_profile()

MotionMasterError Profile::start_ramp_velocity_profile ( std::function< void(MotionMasterWarning)>  warning_callback = nullptr,
bool  non_stop = false 
)

Start executing a velocity trapezoidal profile from zero to target. (Z - zero; T - target)

\parameter warning_callback a function for sending warnings \parameter non_stop do not stop the profile

Returns
MotionMasterError if any

◆ start_sine_wave_position_profile()

MotionMasterError Profile::start_sine_wave_position_profile ( )

Start executing a position sine wave profile.

Returns
MotionMasterError if any

◆ start_sine_wave_torque_profile()

MotionMasterError Profile::start_sine_wave_torque_profile ( )

Start executing a torque sine wave profile.

Returns
MotionMasterError if any

◆ start_sine_wave_velocity_profile()

MotionMasterError Profile::start_sine_wave_velocity_profile ( )

Start executing a velocity sine wave profile.

Returns
MotionMasterError if any

◆ start_trapezoidal_position_profile()

MotionMasterError Profile::start_trapezoidal_position_profile ( std::function< void(MotionMasterWarning)>  warning_callback = nullptr)

Start executing a position trapezoidal profile from zero to target, then back to zero. (Z - zero; T - target)

\parameter warning_callback a function for sending warnings

Returns
MotionMasterError if any

◆ start_trapezoidal_torque_profile()

MotionMasterError Profile::start_trapezoidal_torque_profile ( std::function< void(MotionMasterWarning)>  warning_callback = nullptr)

Start executing a torque trapezoidal profile from zero to target, then back to zero. (Z - zero; T - target)

\parameter warning_callback a function for sending warnings

Returns
MotionMasterError if any

◆ start_trapezoidal_velocity_profile()

MotionMasterError Profile::start_trapezoidal_velocity_profile ( std::function< void(MotionMasterWarning)>  warning_callback = nullptr)

Start executing a velocity trapezoidal profile from zero to target, then back to zero. (Z - zero; T - target)

\parameter warning_callback a function for sending warnings

Returns
MotionMasterError if any

◆ stop()

void Profile::stop ( )

Stop the currently running (repeating) profile after a full cycle.

◆ was_aborted()

bool Profile::was_aborted ( ) const

Indicates if the profile has been aborted before it finished.

Returns
true if aborted, otherwise false

The documentation for this class was generated from the following files: