39 cout <<
"Epos2 Positions:" << endl;
41 long pos_marker=0,pos_marker_old=0;
54 int experiment_duration = 10, vel = 1000;
62 cout <<
"t0\tpos0\tt1\tpos1"<< endl;
67 telapsed = telapsed - tbase;
72 if (pos_marker != pos_marker_old)
74 telapsed.setFormat(ctf_ms);
76 cout << telapsed <<
"\t" << pos_marker;
79 cout <<
"\t" << telapsed <<
"\t" << pos_marker << endl;
82 pos_marker_old = pos_marker;
85 }
while( telapsed.getTimeInSeconds() < experiment_duration );
91 }
catch(CException &e){
93 cout << e.what() << endl;
void enableMotor(long opmode)
function to facititate transitions from switched on to operation enabled
void setPositionMarker(char polarity=0, char edge_type=0, char mode=0, char digitalIN=2)
Sets the configuration of a marker position.
void setOperationMode(long opmode)
function to set the operation mode
void startVelocity()
function to move the motor in Velocity mode
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.
void stopVelocity()
function to stop the motor in velocity mode
void setTargetVelocity(long velocity)
function to SET the target velocity
long getPositionMarker(int buffer=0)
gets the position marked by the sensor