Hi Zongyang,
What version of the motor record are you using? The current master branch of the motor record does not contain a field called CENE.
https://github.com/epics-modules/motor/blob/master/motorApp/MotorSrc/motorRecord.dbd
Is this something that was locally added to the motor record?
Mark
________________________________
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of yue zongyang via Tech-talk <tech-talk at aps.anl.gov>
Sent: Thursday, August 12, 2021 4:03 AM
To: tech-talk at aps.anl.gov
Subject:
Hi,
I is writing motor device driver based on Model 3.
But I meet some problem which about rewriting WriteInt32 (asynUser *pasynUser, epicsInt32 value) function.
However, I changed the value of $(motor).CENE field in motor OPI, my WriteInt32() function cann’t be called.
And the value of other fields changed can call this function.
My WriteInt32() function is as follow:
------------------------------------------
asynStatus PDICLController::writeInt32(asynUser* pasynUser, epicsInt32 value)
{
int function = pasynUser->reason;
int status = asynSuccess;
PDICLAxis* pAxis;
static const char* functionName = "writeInt32";
pAxis = this->getAxis(pasynUser);
if (!pAxis) return asynError;
status = pAxis->setIntegerParam(function, value);
epicsPrintf("test :104 line :The function name:%d and the value :%d\n",function,value);
if (function == PDICLJoggingPosMethod_)
{
if(value!=0)
{
status = pAxis->Jogging_move_pos();
}
}
if (function == PDICLJoggingNegMethod_)
{
if(value!=0)
{
status = pAxis->Jogging_move_neg();
}
}
else {
// Call base class method
status = asynMotorController::writeInt32(pasynUser, value);
}
pAxis->callParamCallbacks();
return (asynStatus)status;
}
-------------------------
When I change the state of $(motor).CENE field , just the motorUpdateStatus_ function that is called which mark is 26
and the motorClosedLoop_ function cann’t be called which mark is 19.
Mennwhile I test the motorStop_ function which mark is 4.
The test result of the shell of ioc is as follow
-------------------------
epics> test :104 line :The function name:26 and the value :0
test :104 line :The function name:4 and the value :0
test :104 line :The function name:26 and the value :0
test :104 line :The function name:26 and the value :0
-------------------------
I see other motor module’s device driver have done as same.
What’s going wrong about my code?
Any suggestions or comments would be appreciated.
Best regards!
Zongyang yue
- References:
- [no subject] yue zongyang via Tech-talk
- Navigate by Date:
- Prev:
[no subject] yue zongyang via Tech-talk
- Next:
Re: HiPace control via EDU TC 400 Marco A. Barra Montevechi Filho via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
<2021>
2022
2023
2024
- Navigate by Thread:
- Prev:
[no subject] yue zongyang via Tech-talk
- Next:
Re: Mark Rivers via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
<2021>
2022
2023
2024
|