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  <20132014  2015  2016  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  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: getBounds
From: Zenon Szalata <[email protected]>
To: Mark Rivers <[email protected]>
Cc: tech-talk <[email protected]>
Date: Tue, 5 Mar 2013 09:44:48 -0800
Thanks Mark,
I suspected that and yet I was obviously confused about the usage of DTYP field.
Thanks again,
Zen
On 03/04/13 21:28, Mark Rivers wrote:
Hi Zen,

getBounds is only called for asynInt32 device support, not asynFloat64.  The purpose of getBounds is to establish the range of integer device units for the device, for example 0 to 4095 for a 12-bit A/D or D/A.   getBounds is not a method in the asynFloat64 interface, which is why your getBounds method is not being called.

Mark
________________________________________
From: Zenon Szalata [[email protected]]
Sent: Monday, March 04, 2013 10:32 PM
To: Mark Rivers
Cc: tech-talk
Subject: Re: getBounds

Hi Mark,
Here is a typical ai record:
record( ai, "$(P,undefined):AI:CALDAC"){
    field( DTYP, "asynFloat64")
    field( INP,  "@asyn($(PORT,undefined),0,1)AI_CALDAC")
    field( SCAN, "I/O Intr")
    field( PREC, "3")
    field( EGU,  "V")
    field( EGUL, "0.0")
    field( EGUF, "5.0")
    field( LINR, "LINEAR")
}
and a typical ao record:
record( ao, "$(P,undefined):AO:VMEDAC"){
    field( SDIS, "$(P,undefined):AO:VMEDAC:Sync.PACT")
    field( DISV, "1")
    field( DTYP, "asynFloat64")
    field( OUT,  "@asyn($(PORT,undefined),0,1)AO_VMEDAC")
    field( EGU,  "V")
    field( EGUL, "0.0")
    field( EGUF, "0.3125")
    field( LINR, "LINEAR")
    field( PINI, "1")
}
I have a number of similar records in this IOC.
Thanks Mark,
Zen
On 03/04/13 16:47, Mark Rivers wrote:
Hi Zen,

If you look in asyn/asyn/devEpics/devAsynInt32.c you'll see that getBounds is called in initAi(), initAiAverage(), and initAo().

However, it is not called if the user specified the number of bits the device supports by using the asynMask syntax for the INP or OUT link specification.  That allows the device support to work correctly with Modbus and similar systems where a generic driver cannot know how many bits the device will support, so the database designer must define it.

- Are you using the asynInt32 device support for ai, aiAverage, or ao?
- Are you using the "asynMask" or "asyn" syntax in your link specification?

Can you send me a copy of the record definition in the .db or .template file?

Mark


________________________________________
From: Zenon Szalata [[email protected]]
Sent: Monday, March 04, 2013 6:14 PM
To: Mark Rivers; tech-talk
Subject: getBounds

Hi Mark,
I wonder when is the virtual function getBounds in asynPortDriver called.
I have reimplemented this function in my device driver.  I put a printf
statement in it and it looks that it never gets called.  I am thinking
that it should be called for each analog in or analog out record at IOC
init time.  That is not what I see.  What am I missing?
Thanks,
Zen


References:
getBounds Zenon Szalata
RE: getBounds Mark Rivers
Re: getBounds Zenon Szalata
RE: getBounds Mark Rivers

Navigate by Date:
Prev: IOC redundant source code Steven Goff
Next: database runtime acess ahwwq
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: getBounds Mark Rivers
Next: EPICS Record Support ahwwq
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·