Hi:
The EPICS Application Developer's Guide really has all the information as far as APIs.
There are several EPICS training session documents available which may be easier to read when you're just getting started, for example 3.3 Custom Device Support.ppt on http://ics-web.sns.ornl.gov/kasemir/train2013/
That shows how you tie a generic routine like this:
// Read current value for some channel from the hardware
int simple_read(int channel);
.. to for example an EPICS analog input record: *.dbd file entry to name the device support entry, 'read' routine called by the record which then invokes your simple_read() and places the value into the record's VAL field, ..
It also points out pitfalls; check the "problematic" example that can be found under "3.3 Device Examples".
When you expand a simple example into a real-world example, you'll soon find that your driver might have to setup threads which periodically poll the hardware, handle interrupts, errors, try again etc., so that the EPICS device support can always simply and quickly obtain the current state without delays.
Instead of doing that yourself, many people prefer to use the ASYN framework.
Thanks,
Kay
On Jun 24, 2015, at 3:32 AM, Stefen Paul <[email protected]>
wrote:
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]> wrote:
>
> > On Jun 23, 2015, at 1:36 AM, Stephen Paul <[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]
>
>
>
- 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:
RE: multi-channel analog i/p Mark Rivers
- Next:
Re: Direction option for caByte in caQtDM Jameson Graef Rollins
- 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
2022
2023
2024
- Navigate by Thread:
- Prev:
RE: multi-channel analog i/p Mark Rivers
- Next:
RE: multi-channel analog i/p Mark Rivers
- 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
2022
2023
2024
|