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  2021  <20222023  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  2021  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: RE: [EXTERNAL] Re: RBV value for Soft Channel motor not always being set properly on IOC startup
From: "Gregory, Ray via Tech-talk" <tech-talk at aps.anl.gov>
To: Kevin Peterson <kmpeters at anl.gov>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 9 Jun 2022 17:24:33 +0000
Thank you, Kevin! That works fantastically well.

Ray

Ray Gregory
Oak Ridge National Laboratory


-----Original Message-----
From: Kevin Peterson <kmpeters at anl.gov> 
Sent: Thursday, June 09, 2022 11:31 AM
To: Gregory, Ray <gregoryrd at ornl.gov>; tech-talk at aps.anl.gov
Subject: [EXTERNAL] Re: RBV value for Soft Channel motor not always being set properly on IOC startup

Ray,

You can work around the initialization problem by adding a calcout 
record to mirror the underlying motor's RBV:

record(calcout,"$(VM):rbvCalc")
{
     field(DESC,"Mirror RBV")
     field(CALC,"A")
     field(INPA,"$(M1).RBV CP MS")
}

And then using the calcout in the virtual motor's RDBL field:

   field(RDBL, "$(VM):rbvCalc")

Kevin

On 6/9/22 09:13, Gregory, Ray via Tech-talk wrote:
> Hi,
> 
> I am developing a Soft Channel motor to be a virtual motor that controls 
> two other motors. The virtual motor is essentially a copy of one of the 
> underlying motors and applies ‘adjustment’ moves to the other motor it 
> controls in accordance with a pre-specified alignment profile (using a 
> simple linear equation determined by calibration).
> 
> Most of this is working well. However, when the IOC starts, the virtual 
> motor often fails to retrieve its RBV value from the underling motor. 
> I’ve included the soft channel motor record below.
> 
> How do I fix this?
> 
> I am using EPICS base version 3.14.12.6. I am currently developing on my 
> VM with Simulated motors. I’m not sure what differences to expect when I 
> deploy this to an actual instrument.
> 
> So far I haven’t found a simple solution.
> 
> However, I have created horribly complicated solution that seems to 
> work: I created another do-nothing Soft Channel motor and make it part 
> of the virtual motor system, so now the overall virtual motor controls 3 
> motors, one of them being the do-nothing motor. Then, if the RBV value 
> was not set properly at launch time, I move this do-nothing motor. This 
> has the effect of sometimes properly setting the RBV of the main virtual 
> motor. If that doesn’t work, I try it again, and again, up to some 
> maximum number. I call this process ‘kicking’ the RBV.
> 
> It's a kludgy and nasty solution. I would very much appreciate knowing 
> how to fix this in some simple way.
> 
> Thank you,
> 
> Ray Gregory
> 
> Oak Ridge National Laboratory
> 

References:
RBV value for Soft Channel motor not always being set properly on IOC startup Gregory, Ray via Tech-talk
Re: RBV value for Soft Channel motor not always being set properly on IOC startup Kevin Peterson via Tech-talk

Navigate by Date:
Prev: Re: Bus errors accessing VME with base 7.0.6.1 and latest synApps modules Kevin Peterson via Tech-talk
Next: PVStructure vs Structure Madden, Timothy J. 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  <20222023  2024 
Navigate by Thread:
Prev: Re: RBV value for Soft Channel motor not always being set properly on IOC startup Kevin Peterson via Tech-talk
Next: Removing battery/crystal from MVME 5100 Walsh, Thomas R. 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  <20222023  2024 
ANJ, 14 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·