EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Initial value readback from hardware into output records
From: [email protected]
To: [email protected]
Date: Tue, 7 Dec 2004 16:46:50 +1100



Hi all,

I'm hoping that someone out there can help me with what is probably a very
elementary piece of EPICS programming, but which I can't seem to get my
head around.

Our EPICS applications will have many output records (ao, bo, etc) for
writing commands to devices in order to do such things as setting them into
particular modes, like On/Off or Enabled/Disabled.  What I want to be able
to do is have the Device Support/Device Driver read from the device at
record initialisation time and set the initial state of the record to match
that of the device.  It shouldn't change the state of the device.

This is where I run into problems.  I've read Chapter 12 of the IOC
Application Developers Guide and understand the init_record() procedure.
As Andrew Johnson said in a recent tech-talk post:
                                                                            
 "It's the device support's init_record() that is responsible for doing the 
 initial value readback from the hardware into RVAL if it can, (or into VAL 
 and returning 2 instead of 0)."                                            
                                                                            



I also understand how to use the asyn drivers devGpib template to create a
device driver and have successfully used this to communicate to a few
devices.

However, I haven't been able to work out how to get devGpib to read the
initial value back from a device for an output record at initialisation
time.

If someone out there could help me with this, or even provide examples of
code which does this, it would be greatly appreciated.

Steve Banks
Australian Synchrotron Project
Department of Infrastructure
Level 17, 80 Collins Street
Melbourne   VIC   3000
tel:  +613 9655 6303
fax:  +613 9655 8666
web: www.synchrotron.vic.gov.au
**********************************************************************
Any personal or sensitive information contained in this email and
attachments must be handled in accordance with the Victorian Information
Privacy Act 2000, the Health Records Act 2001 or the Privacy Act 1988
(Commonwealth), as applicable.

This email, including all attachments, is confidential.  If you are not the
intended recipient, you must not disclose, distribute, copy or use the
information contained in this email or attachments.  Any confidentiality or
privilege is not waived or lost because this email has been sent to you in
error.  If you have received it in error, please let us know by reply
email, delete it from your system and destroy any copies.
**********************************************************************



Replies:
Re: Initial value readback from hardware into output records Benjamin Franksen

Navigate by Date:
Prev: Re: channel access errors Robert Soliday
Next: Re: Initial value readback from hardware into output records Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: channel access errors Jeff Hill
Next: Re: Initial value readback from hardware into output records Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·