From e32f2eec2043c1e778da44f179761382aeb586ec Mon Sep 17 00:00:00 2001 From: MarkRivers Date: Sat, 2 Apr 2011 15:06:54 +0000 Subject: [PATCH] Changes for profile moves --- motorApp/MotorSrc/asynMotorAxis.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/motorApp/MotorSrc/asynMotorAxis.cpp b/motorApp/MotorSrc/asynMotorAxis.cpp index ef17071e..11d07105 100644 --- a/motorApp/MotorSrc/asynMotorAxis.cpp +++ b/motorApp/MotorSrc/asynMotorAxis.cpp @@ -6,6 +6,7 @@ * from which real motor axes are derived. */ #include +#include #include @@ -128,8 +129,18 @@ asynStatus asynMotorAxis::initializeProfile(int maxProfilePoints) return asynSuccess; } -/** Function to build a coordinated move of multiple axes. - * This is not currently implemented, as the API still needs work! */ +/** Function to build a coordinated move of multiple axes. */ +asynStatus asynMotorAxis::defineProfile(double *positions, int numPoints) +{ + // static const char *functionName = "asynMotorController::buildProfile"; + + if (numPoints > pC_->maxProfilePoints_) return asynError; + memcpy(profilePositions_, positions, numPoints*sizeof(double)); + + return asynSuccess; +} + +/** Function to build a coordinated move of multiple axes. */ asynStatus asynMotorAxis::buildProfile() { // static const char *functionName = "asynMotorController::buildProfile"; @@ -137,8 +148,7 @@ asynStatus asynMotorAxis::buildProfile() return asynSuccess; } -/** Function to execute a coordinated move of multiple axes. - * This is not currently implemented, as the API still needs work! */ +/** Function to execute a coordinated move of multiple axes. */ asynStatus asynMotorAxis::executeProfile() { // static const char *functionName = "asynMotorController::executeProfile"; @@ -146,8 +156,7 @@ asynStatus asynMotorAxis::executeProfile() return asynSuccess; } -/** Function to readback the actual motor positions from a coordinated move of multiple axes. - * This is not currently implemented, as the API still needs work! */ +/** Function to readback the actual motor positions from a coordinated move of multiple axes. */ asynStatus asynMotorAxis::readbackProfile() { // static const char *functionName = "asynMotorController::readbackProfile";