TwiceAsNice
2019-02-18
|
This is the Mocca Pi device, with support for N motors. More...
#include <BasdaMoccaPiNDevice.h>
Public Member Functions | |
MoccaPiNDevice (const Nice::JointPtr &_config) | |
Constructor. More... | |
virtual | ~MoccaPiNDevice () |
Destructor. More... | |
virtual void | open () |
This method might be called when the service goes in the INIT state. More... | |
virtual void | close () |
This method might be called when the service goes in the OFFLINE state. More... | |
virtual void | reset (DeviceAsync &_asynch=s_async) |
This method might be called when the service will be reseted. More... | |
virtual void | version () |
This method returns the version string of the device. More... | |
virtual void | init (DeviceAsync &=s_async) |
This method initialize the device and set the state to INIT. More... | |
virtual void | deinit (DeviceAsync &=s_async) |
This method deinitialize the device and set the state to OFFLINE. More... | |
virtual void | activate (DeviceAsync &=s_async) |
activate something More... | |
virtual void | deactivate (DeviceAsync &=s_async) |
deactivate something More... | |
virtual void | chat (std::string _commandID, std::string _cardNo, std::string _moduleNo, std::string _selectID, std::string _parameter, std::string _numberOfLines, DeviceAsync &=s_async) |
This method send the command string to the electronic. More... | |
virtual std::string | dontParse (DeviceAsync &=s_async) |
This method was requested by Lorenzo Busoni (lbuso 02.03.2012) ni@a rcetr i.as tro.i tMore... | |
virtual std::string | receiveDataRaw (std::string _commandID, std::string _cardNo, std::string _moduleNo, std::string _numberOfLines, DeviceAsync &=s_async) |
This method was requested by Lorenzo Busoni (lbuso 02.03.2012) ni@a rcetr i.as tro.i tMore... | |
virtual bool | isReachable () |
virtual void | prepareMoveSync (Nice::BitSet _motors) |
virtual void | startMoveSync () |
void | prepareDirectMove (const Nice::NPoint &_acceleration, const Nice::NPoint &_velocity, const Nice::NPoint &_deceleration) |
This method setup the acceleration anv velocity for a direct point to point move. More... | |
virtual void | moveToHome (Basda::DeviceAsync &=Basda::Device::s_async) |
All motors of the device are looking for the reference positions and reset the step counter to zero. More... | |
virtual void | moveToHomeStart (Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | moveToHomeWait (Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | moveToHomeSingle (int _motor, DeviceAsync &=s_async) |
virtual void | moveToHomeSingleStart (int _motor, DeviceAsync &=s_async) |
virtual void | moveToHomeSingleWait (DeviceAsync &=s_async) |
virtual void | moveToPositiveLimit (Basda::DeviceAsync &=Basda::Device::s_async) |
All motors of the device move to the positive software limit switch. More... | |
virtual void | moveToPositiveLimitStart (Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | moveToPositiveLimitWait (Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | moveToNegativeLimit (Basda::DeviceAsync &=Basda::Device::s_async) |
All motors of the device move to the negative software limit switch. More... | |
virtual void | moveToNegativeLimitStart (Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | moveToNegativeLimitWait (Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | moveToLimit (const Nice::NPoint &_limit, Basda::DeviceAsync &=Basda::Device::s_async) |
move all motors to the positive limit switches (_limits[i]>0) or negative (_limits[i]<0) limit switches. More... | |
virtual void | moveToLimitStart (const Nice::NPoint &_limit, Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | moveToLimitWait (Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | moveAbsolute (const Nice::NPoint &_positions, Basda::DeviceAsync &=Basda::Device::s_async) |
The motors that are stored in the vector, move to the absolute position. More... | |
virtual void | moveAbsoluteStart (const Nice::NPoint &_positions, Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | moveAbsoluteWait (Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | moveRelative (const Nice::NPoint &_positions, Basda::DeviceAsync &=Basda::Device::s_async) |
The motors that are stored in the vector move to the relative position. More... | |
virtual void | moveRelativeStart (const Nice::NPoint &_positions, Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | moveRelativeWait (Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | stop () |
This method stops the motor with a deceleration. More... | |
virtual void | abort () |
Abort the moving of the motor immediately without deceleration. More... | |
virtual Nice::NPoint | getPosition () |
Returns the current positions of all motors. More... | |
virtual Nice::NPoint | getDeviceEncoderPosition () |
Returns the current device internal position encoder of all motors. More... | |
virtual Nice::NPoint | getAbsoluteEncoderPosition () |
Returns the current absolute encoder positions of all motors. More... | |
virtual Nice::NPoint | getIncrementalEncoderPosition () |
Returns the current incremental encoder positions of all motors. More... | |
virtual void | setPosition (const Nice::NPoint &_position) |
Change the absolute position of all motors. More... | |
virtual Nice::NPoint | getVelocity () |
Returns the current velocity of all motors. More... | |
virtual Nice::SeqSeqDouble | getBasicSettings () |
Returns the basic settings of all motors. More... | |
virtual void | setVelocitySetting (const Nice::NPoint &_velocity) |
Set the velocity configuration parameter of all motors. More... | |
virtual void | setAccelerationSetting (const Nice::NPoint &_acceleration) |
Set the acceleration configuration parameter of all motors. More... | |
virtual void | setDecelerationSetting (const Nice::NPoint &_deceleration) |
Set the deceleration configuration parameter of all motors. More... | |
virtual void | setJerkSetting (const Nice::NPoint &_jerk) |
Set the jerk configuration parameter of all motors. More... | |
virtual bool | isMoving (Nice::BitSet &_motion) |
Checks if one of the motors is in motion. More... | |
virtual bool | isAtLimit (Nice::NPoint &_limit) |
Checks if one of the motors is in limit. More... | |
virtual bool | isAtHome (Nice::BitSet &_atHome) |
This method indicate whether the motor is at the home position. More... | |
virtual void | startExternalProfile (const Nice::Date &_startDate, const Nice::NPoint &_positionSequence, unsigned int _frequency, unsigned int _samplesPerSegment, unsigned int _faultTolerance, Basda::DeviceAsync &_async=Basda::Device::s_async) |
virtual void | changeExternalProfile (const Nice::Date &_date, const Nice::NPoint &_positionSequence) |
virtual void | prepareExternalProfile (const Nice::SeqSeqInt &_segmentsX, const Nice::SeqSeqInt &_segmentsY, Basda::DeviceAsync &_async) |
virtual void | startExternalProfile (Basda::DeviceAsync &_async) |
virtual void | setLinkTimeout (Nice::Time _tcpConnectionTimeout) |
The external profile will be configured and the external profile will uploaded to the MoCon. More... | |
virtual Nice::SeqTime | getLinkTimeout () |
This method returns TCP connection timeout. More... | |
virtual Nice::NPoint | getReferenceTime () |
This method synchronize the MoCon time with the PC time. More... | |
virtual Nice::NPoint | getCurrentTime () |
This method returns the current MoCon time. More... | |
virtual Nice::SeqBitSet | getPositionSwitchStatus () |
The external profile will be configured and the external profile will uploaded to the MoCon. More... | |
virtual void | dumpStatusInformation (Basda::DeviceAsync &_asynch, bool _compareParameter=false) |
virtual Nice::Completion | getProgress () |
virtual void | checkMotionError () |
virtual void | setCollision (Nice::SeqPoint _collisions) |
MoccaPiNDevice (const Nice::JointPtr &_config) | |
Constructor. More... | |
virtual | ~MoccaPiNDevice () |
Destructor. More... | |
virtual void | open () |
This method might be called when the service goes in the INIT state. More... | |
virtual void | close () |
This method might be called when the service goes in the OFFLINE state. More... | |
virtual void | reset (DeviceAsync &_asynch=s_async) |
This method might be called when the service will be reseted. More... | |
virtual void | version () |
This method returns the version string of the device. More... | |
virtual void | init (DeviceAsync &=s_async) |
This method initialize the device and set the state to INIT. More... | |
virtual void | deinit (DeviceAsync &=s_async) |
This method deinitialize the device and set the state to OFFLINE. More... | |
virtual void | activate (DeviceAsync &=s_async) |
activate something More... | |
virtual void | deactivate (DeviceAsync &=s_async) |
deactivate something More... | |
virtual void | chat (std::string _commandID, std::string _cardNo, std::string _moduleNo, std::string _selectID, std::string _parameter, std::string _numberOfLines, DeviceAsync &=s_async) |
This method send the command string to the electronic. More... | |
virtual std::string | dontParse (DeviceAsync &=s_async) |
This method was requested by Lorenzo Busoni (lbuso 02.03.2012) ni@a rcetr i.as tro.i tMore... | |
virtual std::string | receiveDataRaw (std::string _commandID, std::string _cardNo, std::string _moduleNo, std::string _numberOfLines, DeviceAsync &=s_async) |
This method was requested by Lorenzo Busoni (lbuso 02.03.2012) ni@a rcetr i.as tro.i tMore... | |
virtual bool | isReachable () |
virtual void | prepareMoveSync (Nice::BitSet _motors) |
virtual void | startMoveSync () |
void | prepareDirectMove (const Nice::NPoint &_acceleration, const Nice::NPoint &_velocity, const Nice::NPoint &_deceleration) |
This method setup the acceleration anv velocity for a direct point to point move. More... | |
virtual void | moveToHome (Basda::DeviceAsync &=Basda::Device::s_async) |
All motors of the device are looking for the reference positions and reset the step counter to zero. More... | |
virtual void | moveToHomeStart (Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | moveToHomeWait (Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | moveToHomeSingle (int _motor, DeviceAsync &=s_async) |
virtual void | moveToHomeSingleStart (int _motor, DeviceAsync &=s_async) |
virtual void | moveToHomeSingleWait (DeviceAsync &=s_async) |
virtual void | moveToPositiveLimit (Basda::DeviceAsync &=Basda::Device::s_async) |
All motors of the device move to the positive software limit switch. More... | |
virtual void | moveToPositiveLimitStart (Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | moveToPositiveLimitWait (Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | moveToNegativeLimit (Basda::DeviceAsync &=Basda::Device::s_async) |
All motors of the device move to the negative software limit switch. More... | |
virtual void | moveToNegativeLimitStart (Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | moveToNegativeLimitWait (Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | moveToLimit (const Nice::NPoint &_limit, Basda::DeviceAsync &=Basda::Device::s_async) |
move all motors to the positive limit switches (_limits[i]>0) or negative (_limits[i]<0) limit switches. More... | |
virtual void | moveToLimitStart (const Nice::NPoint &_limit, Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | moveToLimitWait (Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | moveAbsolute (const Nice::NPoint &_positions, Basda::DeviceAsync &=Basda::Device::s_async) |
The motors that are stored in the vector, move to the absolute position. More... | |
virtual void | moveAbsoluteStart (const Nice::NPoint &_positions, Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | moveAbsoluteWait (Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | moveRelative (const Nice::NPoint &_positions, Basda::DeviceAsync &=Basda::Device::s_async) |
The motors that are stored in the vector move to the relative position. More... | |
virtual void | moveRelativeStart (const Nice::NPoint &_positions, Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | moveRelativeWait (Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | stop () |
This method stops the motor with a deceleration. More... | |
virtual void | abort () |
Abort the moving of the motor immediately without deceleration. More... | |
virtual Nice::NPoint | getPosition () |
Returns the current positions of all motors. More... | |
virtual Nice::NPoint | getDeviceEncoderPosition () |
Returns the current device internal position encoder of all motors. More... | |
virtual Nice::NPoint | getAbsoluteEncoderPosition () |
Returns the current absolute encoder positions of all motors. More... | |
virtual Nice::NPoint | getIncrementalEncoderPosition () |
Returns the current incremental encoder positions of all motors. More... | |
virtual void | setPosition (const Nice::NPoint &_position) |
Change the absolute position of all motors. More... | |
virtual Nice::NPoint | getVelocity () |
Returns the current velocity of all motors. More... | |
virtual Nice::SeqSeqDouble | getBasicSettings () |
Returns the basic settings of all motors. More... | |
virtual void | setVelocitySetting (const Nice::NPoint &_velocity) |
Set the velocity configuration parameter of all motors. More... | |
virtual void | setAccelerationSetting (const Nice::NPoint &_acceleration) |
Set the acceleration configuration parameter of all motors. More... | |
virtual void | setDecelerationSetting (const Nice::NPoint &_deceleration) |
Set the deceleration configuration parameter of all motors. More... | |
virtual void | setJerkSetting (const Nice::NPoint &_jerk) |
Set the jerk configuration parameter of all motors. More... | |
virtual bool | isMoving (Nice::BitSet &_motion) |
Checks if one of the motors is in motion. More... | |
virtual bool | isAtLimit (Nice::NPoint &_limit) |
Checks if one of the motors is in limit. More... | |
virtual bool | isAtHome (Nice::BitSet &_atHome) |
This method indicate whether the motor is at the home position. More... | |
virtual void | startExternalProfile (const Nice::Date &_startDate, const Nice::NPoint &_positionSequence, unsigned int _frequency, unsigned int _samplesPerSegment, unsigned int _faultTolerance, Basda::DeviceAsync &_async=Basda::Device::s_async) |
virtual void | changeExternalProfile (const Nice::Date &_date, const Nice::NPoint &_positionSequence) |
virtual void | prepareExternalProfile (const Nice::SeqSeqInt &_segmentsX, const Nice::SeqSeqInt &_segmentsY, Basda::DeviceAsync &_async) |
virtual void | startExternalProfile (Basda::DeviceAsync &_async) |
virtual void | setLinkTimeout (Nice::Time _tcpConnectionTimeout) |
The external profile will be configured and the external profile will uploaded to the MoCon. More... | |
virtual Nice::SeqTime | getLinkTimeout () |
This method returns TCP connection timeout. More... | |
virtual Nice::NPoint | getReferenceTime () |
This method synchronize the MoCon time with the PC time. More... | |
virtual Nice::NPoint | getCurrentTime () |
This method returns the current MoCon time. More... | |
virtual Nice::SeqBitSet | getPositionSwitchStatus () |
The external profile will be configured and the external profile will uploaded to the MoCon. More... | |
virtual void | dumpStatusInformation (Basda::DeviceAsync &_asynch, bool _compareParameter=false) |
virtual Nice::Completion | getProgress () |
virtual void | checkMotionError () |
virtual void | setCollision (Nice::SeqPoint _collisions) |
![]() | |
MoccaNDevice (const Nice::JointPtr &_config) | |
Constructor. More... | |
virtual | ~MoccaNDevice () |
Constructor. More... | |
MoccaNDevice (const Nice::JointPtr &_config) | |
Constructor. More... | |
virtual | ~MoccaNDevice () |
Constructor. More... | |
MoccaNDevice (const Nice::JointPtr &_config) | |
Constructor. More... | |
virtual | ~MoccaNDevice () |
Constructor. More... | |
![]() | |
MoccaDevice (const Nice::JointPtr &_config) | |
Constructor. More... | |
virtual | ~MoccaDevice () |
MoccaDevice (const Nice::JointPtr &_config) | |
Constructor. More... | |
virtual | ~MoccaDevice () |
MoccaDevice (const Nice::JointPtr &_config) | |
Constructor. More... | |
virtual | ~MoccaDevice () |
![]() | |
Device (const Nice::JointPtr &_config) | |
constructor. This is an elementary (lazy) action which stores the name and gets configuration. More... | |
virtual | ~Device () |
destructor Does nothing More... | |
virtual void | setConfig (const Nice::JointPtr &_config) |
init with config tree ptr More... | |
Nice::JointPtr & | config () |
retrieve the property tree More... | |
std::string & | name () |
retrieve the name set at ctor time. More... | |
Device (const Nice::JointPtr &_config) | |
constructor. This is an elementary (lazy) action which stores the name and gets configuration. More... | |
virtual | ~Device () |
destructor Does nothing More... | |
virtual void | setConfig (const Nice::JointPtr &_config) |
init with config tree ptr More... | |
Nice::JointPtr & | config () |
retrieve the property tree More... | |
std::string & | name () |
retrieve the name set at ctor time. More... | |
Private Member Functions | |
void | completion (std::string _cmd, const Nice::NPoint &_targetPositions, Basda::DeviceAsync &_asynch) |
Calculate the completion percent. More... | |
bool | isMotionComplete (Nice::BitSet &_motion) |
Checks if the motion is complete. More... | |
void | checkPowerdOnFor60Sec () |
void | Check4Error (int) |
void | read (const char *, Nice::SeqString &) |
template<typename Type > | |
void | read (const char *, std::vector< Type > &) |
template<typename Type > | |
void | read (const char *, const char *, Type &) |
template<typename Type > | |
void | exec (const char *, const Type &) |
template<typename Type > | |
void | exec (const char *, const std::vector< Type > &) |
bool | waitOnTarget (double maxdist, Basda::DeviceAsync &_asynch) |
const char * | pi_listOfAxisIds () |
const char * | pi_position () |
const char * | pi_velocity () |
const char * | pi_servoState () |
const char * | pi_negLimit () |
const char * | pi_posLimit () |
const char * | pi_moveAbs () |
const char * | pi_moveRel () |
const char * | pi_onTarget () |
const char * | pi_stopMovement () |
const char * | cfg_root () |
const char * | cfg_connectstring () |
void | setIsReachable (const bool _isReachable) |
void | completion (std::string _cmd, const Nice::NPoint &_targetPositions, Basda::DeviceAsync &_asynch) |
Calculate the completion percent. More... | |
bool | isMotionComplete (Nice::BitSet &_motion) |
Checks if the motion is complete. More... | |
void | checkPowerdOnFor60Sec () |
void | Check4Error (int) |
void | read (const char *, Nice::SeqString &) |
template<typename Type > | |
void | read (const char *, std::vector< Type > &) |
template<typename Type > | |
void | read (const char *, const char *, Type &) |
template<typename Type > | |
void | exec (const char *, const Type &) |
template<typename Type > | |
void | exec (const char *, const std::vector< Type > &) |
bool | waitOnTarget (double maxdist, Basda::DeviceAsync &_asynch) |
const char * | pi_listOfAxisIds () |
const char * | pi_position () |
const char * | pi_velocity () |
const char * | pi_servoState () |
const char * | pi_negLimit () |
const char * | pi_posLimit () |
const char * | pi_moveAbs () |
const char * | pi_moveRel () |
const char * | pi_onTarget () |
const char * | pi_stopMovement () |
const char * | cfg_root () |
const char * | cfg_connectstring () |
void | setIsReachable (const bool _isReachable) |
Basda::MoccaPiNDevice::MoccaPiNDevice | ( | const Nice::JointPtr & | _config | ) |
Constructor.
The constructor gets the root node of the device as parameter like SVC.DEV.THE_DEVICE and creates a user defined motor controller device. Thereby a motor object is generated for each founded module in the property tree. The generated motor object reserves the motor to avoid a multiple access from other clients. The corresponding card object will also be generated and stored in a list.
_config | the root node of the device which contain all modules |
|
virtual |
Destructor.
removes all created bridges
Basda::MoccaPiNDevice::MoccaPiNDevice | ( | const Nice::JointPtr & | _config | ) |
Constructor.
The constructor gets the root node of the device as parameter like SVC.DEV.THE_DEVICE and creates a user defined motor controller device. Thereby a motor object is generated for each founded module in the property tree. The generated motor object reserves the motor to avoid a multiple access from other clients. The corresponding card object will also be generated and stored in a list.
_config | the root node of the device which contain all modules |
|
virtual |
Destructor.
removes all created bridges
|
virtual |
Abort the moving of the motor immediately without deceleration.
Implements Basda::MoccaDevice.
|
virtual |
Abort the moving of the motor immediately without deceleration.
Implements Basda::MoccaDevice.
|
virtual |
activate something
_asynch | the call back object |
Implements Basda::Device.
|
virtual |
activate something
_asynch | the call back object |
Implements Basda::Device.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
This method send the command string to the electronic.
This method is set to public due to requests from Lorenzo Busoni. BUT THE USER OF THIS METHOD TAKE OVER THE RESPONSIBILITY OF THE CORRECT ERROR HANDLING. THE DRIVER DOES NOT HAVE THE CONTROL OVER THAT DEVICE ANY MORE.
_commandID | the command ID |
_cardNo | the ID of the MPIA electronic card |
_moduleNo | the ID of the device module |
_selectID | the sub command ID |
_parameter | the parameter as string |
_numberOfLines | the number of lines that might be read |
Hi Martin,
that's exactly what I was thinking: The use case is (real example from our experience): we discover at the telescope that we need to continuously monitor a given property (PropA) of the MoCon (obviously because of a malfunctioning in the hardware!). Without this monitor, we will be stuck. You can add the required functionality in the Mocca adding the function getPropA: this requires 4 hours and the day is lost. The day after you are stuck because you discover that you miss PropB, and the day is lost again. As an alternative, one can add the 2 lines below in the code (with a comment: "1 10 0 = getPropA") and this requires 5 minutes. The day after one can add a similar line with 1 11 0. When you're back in Europe you implement getPropA and getPropB in Mocca and you cleanup the code removing the receiveResponseForComment
Generally speaking I think it is a safe idea to have a generic interface to access EVERY possible functionality of a device, because soon or later you'll need it. In the case of the Mocon it is quite easy, a good compromise between living dangerously and wasting too much time in the effort of a complete implementation of all the MoCon commands.
Lorenzo Busoni
Implements Basda::MoccaNDevice.
|
virtual |
This method send the command string to the electronic.
This method is set to public due to requests from Lorenzo Busoni. BUT THE USER OF THIS METHOD TAKE OVER THE RESPONSIBILITY OF THE CORRECT ERROR HANDLING. THE DRIVER DOES NOT HAVE THE CONTROL OVER THAT DEVICE ANY MORE.
_commandID | the command ID |
_cardNo | the ID of the MPIA electronic card |
_moduleNo | the ID of the device module |
_selectID | the sub command ID |
_parameter | the parameter as string |
_numberOfLines | the number of lines that might be read |
Hi Martin,
that's exactly what I was thinking: The use case is (real example from our experience): we discover at the telescope that we need to continuously monitor a given property (PropA) of the MoCon (obviously because of a malfunctioning in the hardware!). Without this monitor, we will be stuck. You can add the required functionality in the Mocca adding the function getPropA: this requires 4 hours and the day is lost. The day after you are stuck because you discover that you miss PropB, and the day is lost again. As an alternative, one can add the 2 lines below in the code (with a comment: "1 10 0 = getPropA") and this requires 5 minutes. The day after one can add a similar line with 1 11 0. When you're back in Europe you implement getPropA and getPropB in Mocca and you cleanup the code removing the receiveResponseForComment
Generally speaking I think it is a safe idea to have a generic interface to access EVERY possible functionality of a device, because soon or later you'll need it. In the case of the Mocon it is quite easy, a good compromise between living dangerously and wasting too much time in the effort of a complete implementation of all the MoCon commands.
Lorenzo Busoni
Implements Basda::MoccaNDevice.
|
private |
|
private |
|
virtual |
|
virtual |
|
private |
|
private |
|
virtual |
This method might be called when the service goes in the OFFLINE state.
The connection to the modules will be closed.
Implements Basda::Device.
|
virtual |
This method might be called when the service goes in the OFFLINE state.
The connection to the modules will be closed.
Implements Basda::Device.
|
private |
Calculate the completion percent.
_cmd | the command name which appears in the completion bar |
_asynch | the call back object |
|
private |
Calculate the completion percent.
_cmd | the command name which appears in the completion bar |
_asynch | the call back object |
|
virtual |
deactivate something
_asynch | the call back object |
Implements Basda::Device.
|
virtual |
deactivate something
_asynch | the call back object |
Implements Basda::Device.
|
virtual |
This method deinitialize the device and set the state to OFFLINE.
_asynch | the call back object |
Implements Basda::Device.
|
virtual |
This method deinitialize the device and set the state to OFFLINE.
_asynch | the call back object |
Implements Basda::Device.
|
virtual |
This method was requested by Lorenzo Busoni (lbuso 02.03.2012) ni@a rcetr i.as tro.i t
It supports a direct communication with the MoCon. BUT THE USER OF THIS METHOD TAKE OVER THE RESPONSIBILITY OF THE CORRECT ERROR HANDLING. THE DRIVER DOES NOT HAVE THE CONTROL OVER THAT DEVICE ANY MORE.
_ret | the allocated memory for the command response |
Implements Basda::MoccaNDevice.
|
virtual |
This method was requested by Lorenzo Busoni (lbuso 02.03.2012) ni@a rcetr i.as tro.i t
It supports a direct communication with the MoCon. BUT THE USER OF THIS METHOD TAKE OVER THE RESPONSIBILITY OF THE CORRECT ERROR HANDLING. THE DRIVER DOES NOT HAVE THE CONTROL OVER THAT DEVICE ANY MORE.
_ret | the allocated memory for the command response |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
private |
|
private |
|
private |
|
virtual |
Returns the current absolute encoder positions of all motors.
The current position of all motors might be stored in the property
Implements Basda::MoccaNDevice.
|
virtual |
Returns the current absolute encoder positions of all motors.
The current position of all motors might be stored in the property
Implements Basda::MoccaNDevice.
|
virtual |
Returns the basic settings of all motors.
Depending of the implementation the basic settings could be: motion profile, revolution, velocity, acceleration, deceleration and jerk. Each basic settings is stored in a sequence.
Implements Basda::MoccaNDevice.
|
virtual |
Returns the basic settings of all motors.
Depending of the implementation the basic settings could be: motion profile, revolution, velocity, acceleration, deceleration and jerk. Each basic settings is stored in a sequence.
Implements Basda::MoccaNDevice.
|
virtual |
This method returns the current MoCon time.
For each motor, that name is stored in the vector, the current MoCon cycles and the PC time will be stored.
Implements Basda::MoccaNDevice.
|
virtual |
This method returns the current MoCon time.
For each motor, that name is stored in the vector, the current MoCon cycles and the PC time will be stored.
Implements Basda::MoccaNDevice.
|
virtual |
Returns the current device internal position encoder of all motors.
Some devices, like the MoCon, have an internal software encoder/position counter, which is independent from the incremental and absolute encoder.
Implements Basda::MoccaNDevice.
|
virtual |
Returns the current device internal position encoder of all motors.
Some devices, like the MoCon, have an internal software encoder/position counter, which is independent from the incremental and absolute encoder.
Implements Basda::MoccaNDevice.
|
virtual |
Returns the current incremental encoder positions of all motors.
The current position of all motors might be stored in the property
Implements Basda::MoccaNDevice.
|
virtual |
Returns the current incremental encoder positions of all motors.
The current position of all motors might be stored in the property
Implements Basda::MoccaNDevice.
|
virtual |
This method returns TCP connection timeout.
For each motor, that name is stored in the vector, the TCP connection timeout will be stored.
Implements Basda::MoccaNDevice.
|
virtual |
This method returns TCP connection timeout.
For each motor, that name is stored in the vector, the TCP connection timeout will be stored.
Implements Basda::MoccaNDevice.
|
virtual |
Returns the current positions of all motors.
The current position of all motors will be stored in the property
Implements Basda::MoccaNDevice.
|
virtual |
Returns the current positions of all motors.
The current position of all motors will be stored in the property
Implements Basda::MoccaNDevice.
|
virtual |
The external profile will be configured and the external profile will uploaded to the MoCon.
_positionSequence | a vector with the profile for each motor |
_timeResolution | segmentLength / samplesPerSegment |
_samplesPerSegment | samples per segment |
_maxError | the maximal error that the external profile can have after the conversion to a MoCon profile |
_asynch | the call back object This method starts the external profile at a certain data. |
The external profile can be stopped with the stop method.
_date | a vector with the start date of all motors. The order of the dates is corresponding to the order of the motor names in the property tree (alphabetical). Use the constant Basda::STAY if the motor should move. |
_asynch | the call back object |
Implements Basda::MoccaNDevice.
|
virtual |
The external profile will be configured and the external profile will uploaded to the MoCon.
_positionSequence | a vector with the profile for each motor |
_timeResolution | segmentLength / samplesPerSegment |
_samplesPerSegment | samples per segment |
_maxError | the maximal error that the external profile can have after the conversion to a MoCon profile |
_asynch | the call back object This method starts the external profile at a certain data. |
The external profile can be stopped with the stop method.
_date | a vector with the start date of all motors. The order of the dates is corresponding to the order of the motor names in the property tree (alphabetical). Use the constant Basda::STAY if the motor should move. |
_asynch | the call back object |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
This method synchronize the MoCon time with the PC time.
For each motor, that name is stored in the vector, the current MoCon cycles and the PC time will be stored.
Implements Basda::MoccaNDevice.
|
virtual |
This method synchronize the MoCon time with the PC time.
For each motor, that name is stored in the vector, the current MoCon cycles and the PC time will be stored.
Implements Basda::MoccaNDevice.
|
virtual |
Returns the current velocity of all motors.
The current velocity of all motors will be stored in the property
Implements Basda::MoccaNDevice.
|
virtual |
Returns the current velocity of all motors.
The current velocity of all motors will be stored in the property
Implements Basda::MoccaNDevice.
|
virtual |
This method initialize the device and set the state to INIT.
_asynch | the call back object |
Implements Basda::Device.
|
virtual |
This method initialize the device and set the state to INIT.
_asynch | the call back object |
Implements Basda::Device.
|
virtual |
This method indicate whether the motor is at the home position.
_atHome | each flag in that Bitset indicate whether the motor is at home (true - motor is at home;). The order of the bits is corresponding to the order of the motor names in the property tree (alphabetical). |
Implements Basda::MoccaNDevice.
|
virtual |
This method indicate whether the motor is at the home position.
_atHome | each flag in that Bitset indicate whether the motor is at home (true - motor is at home;). The order of the bits is corresponding to the order of the motor names in the property tree (alphabetical). |
Implements Basda::MoccaNDevice.
|
virtual |
Checks if one of the motors is in limit.
This method collects the limit flags of all motors and stores it in the property:
_limit | - return a vector with all motor limit switch flags (0 - not in limit; +/-1 in software limit; +/-2 in hardware limit) |
Implements Basda::MoccaNDevice.
|
virtual |
Checks if one of the motors is in limit.
This method collects the limit flags of all motors and stores it in the property:
_limit | - return a vector with all motor limit switch flags (0 - not in limit; +/-1 in software limit; +/-2 in hardware limit) |
Implements Basda::MoccaNDevice.
|
private |
Checks if the motion is complete.
This method collect the MOTION_COMPLETE flags of all motors.
The following property will indicate the motion completeness
_motion | returns which motor is in motion |
|
private |
Checks if the motion is complete.
This method collect the MOTION_COMPLETE flags of all motors.
The following property will indicate the motion completeness
_motion | returns which motor is in motion |
|
virtual |
Checks if one of the motors is in motion.
The method collects the motion flag of every motor and stores it in the property
_motion | returns which motor is in motion |
Implements Basda::MoccaNDevice.
|
virtual |
Checks if one of the motors is in motion.
The method collects the motion flag of every motor and stores it in the property
_motion | returns which motor is in motion |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
The motors that are stored in the vector, move to the absolute position.
_positions | are the target positions of type Nice::NPoint whereas the order of the points is corresponding to the order of the motor names in the property tree (alphabetical). |
_asynch | the call back object |
Implements Basda::MoccaNDevice.
|
virtual |
The motors that are stored in the vector, move to the absolute position.
_positions | are the target positions of type Nice::NPoint whereas the order of the points is corresponding to the order of the motor names in the property tree (alphabetical). |
_asynch | the call back object |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
The motors that are stored in the vector move to the relative position.
_positions | are the target positions of type Nice::NPoint whereas the order of the points is corresponding to the order of the motor names in the property tree (alphabetical). |
_asynch | the call back object |
Implements Basda::MoccaNDevice.
|
virtual |
The motors that are stored in the vector move to the relative position.
_positions | are the target positions of type Nice::NPoint whereas the order of the points is corresponding to the order of the motor names in the property tree (alphabetical). |
_asynch | the call back object |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
All motors of the device are looking for the reference positions and reset the step counter to zero.
_asynch | the call back object |
Implements Basda::MoccaDevice.
|
virtual |
All motors of the device are looking for the reference positions and reset the step counter to zero.
_asynch | the call back object |
Implements Basda::MoccaDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
move all motors 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). |
_asynch | the call back object |
The current limit switch state of all motors.
Implements Basda::MoccaDevice.
|
virtual |
move all motors 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). |
_asynch | the call back object |
The current limit switch state of all motors.
Implements Basda::MoccaDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
All motors of the device move to the negative software limit switch.
The idea of this method is that the motors move to the negative software limit switch.
_asynch | the call back object |
Implements Basda::MoccaDevice.
|
virtual |
All motors of the device move to the negative software limit switch.
The idea of this method is that the motors move to the negative software limit switch.
_asynch | the call back object |
Implements Basda::MoccaDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
All motors of the device move to the positive software limit switch.
The idea of this method is that the motors move to the positive software limit switch.
_asynch | the call back object |
Implements Basda::MoccaDevice.
|
virtual |
All motors of the device move to the positive software limit switch.
The idea of this method is that the motors move to the positive software limit switch.
_asynch | the call back object |
Implements Basda::MoccaDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
Implements Basda::MoccaDevice.
|
virtual |
This method might be called when the service goes in the INIT state.
It connects to all motor controller.
Implements Basda::Device.
|
virtual |
This method might be called when the service goes in the INIT state.
It connects to all motor controller.
Implements Basda::Device.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
virtual |
This method setup the acceleration anv velocity for a direct point to point move.
_acceleration | |
_velocity | |
_deceleration |
Implements Basda::MoccaNDevice.
|
virtual |
This method setup the acceleration anv velocity for a direct point to point move.
_acceleration | |
_velocity | |
_deceleration |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
virtual |
This method was requested by Lorenzo Busoni (lbuso 02.03.2012) ni@a rcetr i.as tro.i t
It supports a direct communication with the MoCon without to parse the response. BUT THE USER OF THIS METHOD TAKE OVER THE RESPONSIBILITY OF THE CORRECT ERROR HANDLING. THE DRIVER DOES NOT HAVE THE CONTROL OVER THAT DEVICE ANY MORE.
_commandID | the command ID which is defined in the CommandIDs.h |
_cardNo | the card number |
_moduleNo | the module number |
_ret | the allocated space for the returned data |
_numberOfLines | optional: This parameter imitates how many data should be read from the Ethernet buffer. All data are read if the value is -1. |
Implements Basda::MoccaNDevice.
|
virtual |
This method was requested by Lorenzo Busoni (lbuso 02.03.2012) ni@a rcetr i.as tro.i t
It supports a direct communication with the MoCon without to parse the response. BUT THE USER OF THIS METHOD TAKE OVER THE RESPONSIBILITY OF THE CORRECT ERROR HANDLING. THE DRIVER DOES NOT HAVE THE CONTROL OVER THAT DEVICE ANY MORE.
_commandID | the command ID which is defined in the CommandIDs.h |
_cardNo | the card number |
_moduleNo | the module number |
_ret | the allocated space for the returned data |
_numberOfLines | optional: This parameter imitates how many data should be read from the Ethernet buffer. All data are read if the value is -1. |
Implements Basda::MoccaNDevice.
|
virtual |
This method might be called when the service will be reseted.
The connection to the modules will be closed and opened again.
_asynch | the call back object |
Implements Basda::Device.
|
virtual |
This method might be called when the service will be reseted.
The connection to the modules will be closed and opened again.
_asynch | the call back object |
Implements Basda::Device.
|
virtual |
Set the acceleration configuration parameter of all motors.
_acceleration | a vector with the acceleration of all motors. The order of the accelerations is corresponding to the order of the motor names in the property tree (alphabetical). |
Implements Basda::MoccaNDevice.
|
virtual |
Set the acceleration configuration parameter of all motors.
_acceleration | a vector with the acceleration of all motors. The order of the accelerations is corresponding to the order of the motor names in the property tree (alphabetical). |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
Set the deceleration configuration parameter of all motors.
_deceleration | a vector with the deceleration of all motors. The order of the decelerations is corresponding to the order of the motor names in the property tree (alphabetical). |
Implements Basda::MoccaNDevice.
|
virtual |
Set the deceleration configuration parameter of all motors.
_deceleration | a vector with the deceleration of all motors. The order of the decelerations is corresponding to the order of the motor names in the property tree (alphabetical). |
Implements Basda::MoccaNDevice.
|
virtual |
Set the jerk configuration parameter of all motors.
_jerk | a vector with the jerk of all motors. The order of the jerks is corresponding to the order of the motor names in the property tree (alphabetical). |
Implements Basda::MoccaNDevice.
|
virtual |
Set the jerk configuration parameter of all motors.
_jerk | a vector with the jerk of all motors. The order of the jerks is corresponding to the order of the motor names in the property tree (alphabetical). |
Implements Basda::MoccaNDevice.
|
virtual |
The external profile will be configured and the external profile will uploaded to the MoCon.
_positionSequence | a vector with the profile for each motor |
_timeResolution | segmentLength / samplesPerSegment |
_samplesPerSegment | samples per segment |
_faultTolerance | the maximal error that the external profile can have after the conversion to a MoCon profile |
_asynch | the call back object This method starts the external profile at a certain data. |
The external profile can be stopped with the stop method.
_date | a vector with the start date of all motors. The order of the dates is corresponding to the order of the motor names in the property tree (alphabetical). Use the constant Basda::STAY if the motor should move. |
_asynch | the call back object |
Implements Basda::MoccaNDevice.
|
virtual |
The external profile will be configured and the external profile will uploaded to the MoCon.
_positionSequence | a vector with the profile for each motor |
_timeResolution | segmentLength / samplesPerSegment |
_samplesPerSegment | samples per segment |
_faultTolerance | the maximal error that the external profile can have after the conversion to a MoCon profile |
_asynch | the call back object This method starts the external profile at a certain data. |
The external profile can be stopped with the stop method.
_date | a vector with the start date of all motors. The order of the dates is corresponding to the order of the motor names in the property tree (alphabetical). Use the constant Basda::STAY if the motor should move. |
_asynch | the call back object |
Implements Basda::MoccaNDevice.
|
virtual |
Change the absolute position of all motors.
The motor will not move, only the absolute position will be set.
_position | a vector with the position of all motors |
Implements Basda::MoccaNDevice.
|
virtual |
Change the absolute position of all motors.
The motor will not move, only the absolute position will be set.
_position | a vector with the position of all motors |
Implements Basda::MoccaNDevice.
|
virtual |
Set the velocity configuration parameter of all motors.
_velocity | a vector with the velocity of all motors. The order of the velocities is corresponding to the order of the motor names in the property tree (alphabetical). |
Implements Basda::MoccaNDevice.
|
virtual |
Set the velocity configuration parameter of all motors.
_velocity | a vector with the velocity of all motors. The order of the velocities is corresponding to the order of the motor names in the property tree (alphabetical). |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
Implements Basda::MoccaNDevice.
|
virtual |
This method stops the motor with a deceleration.
Implements Basda::MoccaDevice.
|
virtual |
This method stops the motor with a deceleration.
Implements Basda::MoccaDevice.
|
virtual |
This method returns the version string of the device.
Implements Basda::Device.
|
virtual |
This method returns the version string of the device.
Implements Basda::Device.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |