TwiceAsNice
2019-02-18
|
#include <ModuleDummy.h>
Classes | |
struct | PositionBlock |
Public Member Functions | |
MoConModuleDummy (std::string _name, const Nice::JointPtr &_config) | |
virtual | ~MoConModuleDummy () |
void | setBasicSettings (const SelectBasicSettings::Constant _selectID, const double _parameter) |
With this method a value of the basic configuration can be changed. More... | |
void | setBasicSettings () |
This method sets all basic configuration with the values stored in the property tree. More... | |
void | getBasicSettings () |
This method returns the basic configuration of the motor. More... | |
void | stop () |
This method stops the motor with a deceleration. More... | |
void | abort () |
Abort the moving of the motor immediately without deceleration. More... | |
void | moveToPositiveLimit () |
The motor moves to the positive software limit switch. More... | |
void | moveToLimit (const int &_limit) |
move the motor to the positive limit switches (_limits[i]>0) or negative (_limits[i]<0) limit switches. More... | |
virtual void | moveAbsolute (const int &_position) |
The motor move to the absolute position. More... | |
virtual void | moveRelative (const int &_position) |
The motor moves to the relative position. More... | |
void | moveToNegativeLimit () |
The motor moves to the negative software limit switch. More... | |
virtual void | moveToHome () |
The motor is looking for the reference positions and reset the step counter to zero. More... | |
void | setExternalProfileBufferSize (const unsigned int _bufferSize, bool _extended=true) |
This method set the external buffer size. More... | |
virtual bool | isMoving () |
Checks if the motors is in motion. More... | |
bool | isAtHome () |
This method indicate whether the motor is at the home position. More... | |
bool | isMotionComplete () |
Checks if the motor has finished the motion. More... | |
void | setMotionComplete (bool _complete) |
Set the MOTOR_COMPLETE flag. More... | |
int | isAtLimit () |
Checks if the motors is in limit. More... | |
virtual double | getMEncPosition () |
Returns the current position of the motor. More... | |
double | getAEncPosition () |
Returns the current position of the motor. More... | |
double | getIEncPosition () |
Returns the current positions of the motor. More... | |
double | getVelocity () |
Returns the current velocity of the motor. More... | |
void | waitForEvent (Nice::Time _time, Basda::DeviceAsync &_async) |
This method wait till an event was received. More... | |
Nice::I64 | getReferenceTime () |
This method synchronize the MoCon time with the PC time. More... | |
Nice::I64 | getCurrentTime () |
This method returns the current MoCon time. More... | |
void | setExternalProfileData (const unsigned int _index, const unsigned int _timeBase, const int _velocity, const int _position, const int _acceleration=0, const int _jerk=0) |
This method set the external profile data. More... | |
void | setExternalProfileStart (const ValueStartMode::Constant _startMode, const Nice::Date _startTime=Nice::Date::microSeconds(-1)) |
This method starts the external profile from the beginning or from the last position. More... | |
void | setExternalProfileStop () |
This method starts the external profile at a defined time. More... | |
int | getExternalProfileInfo () |
This method returns the actual index of the external profile. More... | |
Nice::Time | initExternalProfile (int _frequency, unsigned int _maxSamplesPerSegment, unsigned int _minSamplesPerSegment, unsigned int _faultTolerance) |
void | clearExternalProfileBuffer () |
This method freed the allocated memory of the external profile. More... | |
void | calculateTransition (const Nice::Date &_date, const Nice::NPoint &_positionSequence) |
This method calculates the transition from one trajectory to another if a trajectory already exist. More... | |
void | calculateTransition (const Nice::Date &_date, const Nice::NPoint &_positionSequence, const Nice::Time &_transitionLength) |
unsigned int | fitTrajectory () |
This method convert the given trajectory to a motor controller profile. More... | |
void | validateExternalProfile () |
unsigned int | bufferExternalProfile () |
Nice::Date | uploadExternalProfile () |
This uploads the external profile data. More... | |
bool | isExternalProfileDone () |
void | uploadExternalProfile (const Nice::SeqSeqInt &_segments) |
void | setPosition (const int &_position) |
Change the absolute position of the motor. More... | |
Nice::Time | getLinkTimeout () |
This method return the TCP connection timeout. More... | |
Nice::BitSet | getPositionSwitchStatus () |
Nice::Completion | getProgress () |
void | setChatType (Nice::ChatLinePtr _chat) |
void | setCollision (bool _collisionNegative, bool _collisionPositive) |
void | setBrokenSwitches (Nice::BitSet _brokenPositionSwitchMask, int _fromPosition, int _toPosition) |
void | setWheelPositionOffset (int _positionOffset) |
MoConModuleDummy (std::string _name, const Nice::JointPtr &_config) | |
virtual | ~MoConModuleDummy () |
void | setBasicSettings (const SelectBasicSettings::Constant _selectID, const double _parameter) |
With this method a value of the basic configuration can be changed. More... | |
void | setBasicSettings () |
This method sets all basic configuration with the values stored in the property tree. More... | |
void | getBasicSettings () |
This method returns the basic configuration of the motor. More... | |
void | stop () |
This method stops the motor with a deceleration. More... | |
void | abort () |
Abort the moving of the motor immediately without deceleration. More... | |
void | moveToPositiveLimit () |
The motor moves to the positive software limit switch. More... | |
void | moveToLimit (const int &_limit) |
move the motor to the positive limit switches (_limits[i]>0) or negative (_limits[i]<0) limit switches. More... | |
virtual void | moveAbsolute (const int &_position) |
The motor move to the absolute position. More... | |
virtual void | moveRelative (const int &_position) |
The motor moves to the relative position. More... | |
void | moveToNegativeLimit () |
The motor moves to the negative software limit switch. More... | |
virtual void | moveToHome () |
The motor is looking for the reference positions and reset the step counter to zero. More... | |
void | setExternalProfileBufferSize (const unsigned int _bufferSize, bool _extended=true) |
This method set the external buffer size. More... | |
virtual bool | isMoving () |
Checks if the motors is in motion. More... | |
bool | isAtHome () |
This method indicate whether the motor is at the home position. More... | |
bool | isMotionComplete () |
Checks if the motor has finished the motion. More... | |
void | setMotionComplete (bool _complete) |
Set the MOTOR_COMPLETE flag. More... | |
int | isAtLimit () |
Checks if the motors is in limit. More... | |
virtual double | getMEncPosition () |
Returns the current position of the motor. More... | |
double | getAEncPosition () |
Returns the current position of the motor. More... | |
double | getIEncPosition () |
Returns the current positions of the motor. More... | |
double | getVelocity () |
Returns the current velocity of the motor. More... | |
void | waitForEvent (Nice::Time _time, Basda::DeviceAsync &_async) |
This method wait till an event was received. More... | |
Nice::I64 | getReferenceTime () |
This method synchronize the MoCon time with the PC time. More... | |
Nice::I64 | getCurrentTime () |
This method returns the current MoCon time. More... | |
void | setExternalProfileData (const unsigned int _index, const unsigned int _timeBase, const int _velocity, const int _position, const int _acceleration=0, const int _jerk=0) |
This method set the external profile data. More... | |
void | setExternalProfileStart (const ValueStartMode::Constant _startMode, const Nice::Date _startTime=Nice::Date::microSeconds(-1)) |
This method starts the external profile from the beginning or from the last position. More... | |
void | setExternalProfileStop () |
This method starts the external profile at a defined time. More... | |
int | getExternalProfileInfo () |
This method returns the actual index of the external profile. More... | |
Nice::Time | initExternalProfile (int _frequency, unsigned int _maxSamplesPerSegment, unsigned int _minSamplesPerSegment, unsigned int _faultTolerance) |
void | clearExternalProfileBuffer () |
This method freed the allocated memory of the external profile. More... | |
void | calculateTransition (const Nice::Date &_date, const Nice::NPoint &_positionSequence) |
This method calculates the transition from one trajectory to another if a trajectory already exist. More... | |
void | calculateTransition (const Nice::Date &_date, const Nice::NPoint &_positionSequence, const Nice::Time &_transitionLength) |
unsigned int | fitTrajectory () |
This method convert the given trajectory to a motor controller profile. More... | |
void | validateExternalProfile () |
unsigned int | bufferExternalProfile () |
Nice::Date | uploadExternalProfile () |
This uploads the external profile data. More... | |
bool | isExternalProfileDone () |
void | uploadExternalProfile (const Nice::SeqSeqInt &_segments) |
void | setPosition (const int &_position) |
Change the absolute position of the motor. More... | |
Nice::Time | getLinkTimeout () |
This method return the TCP connection timeout. More... | |
Nice::BitSet | getPositionSwitchStatus () |
Nice::Completion | getProgress () |
void | setChatType (Nice::ChatLinePtr _chat) |
void | setCollision (bool _collisionNegative, bool _collisionPositive) |
void | setBrokenSwitches (Nice::BitSet _brokenPositionSwitchMask, int _fromPosition, int _toPosition) |
void | setWheelPositionOffset (int _positionOffset) |
Protected Member Functions | |
template<typename Type > | |
Type | checkAttribute (const std::string &_node, const std::string &_attributeName, const Type &_default) |
void | addInternalProperties () |
This method add some internal properties like status properties. More... | |
void | generateBrokenWheelSwitches () |
void | travelRangeChanged (const Nice::Point &_p) |
void | startTimer (const Nice::Date _startDate) |
When the Date is not set (Nice::Date()) the the timer starts immediately. More... | |
template<typename Type > | |
Type | checkAttribute (const std::string &_node, const std::string &_attributeName, const Type &_default) |
void | addInternalProperties () |
This method add some internal properties like status properties. More... | |
void | generateBrokenWheelSwitches () |
void | travelRangeChanged (const Nice::Point &_p) |
void | startTimer (const Nice::Date _startDate) |
When the Date is not set (Nice::Date()) the the timer starts immediately. More... | |
|
protected |
|
protected |
Basda::MoConModuleDummy::MoConModuleDummy | ( | std::string | _name, |
const Nice::JointPtr & | _config | ||
) |
|
virtual |
Basda::MoConModuleDummy::MoConModuleDummy | ( | std::string | _name, |
const Nice::JointPtr & | _config | ||
) |
|
virtual |
void Basda::MoConModuleDummy::abort | ( | void | ) |
Abort the moving of the motor immediately without deceleration.
void Basda::MoConModuleDummy::abort | ( | ) |
Abort the moving of the motor immediately without deceleration.
|
protected |
This method add some internal properties like status properties.
|
protected |
This method add some internal properties like status properties.
unsigned int Basda::MoConModuleDummy::bufferExternalProfile | ( | ) |
unsigned int Basda::MoConModuleDummy::bufferExternalProfile | ( | ) |
void Basda::MoConModuleDummy::calculateTransition | ( | const Nice::Date & | _date, |
const Nice::NPoint & | _positionSequence | ||
) |
This method calculates the transition from one trajectory to another if a trajectory already exist.
_date | - the external profile start date |
_positionSequence | - supporting points of the spline in steps |
_transitionLength | - the time how long the transition should take |
void Basda::MoConModuleDummy::calculateTransition | ( | const Nice::Date & | _date, |
const Nice::NPoint & | _positionSequence | ||
) |
This method calculates the transition from one trajectory to another if a trajectory already exist.
_date | - the external profile start date |
_positionSequence | - supporting points of the spline in steps |
_transitionLength | - the time how long the transition should take |
void Basda::MoConModuleDummy::calculateTransition | ( | const Nice::Date & | _date, |
const Nice::NPoint & | _positionSequence, | ||
const Nice::Time & | _transitionLength | ||
) |
void Basda::MoConModuleDummy::calculateTransition | ( | const Nice::Date & | _date, |
const Nice::NPoint & | _positionSequence, | ||
const Nice::Time & | _transitionLength | ||
) |
|
protected |
|
protected |
void Basda::MoConModuleDummy::clearExternalProfileBuffer | ( | ) |
This method freed the allocated memory of the external profile.
void Basda::MoConModuleDummy::clearExternalProfileBuffer | ( | ) |
This method freed the allocated memory of the external profile.
unsigned int Basda::MoConModuleDummy::fitTrajectory | ( | ) |
This method convert the given trajectory to a motor controller profile.
The external profile can be setup with a spline which has some supporting points (in PC time and steps). This spline will be converted to motor controller time and microsteps steps.
The final external profile coordinates will be calculated as followed:
where i is the index of the position sequence the other variables are self-explained, i hope :)
unsigned int Basda::MoConModuleDummy::fitTrajectory | ( | ) |
This method convert the given trajectory to a motor controller profile.
The external profile can be setup with a spline which has some supporting points (in PC time and steps). This spline will be converted to motor controller time and microsteps steps.
The final external profile coordinates will be calculated as followed:
where i is the index of the position sequence the other variables are self-explained, i hope :)
|
protected |
|
protected |
double Basda::MoConModuleDummy::getAEncPosition | ( | ) |
Returns the current position of the motor.
The current position of the motor will be stored in the property
double Basda::MoConModuleDummy::getAEncPosition | ( | ) |
Returns the current position of the motor.
The current position of the motor will be stored in the property
void Basda::MoConModuleDummy::getBasicSettings | ( | ) |
This method returns the basic configuration of the motor.
The basic settings will be stored in the properties:
Basda::MoCon::MotorNotInitializedException |
void Basda::MoConModuleDummy::getBasicSettings | ( | ) |
This method returns the basic configuration of the motor.
The basic settings will be stored in the properties:
Basda::MoCon::MotorNotInitializedException |
int Basda::MoConModuleDummy::getExternalProfileInfo | ( | ) |
This method returns the actual index of the external profile.
int Basda::MoConModuleDummy::getExternalProfileInfo | ( | ) |
This method returns the actual index of the external profile.
double Basda::MoConModuleDummy::getIEncPosition | ( | ) |
Returns the current positions of the motor.
The current position of the motor will be stored in the property
double Basda::MoConModuleDummy::getIEncPosition | ( | ) |
Returns the current positions of the motor.
The current position of the motor will be stored in the property
Nice::Time Basda::MoConModuleDummy::getLinkTimeout | ( | ) |
This method return the TCP connection timeout.
Nice::Time Basda::MoConModuleDummy::getLinkTimeout | ( | ) |
This method return the TCP connection timeout.
|
virtual |
Returns the current position of the motor.
The current position of the motor will be stored in the property
Have to be virtual because it is overloaded in the ModuleDummyMock of the wheel dummy test
|
virtual |
Returns the current position of the motor.
The current position of the motor will be stored in the property
Have to be virtual because it is overloaded in the ModuleDummyMock of the wheel dummy test
Nice::BitSet Basda::MoConModuleDummy::getPositionSwitchStatus | ( | ) |
Nice::BitSet Basda::MoConModuleDummy::getPositionSwitchStatus | ( | ) |
Nice::Completion Basda::MoConModuleDummy::getProgress | ( | ) |
Nice::Completion Basda::MoConModuleDummy::getProgress | ( | ) |
Nice::I64 Basda::MoConModuleDummy::getReferenceTime | ( | ) |
This method synchronize the MoCon time with the PC time.
Nice::I64 Basda::MoConModuleDummy::getReferenceTime | ( | ) |
This method synchronize the MoCon time with the PC time.
double Basda::MoConModuleDummy::getVelocity | ( | ) |
Returns the current velocity of the motor.
The current velocity of the motor will be stored in the property
double Basda::MoConModuleDummy::getVelocity | ( | ) |
Returns the current velocity of the motor.
The current velocity of the motor will be stored in the property
Nice::Time Basda::MoConModuleDummy::initExternalProfile | ( | int | _frequency, |
unsigned int | _maxSamplesPerSegment, | ||
unsigned int | _minSamplesPerSegment, | ||
unsigned int | _faultTolerance | ||
) |
Nice::Time Basda::MoConModuleDummy::initExternalProfile | ( | int | _frequency, |
unsigned int | _maxSamplesPerSegment, | ||
unsigned int | _minSamplesPerSegment, | ||
unsigned int | _faultTolerance | ||
) |
bool Basda::MoConModuleDummy::isAtHome | ( | ) |
This method indicate whether the motor is at the home position.
bool Basda::MoConModuleDummy::isAtHome | ( | ) |
This method indicate whether the motor is at the home position.
int Basda::MoConModuleDummy::isAtLimit | ( | ) |
Checks if the motors is in limit.
int Basda::MoConModuleDummy::isAtLimit | ( | ) |
Checks if the motors is in limit.
bool Basda::MoConModuleDummy::isExternalProfileDone | ( | ) |
bool Basda::MoConModuleDummy::isExternalProfileDone | ( | ) |
bool Basda::MoConModuleDummy::isMotionComplete | ( | ) |
Checks if the motor has finished the motion.
The following property will indicate the motion completeness
bool Basda::MoConModuleDummy::isMotionComplete | ( | ) |
Checks if the motor has finished the motion.
The following property will indicate the motion completeness
|
virtual |
Checks if the motors is in motion.
Have to be virtual because it is overloaded in the ModuleDummyMock of the wheel dummy test
|
virtual |
Checks if the motors is in motion.
Have to be virtual because it is overloaded in the ModuleDummyMock of the wheel dummy test
|
virtual |
The motor move to the absolute position.
Have to be virtual because it is overloaded in the ModuleDummyMock of the wheel dummy test
_position | is the target position |
|
virtual |
The motor move to the absolute position.
Have to be virtual because it is overloaded in the ModuleDummyMock of the wheel dummy test
_position | is the target position |
|
virtual |
The motor moves to the relative position.
Have to be virtual because it is overloaded in the ModuleDummyMock of the wheel dummy test
_position | is the target positions |
|
virtual |
The motor moves to the relative position.
Have to be virtual because it is overloaded in the ModuleDummyMock of the wheel dummy test
_position | is the target positions |
|
virtual |
The motor is looking for the reference positions and reset the step counter to zero.
Have to be virtual because it is overloaded in the ModuleDummyMock of the wheel dummy test
|
virtual |
The motor is looking for the reference positions and reset the step counter to zero.
Have to be virtual because it is overloaded in the ModuleDummyMock of the wheel dummy test
void Basda::MoConModuleDummy::moveToLimit | ( | const int & | _limit | ) |
move the motor to the positive limit switches (_limits[i]>0) or negative (_limits[i]<0) limit switches.
_limit | a vector that contains to which limit the motors have to move (_limits[i]>0 - to positive limit) (_limits[i]<0 - to negative limit) whereas the order of the points is corresponding to the order of the motor names in the property tree (alphabetical). |
void Basda::MoConModuleDummy::moveToLimit | ( | const int & | _limit | ) |
move the motor to the positive limit switches (_limits[i]>0) or negative (_limits[i]<0) limit switches.
_limit | a vector that contains to which limit the motors have to move (_limits[i]>0 - to positive limit) (_limits[i]<0 - to negative limit) whereas the order of the points is corresponding to the order of the motor names in the property tree (alphabetical). |
void Basda::MoConModuleDummy::moveToNegativeLimit | ( | ) |
The motor moves to the negative software limit switch.
_travelRangeCheck | is true if the travel range might be checked before the movement. In that case the motor will move maximal to the software limit. If false the motor will move relative INT_MAX steps |
void Basda::MoConModuleDummy::moveToNegativeLimit | ( | ) |
The motor moves to the negative software limit switch.
_travelRangeCheck | is true if the travel range might be checked before the movement. In that case the motor will move maximal to the software limit. If false the motor will move relative INT_MAX steps |
void Basda::MoConModuleDummy::moveToPositiveLimit | ( | ) |
The motor moves to the positive software limit switch.
_travelRangeCheck | is true if the travel range might be checked before the movement. In that case the motor will move maximal to the software limit. If false the motor will move relative INT_MAX steps |
void Basda::MoConModuleDummy::moveToPositiveLimit | ( | ) |
The motor moves to the positive software limit switch.
_travelRangeCheck | is true if the travel range might be checked before the movement. In that case the motor will move maximal to the software limit. If false the motor will move relative INT_MAX steps |
void Basda::MoConModuleDummy::setBasicSettings | ( | const SelectBasicSettings::Constant | _selectID, |
const double | _parameter | ||
) |
With this method a value of the basic configuration can be changed.
The basic setting consist of
SelectID | Parameter |
---|---|
Profile | 0=trapeze, 2=s-curve |
Steps/Counts per revolution | 1..8192 |
Velocity | 0.0115..81916250.0 (unit: revolution per minute) |
Start velocity | 0.0115..81916250.0 (unit: revolution per minute) |
Acceleration | 1717..2147483647 (unit: revolution per minute^2) |
Deceleration | 1717..2147483647 (unit: revolution per minute^2) |
Jerk | 3930..2147483647 (unit: revolution per minute^3) |
_selectID | is the ID to define the type of the _parameter |
_parameter | the configuration value |
Basda::MoCon::CmdForStepperException | |
Basda::MoCon::RevolutionNotDefinedException | |
Basda::MoCon::MotorInMotionException |
void Basda::MoConModuleDummy::setBasicSettings | ( | const SelectBasicSettings::Constant | _selectID, |
const double | _parameter | ||
) |
With this method a value of the basic configuration can be changed.
The basic setting consist of
SelectID | Parameter |
---|---|
Profile | 0=trapeze, 2=s-curve |
Steps/Counts per revolution | 1..8192 |
Velocity | 0.0115..81916250.0 (unit: revolution per minute) |
Start velocity | 0.0115..81916250.0 (unit: revolution per minute) |
Acceleration | 1717..2147483647 (unit: revolution per minute^2) |
Deceleration | 1717..2147483647 (unit: revolution per minute^2) |
Jerk | 3930..2147483647 (unit: revolution per minute^3) |
_selectID | is the ID to define the type of the _parameter |
_parameter | the configuration value |
Basda::MoCon::CmdForStepperException | |
Basda::MoCon::RevolutionNotDefinedException | |
Basda::MoCon::MotorInMotionException |
void Basda::MoConModuleDummy::setBasicSettings | ( | ) |
This method sets all basic configuration with the values stored in the property tree.
The basic configuration values are stored in the sub tree CFG.DATASHEET.BASIC of the motor and can be configured via the configuration files.
void Basda::MoConModuleDummy::setBasicSettings | ( | ) |
This method sets all basic configuration with the values stored in the property tree.
The basic configuration values are stored in the sub tree CFG.DATASHEET.BASIC of the motor and can be configured via the configuration files.
void Basda::MoConModuleDummy::setBrokenSwitches | ( | Nice::BitSet | _brokenPositionSwitchMask, |
int | _fromPosition, | ||
int | _toPosition | ||
) |
void Basda::MoConModuleDummy::setBrokenSwitches | ( | Nice::BitSet | _brokenPositionSwitchMask, |
int | _fromPosition, | ||
int | _toPosition | ||
) |
|
inline |
|
inline |
void Basda::MoConModuleDummy::setExternalProfileBufferSize | ( | const unsigned int | _bufferSize, |
bool | _extended = true |
||
) |
This method set the external buffer size.
_bufferSize | the buffer size 1..4294967295 |
_extended | enables the extended mode that allows to program the external profile with < index >, < time >, < velocity >, < position >, < acceleration >, < jerk >, otherwise the external profile needs only the parameter < index >, < time >, < velocity >, < position > (disable = 0, enable = 1) |
void Basda::MoConModuleDummy::setExternalProfileBufferSize | ( | const unsigned int | _bufferSize, |
bool | _extended = true |
||
) |
This method set the external buffer size.
_bufferSize | the buffer size 1..4294967295 |
_extended | enables the extended mode that allows to program the external profile with < index >, < time >, < velocity >, < position >, < acceleration >, < jerk >, otherwise the external profile needs only the parameter < index >, < time >, < velocity >, < position > (disable = 0, enable = 1) |
void Basda::MoConModuleDummy::setExternalProfileData | ( | const unsigned int | _index, |
const unsigned int | _timeBase, | ||
const int | _velocity, | ||
const int | _position, | ||
const int | _acceleration = 0 , |
||
const int | _jerk = 0 |
||
) |
This method set the external profile data.
_index | the data value index 0..4294967295 |
_timeBase | 0..4294967295 |
_velocity | -2147483647..2147483647 |
_position | -2147483647..2147483647 |
_acceleration | optional, has to be defined if the extended mode is enabled |
_jerk | optional, has to be defined if the extended mode is enabled |
void Basda::MoConModuleDummy::setExternalProfileData | ( | const unsigned int | _index, |
const unsigned int | _timeBase, | ||
const int | _velocity, | ||
const int | _position, | ||
const int | _acceleration = 0 , |
||
const int | _jerk = 0 |
||
) |
This method set the external profile data.
_index | the data value index 0..4294967295 |
_timeBase | 0..4294967295 |
_velocity | -2147483647..2147483647 |
_position | -2147483647..2147483647 |
_acceleration | optional, has to be defined if the extended mode is enabled |
_jerk | optional, has to be defined if the extended mode is enabled |
void Basda::MoConModuleDummy::setExternalProfileStart | ( | const ValueStartMode::Constant | _startMode, |
const Nice::Date | _startTime = Nice::Date::microSeconds(-1) |
||
) |
This method starts the external profile from the beginning or from the last position.
_startMode | - define whether the profile should start from the beginning or from the current position |
_starTime | - the start time in cycle clocks (-1 is chosen to start the profile immediately; start time 0 (zero means to start at cycle zero)) |
void Basda::MoConModuleDummy::setExternalProfileStart | ( | const ValueStartMode::Constant | _startMode, |
const Nice::Date | _startTime = Nice::Date::microSeconds(-1) |
||
) |
This method starts the external profile from the beginning or from the last position.
_startMode | - define whether the profile should start from the beginning or from the current position |
_starTime | - the start time in cycle clocks (-1 is chosen to start the profile immediately; start time 0 (zero means to start at cycle zero)) |
void Basda::MoConModuleDummy::setExternalProfileStop | ( | ) |
This method starts the external profile at a defined time.
_startTime | - the start time in cycle |
_startMode | - define whether the profile should start from the beginning or from the current position |
void Basda::MoConModuleDummy::setExternalProfileStop | ( | ) |
This method starts the external profile at a defined time.
_startTime | - the start time in cycle |
_startMode | - define whether the profile should start from the beginning or from the current position |
void Basda::MoConModuleDummy::setMotionComplete | ( | bool | _complete | ) |
Set the MOTOR_COMPLETE flag.
The following property is used
void Basda::MoConModuleDummy::setMotionComplete | ( | bool | _complete | ) |
Set the MOTOR_COMPLETE flag.
The following property is used
void Basda::MoConModuleDummy::setPosition | ( | const int & | _position | ) |
Change the absolute position of the motor.
The motor will not move, but the current absolute position will be set to the given position value. The new position value can only be inside the travel range.
_position | the new absolute position of the motor |
void Basda::MoConModuleDummy::setPosition | ( | const int & | _position | ) |
Change the absolute position of the motor.
The motor will not move, but the current absolute position will be set to the given position value. The new position value can only be inside the travel range.
_position | the new absolute position of the motor |
void Basda::MoConModuleDummy::setWheelPositionOffset | ( | int | _positionOffset | ) |
void Basda::MoConModuleDummy::setWheelPositionOffset | ( | int | _positionOffset | ) |
|
protected |
When the Date is not set (Nice::Date()) the the timer starts immediately.
|
protected |
When the Date is not set (Nice::Date()) the the timer starts immediately.
void Basda::MoConModuleDummy::stop | ( | ) |
This method stops the motor with a deceleration.
void Basda::MoConModuleDummy::stop | ( | ) |
This method stops the motor with a deceleration.
|
protected |
|
protected |
Nice::Date Basda::MoConModuleDummy::uploadExternalProfile | ( | ) |
This uploads the external profile data.
Nice::Date Basda::MoConModuleDummy::uploadExternalProfile | ( | ) |
This uploads the external profile data.
void Basda::MoConModuleDummy::uploadExternalProfile | ( | const Nice::SeqSeqInt & | _segments | ) |
void Basda::MoConModuleDummy::uploadExternalProfile | ( | const Nice::SeqSeqInt & | _segments | ) |
void Basda::MoConModuleDummy::validateExternalProfile | ( | ) |
void Basda::MoConModuleDummy::validateExternalProfile | ( | ) |
void Basda::MoConModuleDummy::waitForEvent | ( | Nice::Time | _time, |
Basda::DeviceAsync & | _async | ||
) |
This method wait till an event was received.
_time | the time how long the method should wait for an incoming event |
void Basda::MoConModuleDummy::waitForEvent | ( | Nice::Time | _time, |
Basda::DeviceAsync & | _async | ||
) |
This method wait till an event was received.
_time | the time how long the method should wait for an incoming event |
|
protected |
|
protected |
The basic acceleration is set during the external profile initialization, to keep the acceleration constant over the whole trajectory.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
the external profile buffer size
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
the difference between the current cycle and the m_externalProfileStartCycle (profile elapsed cycles)
|
protected |
member for to define buffering mode (start from the beginning or from the last position)
|
protected |
|
protected |
|
protected |
the index of the buffer cell to store the next segment
|
protected |
the current index of the executed external profile segment
|
protected |
the cycle when the external profile started
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
member for the extended external profile mode
|
protected |
|
protected |
|
protected |
sum of the elapsed segment duration (in cycles) since profile start
Since the MoCon internal buffer is a ring buffer, the first segment can be overwritten and the total number of elapsed cycles can be calculated any more. This member keeps the sum of the duration since the profile start till now.
|
protected |
|
protected |
|
protected |