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  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Adding readback zeroing to an asyn analog input
From: "Mark Rivers" <[email protected]>
To: "Angus Gratton" <[email protected]>
Cc: tech-talk <[email protected]>
Date: Sun, 9 Jan 2011 21:34:55 -0600
I don't know how to do what you are trying to do, but I'm not an expert on database programming.
 
It's not hard to write a proper motor driver, particularly if you use the C++ asynMotorDriver base class.
 
Mark
 

________________________________

From: Angus Gratton [mailto:[email protected]]
Sent: Mon 1/3/2011 6:50 PM
To: Mark Rivers
Cc: tech-talk
Subject: RE: Adding readback zeroing to an asyn analog input



On Sun, 2010-10-31 at 20:56 -0500, Mark Rivers wrote:
> Hi Angus,
> 
> Yes, the motor record will do it. 
> 
> But you can also do it pretty easily with your existing driver. 
> 
> - You make a bo record zeroing the position.  It does 2 things:
> 
> 1) Sends a messsage to your driver through the standard asynInt32 device support for bo.  Your driver flips the register bit, which sets the hardware position registers to 0.
> 
> 2) Forward links to soft ao record that writes 0 to your ao position record.  That write will not actually move the motor, because the hardware registers are already 0.
> 

Hi Mark & others,

I've had a second feature request for this stepper motor. The previous
request (where I used Mark's suggestion) was to support zeroing the set
& current positions. The new request is to support setting the position
by jogging.

So far I have not written a motor record driver, because this stepper
controller is so simple. Adding jog support just entailed writing a
'jog_by' soft record and having the 'ao' set_pos record read from it
with OIF=Incremental.

This works fine, but it breaks the nice simple "write zero to record"
trick that I had before. As best as I can tell, there's no way to
override the VAL value of an ao when it is set to Incremental.

To help explain, here's what I have in VisualDCT: http://imgur.com/cDmol
(note that lots of niceties like alarm levels and limits are not yet
set.) I'm setting OVAL to zero in the screenshot, but have also tried
VAL & RVAL to the same effect (which is, no effect at all.)

I was all set to move to Motor Record soft support, but I see that in
soft support mode the Motor Record doesn't support JOG_BY either.

Should I give up now and write a proper motor record driver for my
simple stepper controller? Or, is there some trick that will allow me to
zero the position, and allow jogging of the set value?

Thanks very much for any & all advice,

Angus





Replies:
RE: Adding readback zeroing to an asyn analog input Angus Gratton
References:
RE: Adding readback zeroing to an asyn analog input Angus Gratton

Navigate by Date:
Prev: Re: CSS Data Browser Plot Problem John Dobbins
Next: RE: Adding readback zeroing to an asyn analog input Angus Gratton
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Adding readback zeroing to an asyn analog input Angus Gratton
Next: RE: Adding readback zeroing to an asyn analog input Angus Gratton
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·