|
|
|
|
@@ -839,22 +839,22 @@ void ecmcMotionPlg::executeMotionObject() {
|
|
|
|
|
|
|
|
|
|
// protect axis_ if axis object id is changed over asyn
|
|
|
|
|
epicsMutexLock(axisMutex_);
|
|
|
|
|
ecmcAxisStatusType *tempAxisStat = axis_->getDebugInfoDataPointer();
|
|
|
|
|
ecmcAxisDataStatus *tempAxisStat = axis_->getAxisStatusStruct();
|
|
|
|
|
|
|
|
|
|
// Fill the buffers
|
|
|
|
|
actPosBuffer_->addData(tempAxisStat->onChangeData.positionActual);
|
|
|
|
|
setPosBuffer_->addData(tempAxisStat->onChangeData.positionSetpoint);
|
|
|
|
|
diffPosBuffer_->addData(tempAxisStat->onChangeData.positionError);
|
|
|
|
|
enableBuffer_->addData(tempAxisStat->onChangeData.statusWd.enable);
|
|
|
|
|
enabledBuffer_->addData(tempAxisStat->onChangeData.statusWd.enabled);
|
|
|
|
|
busyBuffer_->addData(tempAxisStat->onChangeData.statusWd.busy);
|
|
|
|
|
executeBuffer_->addData(tempAxisStat->onChangeData.statusWd.execute);
|
|
|
|
|
trajSourceBuffer_->addData(tempAxisStat->onChangeData.statusWd.trajsource);
|
|
|
|
|
encSourceBuffer_->addData(tempAxisStat->onChangeData.statusWd.encsource);
|
|
|
|
|
atTargetBuffer_->addData(tempAxisStat->onChangeData.statusWd.attarget);
|
|
|
|
|
errorIdBuffer_->addData(tempAxisStat->onChangeData.error);
|
|
|
|
|
actPosBuffer_->addData(tempAxisStat->currentPositionActual);
|
|
|
|
|
setPosBuffer_->addData(tempAxisStat->currentPositionSetpoint);
|
|
|
|
|
diffPosBuffer_->addData(tempAxisStat->cntrlError);
|
|
|
|
|
enableBuffer_->addData(tempAxisStat->statusWord_.enable);
|
|
|
|
|
enabledBuffer_->addData(tempAxisStat->statusWord_.enabled);
|
|
|
|
|
busyBuffer_->addData(tempAxisStat->statusWord_.busy);
|
|
|
|
|
executeBuffer_->addData(tempAxisStat->statusWord_.execute);
|
|
|
|
|
trajSourceBuffer_->addData(tempAxisStat->statusWord_.trajsource);
|
|
|
|
|
encSourceBuffer_->addData(tempAxisStat->statusWord_.encsource);
|
|
|
|
|
atTargetBuffer_->addData(tempAxisStat->statusWord_.attarget);
|
|
|
|
|
errorIdBuffer_->addData(tempAxisStat->errorCode);
|
|
|
|
|
|
|
|
|
|
epicsInt32 *temp=(epicsInt32*)&(tempAxisStat->onChangeData.statusWd); // A bit nasty
|
|
|
|
|
epicsInt32 *temp=(epicsInt32*)&(tempAxisStat->statusWord_); // A bit nasty
|
|
|
|
|
statusWdBuffer_->addData(*temp);
|
|
|
|
|
|
|
|
|
|
xTime_+=xdt_;
|
|
|
|
|
@@ -870,24 +870,6 @@ void ecmcMotionPlg::executeMotionObject() {
|
|
|
|
|
epicsMutexUnlock(axisMutex_);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//void ecmcMotionPlg::setModeFFT(FFT_MODE mode) {
|
|
|
|
|
// cfgMode_ = mode;
|
|
|
|
|
// setIntegerParam(asynFFTModeId_,(epicsInt32)mode);
|
|
|
|
|
//}
|
|
|
|
|
//
|
|
|
|
|
//FFT_STATUS ecmcMotionPlg::getStatusFFT() {
|
|
|
|
|
// return status_;
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
//void ecmcMotionPlg::updateStatus(FFT_STATUS status) {
|
|
|
|
|
// status_ = status;
|
|
|
|
|
// setIntegerParam(asynFFTStatId_,(epicsInt32) status);
|
|
|
|
|
//
|
|
|
|
|
// setIntegerParam(asynElementsInBuffer_, (epicsInt32)elementsInBuffer_);
|
|
|
|
|
//
|
|
|
|
|
// callParamCallbacks();
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
asynStatus ecmcMotionPlg::writeInt32(asynUser *pasynUser, epicsInt32 value) {
|
|
|
|
|
int function = pasynUser->reason;
|
|
|
|
|
if( function == asynEnableId_ ) {
|
|
|
|
|
|