EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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  <20212022  2023  2024  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  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject:
From: yue zongyang via Tech-talk <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 12 Aug 2021 17:03:27 +0800

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


Replies:
Re: Mark Rivers via Tech-talk

Navigate by Date:
Prev: RE: MCA module's Amptek USB driver fails to connect Mark Rivers 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  <20212022  2023  2024 
Navigate by Thread:
Prev: RE: MCA module's Amptek USB driver fails to connect Mark Rivers 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  <20212022  2023  2024 
ANJ, 12 Aug 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·