Skip to content

Commit

Permalink
Fixed time base issue in multi axis PVT profile move
Browse files Browse the repository at this point in the history
  • Loading branch information
motorapp authored and motorapp committed Jul 5, 2016
1 parent 57bb032 commit efdc400
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions 3-3/GalilSup/src/GalilController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@
// 29/06/16 M.Clift
// Fixed issue in programUpload method
// Limit update period to 200ms maximum
// 05/07/16 M.Clift
// Fixed time base issue in multi axis PVT profile move

#include <stdio.h>
#include <math.h>
Expand Down Expand Up @@ -1563,7 +1565,7 @@ asynStatus GalilController::buildProfileFile()
else
{
//PVT mode
sprintf(moves, "%s%.0lf,%.0lf,%.0lf\n", moves, rint(incmove), velocity[j], rint(profileTimes_[i]*1000.0));
sprintf(moves, "%s%lf %.0lf,%.0lf,%.0lf\n", moves, profileTimes_[i], rint(incmove), velocity[j], rint(profileTimes_[i]*1000.0));
//Check timebase is multiple of 2ms
temp_time = profileTimes_[i] * 1000.0;
//PVT has 2 sample minimum
Expand Down Expand Up @@ -1618,7 +1620,7 @@ asynStatus GalilController::buildProfileFile()
{
//Write the segment command to profile file
if (proftype) //PVT
fprintf(profFile,"%lf %s", profileTimes_[i], moves);
fprintf(profFile,"%s", moves);
else //Linear
fprintf(profFile,"%lf %s\n", profileTimes_[i], moves);
}
Expand Down

0 comments on commit efdc400

Please sign in to comment.