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  <20192020  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  2018  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Multi-axis sequenced move using asynMotor pseudo axis
From: "Pearson, Matthew R. via Tech-talk" <[email protected]>
To: David Vine <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Fri, 8 Mar 2019 18:38:44 +0000
Hi David,

The asyn motor driver functions are really designed to work within the scope of one controller. If all the axes were on one controller then I suppose it could be done within the axis::home() function, but then you’re turning a general purpose motor driver into an application specific driver. I’m not sure how it would work across multiple controllers, unless you created a new asyn driver that connected to each of the asyn ports for each controller, and a special homing function that dealt with the required logic. 

Using the database or SNL method would be a much easier approach. For the SNL approach you needn't have to have many states, just a ‘Idle’ and ‘Run’ state (and possibly an ‘Error’ state), with everything happening in the ‘Run’ state. Although, it would work better to have more states, such as ‘PreMove’ (that moves XYZ all in one go) and a ‘PostMove’ (moves XYZ back).

Cheers,
Matt


> On Mar 8, 2019, at 1:04 PM, David Vine via Tech-talk <[email protected]> wrote:
> 
> Thanks Matthew and Kevin for your input, much appreciated.
> 
> I find the database implementation difficult to read and maintain. The SNL is more readable but there's a lot of boilerplate in setting up the states and connecting to PVs. 
> 
> Implementing the logic from within asynMotor has the following advantages:
> 	• readable and commented code,
> 	• the motor record has many of the PVs that I would need to connect to and monitor with SNL already,
> 	• i don't need to define states and all the overhead that goes with it because the axis::move and axis::home can implement all the logic
> I don't know if it makes sense but if asyn could implement an asynChannelAccessPort I think it would simplify this problem a lot. 
> 
> On Fri, Mar 8, 2019 at 8:28 AM Peterson, Kevin M. <[email protected]> wrote:
> David,
> 
> I find SNL programs to be cleaner than pure database implementations for 
> situations like this.  The SNL program might be more work initially, but 
> it is often easier to maintain, especially if the sequenced move 
> procedure needs to become more complicated in the future.  Breaking the 
> implementation into well-defined states makes it easier for others to 
> understand, troubleshoot, and modify the code.
> 
> Kevin
> 
> On 3/7/19 10:49 AM, David Vine via Tech-talk wrote:
> > Hi all,
> > 
> > I'm looking for the cleanest way to implement a sequence of moves of 
> > between different physical axes but hide it from the user so it appears 
> > as just a single pseudo motor axis.
> > 
> > For example, I want to home axis A but to avoid a collision I need to 
> > move axes XYZ to a particular location first, then home A, and then move 
> > XYZ back to their original position at the end of the homing procedure. 
> > And that sequence should occur just clicking the home PV of A.
> > 
> > I would like to set up a pseudo motor driver using an asynMotor driver 
> > and implement the logic there. Is it possible to do channel access calls 
> > from within an asynMotor driver? I couldn't find any examples. The 
> > physical axes are connected across three galil controllers.
> > 
> > Implementing the logic within an SNL program would work but it seemed 
> > simpler to do it within the motor driver.
> > 
> > Thanks,
> > David
> > -- 
> > Best regards,
> > David Vine
> > (925) 326 7503
> > [email protected] <mailto:[email protected]>
> > 
> > 5750 Imhoff Drive, Suite I  |  Concord, CA 94520  |  USA 
> > <https://maps.google.com/?q=5750+Imhoff+Drive,+Suite+I%C2%A0+%7C%C2%A0+Concord,+CA+94520%C2%A0+%7C%C2%A0+USA&entry=gmail&source=g>
> > 
> > http://www.Sigray.com <http://www.sigray.com/>
> > 
> > This e-mail and any attachments are provided for the sole use of the 
> > intended recipient(s), and may contain information that is confidential, 
> > privileged, proprietary or otherwise protected by law. If you are not 
> > the intended recipient of this message, you are not authorized to read, 
> > print, retain, copy, forward or otherwise disseminate this message or 
> > any part of it. If you have received this e-mail in error, please notify 
> > the sender immediately by reply e-mail and delete the original message 
> > from your mail system. Thank you.
> > 
> > 
> 
> 
> 
> -- 
> Best regards,
> David Vine
> (925) 326 7503
> [email protected]
> 
> 
> 5750 Imhoff Drive, Suite I  |  Concord, CA 94520  |  USA
> 
> http://www.Sigray.com
> 
>  
> This e-mail and any attachments are provided for the sole use of the intended recipient(s), and may contain information that is confidential, privileged, proprietary or otherwise protected by law. If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy, forward or otherwise disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete the original message from your mail system. Thank you.
> 
> 
> <image001.png>


Replies:
RE: Multi-axis sequenced move using asynMotor pseudo axis Mark Rivers via Tech-talk
References:
Multi-axis sequenced move using asynMotor pseudo axis David Vine via Tech-talk
Re: Multi-axis sequenced move using asynMotor pseudo axis Peterson, Kevin M. via Tech-talk
Re: Multi-axis sequenced move using asynMotor pseudo axis David Vine via Tech-talk

Navigate by Date:
Prev: Re: Multi-axis sequenced move using asynMotor pseudo axis David Vine via Tech-talk
Next: CANbus EPICS support Gofron, Kazimierz 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  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Multi-axis sequenced move using asynMotor pseudo axis David Vine via Tech-talk
Next: RE: Multi-axis sequenced move using asynMotor pseudo axis 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  <20192020  2021  2022  2023  2024 
ANJ, 08 Mar 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·