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  <20182019  2020  2021  2022  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  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Motor record question
From: Jörn Dreyer <[email protected]>
To: [email protected]
Date: Tue, 24 Jul 2018 07:15:34 +0200
Many thanks for all the hints and tips.
The hint to the XPS driver gave me the information that I was missing.

I did not know how to get the pointer to my controller object knowing only its 
name. findAsynPortDriver is what I was looking for!

Now I can refactor my code using inheritance for common code blocks and a 
separate iocsh function to create the axes that are needed.

Tanks again to Kevin and Mark for the hints!
And yes Mark, you got it right. I guess my description of the problem was not 
detailed enough.

Regards,

Jörn

Am Montag, 23. Juli 2018, 16:50:01 CEST schrieb Kevin Peterson:
> The PIGCS2 support uses this approach.
> 
> CreateGCSController creates an instance of the appropriate class of
> controller based on the controller's version string:
> 
> 
> https://github.com/epics-modules/motor/blob/3683d3f0eaae1b5893cd32615174b646
> cf259581/motorApp/PIGCS2Src/PIGCSController.cpp#L42
> 
> Kevin
> 
> On 07/23/2018 09:29 AM, Mark Rivers wrote:
> > Hi Jörn,
> > 
> > Perhaps what you are asking is if you can define multiple classes:
> > 
> > - Stepper with encoder
> > - Stepper without encoder
> > - Piezo with encoder
> > - Piezo without encoder
> > 
> > I think you should be able to do that using inheritance.  You could create
> > a base axis class that your controller class knows about, but then have
> > the actual axis objects based on derived classes that implement the
> > different types.
> > 
> > Mark




References:
Motor record question Jörn Dreyer
RE: Motor record question Mark Rivers
Re: Motor record question Kevin Peterson

Navigate by Date:
Prev: Re: Motor record question Kevin Peterson
Next: Re: B21 Areadetector [email protected]
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  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Motor record question Kevin Peterson
Next: Re: Motor record question Pearson, Matthew R.
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  <20182019  2020  2021  2022  2023  2024 
ANJ, 24 Jul 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·