EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: RE: asyn record support - output
From: "Mark Rivers" <[email protected]>
To: "Heinrich du Toit" <[email protected]>, "TechTalk EPICS" <[email protected]>
Date: Fri, 29 Jun 2007 08:06:20 -0500
Heinrich,

> Why does a longout record call the drivers READ command at startup?
> Doesn't make sense 2 me.

asyn device support does 1 read at startup for output records.  It does this so that the EPICS output PVs correctly display the current state of the device, without having to change the actual state of the device (sometimes called bumpless reboot).  This is usually what is desired, so that, for example, you can reboot an EPICS IOC and have the ao record controlling a power supply be set to the actual current value of the power supply without changing it.

However, there are times when this is not the desired behavior, i.e. if the device is known to be in a "not initialized" state.  In that case it is the responsibility of your asyn driver to return an error status on that initial read.  If it returns an error status then the longout record will not be set to the value from the initial read.

We may want to think of a way to disable the initial read with some record field in the database, but I think Marty Kraimer thought of that and did not come up with a solution.

Mark

 





________________________________

From: [email protected] on behalf of Heinrich du Toit
Sent: Fri 6/29/2007 7:37 AM
To: TechTalk EPICS
Subject: asyn record support - output



Hi

I've created an asyn driver that provides a asynInt32 multi_device
interface. Actually the addr is simply different "registers" on the same
device.
Everything works fine - well mostly.
The registers are multi-directional in the driver.
ie. you can write them and you can read them. - Interrupts also works
Offcourse some registers are for reading and other for writing.

Now on one such register for writing I've put a longout record.
As this register will configure the device I want to put in a default
value in the .db file.
so I added the DOL field to the longout register. (this will set the
default VAL of the record and it does)
But when the system initializes the thing goes and READ this register
using the driver. This not only overwrites the default value. It also
gives some garbage as the device can be in unknown state.

I've made a workaround using DrvUser Interface and passing a startup
value that way - but this just doesn't seem like a good solution.
Why does a longout record call the drivers READ command at startup?
Doesn't make sense 2 me.

-Heinrich





References:
asyn record support - output Heinrich du Toit

Navigate by Date:
Prev: asyn record support - output Heinrich du Toit
Next: Re: PV save and restore tool sought Thomas Birke
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: asyn record support - output Heinrich du Toit
Next: Re: asyn record support - output Marty Kraimer
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·