76 cout <<
"\n EPOS2 EXAMPLE" << endl;
84 cout <<
"\n Example : Init\n" << endl;
88 cout <<
"\n Example : Enable Controller\n" << endl;
90 cout <<
"\n Example : GREEN LED blinking (controller enabled)\n" << endl;
93 cout <<
"\n Example : Enable Motor\n" << endl;
95 cout <<
"\n Example : GREEN LED on (motor enabled)\n" << endl;
98 cout <<
"\n Example : Current Position = " << controller.
readPosition() <<
" [qc]" << endl;
101 cout <<
"\n Example : Velocity (500 1/min) during 2 seconds\n" << endl;
111 cout <<
"\n Example : Getting profile\n" << endl;
114 controller.
getProfileData(prof[0],prof[1],prof[2],prof[3],prof[4],prof[5],prof[6]);
117 cout <<
"\n Example : Profile Velocity (500 1/min) during 2 seconds\n" << endl;
124 cout <<
"\n Example : Profile Position (to 0)\n" << endl;
129 cout <<
"\n Example : Closing\n" << endl;
133 cout <<
"\n EPOS2 : GREEN LED blinking\n" << endl;
135 }
catch(std::exception &e){
136 cout << e.what() << endl << endl;
void startProfilePosition(epos_posmodes mode, bool blocking=true, bool wait=true, bool new_point=true)
function to move the motor to a position in profile position mode
void enableMotor(long opmode)
function to facititate transitions from switched on to operation enabled
void getProfileData(long &vel, long &maxvel, long &acc, long &dec, long &qsdec, long &maxacc, long &type)
function to GET all data of the velocity profile
void setVerbose(bool verbose)
void setOperationMode(long opmode)
function to set the operation mode
void setTargetProfileVelocity(long velocity)
[OPMODE=profile_velocity] function to set the velocity
void startVelocity()
function to move the motor in Velocity mode
void stopProfileVelocity()
[OPMODE=profile_velocity] function to stop the motor
void enableController()
function to facititate transitions from the start of the controller to switch it on ...
void close()
Disconnects hardware.
Implementation of a driver for EPOS2 Motor Controller.
void init()
Connects hardware.
int32_t readPosition()
function to read motor position
void stopVelocity()
function to stop the motor in velocity mode
void setTargetVelocity(long velocity)
function to SET the target velocity
void startProfileVelocity()
[OPMODE=profile_velocity] function to move the motor in a velocity
void setTargetProfilePosition(long position)
function to SET the target position