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  <20152016  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  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: multi-channel analog i/p
From: Mark Rivers <[email protected]>
To: Stefen Paul <[email protected]>, "Hartman, Steven M." <[email protected]>
Cc: EPICS Tech Talk <[email protected]>
Date: Wed, 24 Jun 2015 12:18:11 +0000
> How can one call vxWorks device driver routines from EPICS records and make the data read
> by driver routine available to the EPICS records ?

Typically there is a device support layer in between the record and the driver.  Device support knows about the record fields, and how to communicate with the driver.

If the driver is written using the asyn interfaces then one can use the generic asyn device support in many cases, removing the need to write new device support for a particular device.

The device support and driver support is discussed in general terms in the EPICS Application Developer's Guide.
http://www.aps.anl.gov/epics/base/R3-14/12-docs/AppDevGuide.pdf

The asyn driver and device support is documented here:
http://www.aps.anl.gov/epics/modules/soft/asyn/R4-26/asynDriver.html

One option is to convert your driver to use the asyn interfaces, which typically is a thin layer and you can preserve 90% of the driver code.  Then you don't need to write device support.

Mark




________________________________
From: [email protected] [[email protected]] on behalf of Stefen Paul [[email protected]]
Sent: Wednesday, June 24, 2015 2:32 AM
To: Hartman, Steven M.
Cc: EPICS Tech Talk
Subject: Re: multi-channel analog i/p

Hi,

Is there a comprehensive document/website available telling about including 'driver support' in EPICS  ?

How can one call vxWorks device driver routines from EPICS records and make the data read by driver routine available to the EPICS records ?

Like in my case where I have a vxWorks driver for VME based 32-channel analog i/p board. I need to read the h/w through the driver only because of some FIFO design issues. But once the data is read by the driver, I would like to pass each channel's raw data to an individual ai record.

Thanks,
Stefen.

On Tue, Jun 23, 2015 at 6:19 PM, Hartman, Steven M. <[email protected]<mailto:[email protected]>> wrote:

> On Jun 23, 2015, at 1:36 AM, Stephen Paul <[email protected]<mailto:[email protected]>> wrote:
>
> Instead , I first want a record and its device support to read all the channels from the board in one go and then pass these values to individual 32 ai records for conversion.
>
> Can anyone suggest what type of record I can use before ai record to achieve this ?

Rather then a record for reading all of the hardware values, your device driver can have a worker thread responsible for reading from the hardware. This can be scheduled either periodically or based on some trigger. Your ai records would then read from the cached values from this worker thread rather then directly from the hardware. There are a number of drivers which take this approach, typically with more complicated hardware with a large number of registers to be read, or having a variety of different data types to support.

--
Steven Hartman
[email protected]<mailto:[email protected]>





References:
multi-channel analog i/p Stephen Paul
Re: multi-channel analog i/p Hartman, Steven M.
Re: multi-channel analog i/p Stefen Paul

Navigate by Date:
Prev: UCHAR to BitArray conversion ishita bhatia
Next: Re: multi-channel analog i/p Kasemir, Kay
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: multi-channel analog i/p Peter Milne
Next: Re: multi-channel analog i/p Kasemir, Kay
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·