> When deassigned, the count was decremented. When
> the count became non-zero or zero, the scan field got the value of
fastscan or slowscan
> respectively.
> In this case I obviously needed the record to manage the scan value
rather than some
> external agent.
Maybe I'm missing something, but I don't see why an EPICS record like
calcout could not be making those changes to the SCAN field based on the
reference count (as long as the reference count was available to EPICS).
That way standard records could be used.
Mark
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of John Sinclair
> Sent: Friday, July 13, 2007 2:35 PM
> To: TechTalk EPICS
> Subject: Re: Scan question
>
> Actually, when I ported the tandem controls to EPICS, I modified a
> couple of the
> standard records (ai, ao, mbbiDirect, mbboDirect) to be able to
> manipulate the scan value inside
> the record's own code. The remote I/O throughput was too low
> to have all
> the records scan at
> a rate fast enough to make I/O sufficiently responsive during beam
> tuning. In the old system
> (no network), several process variables could be assigned to
> knobs and
> meters which would
> cause them to be processed at a higher scan rate. So I used the same
> scheme. I added a
> fastscan and slowscan field to the database along with
> several fields to
> manage the assignment
> operation. When the PV was "assigned" (to a knob or meter, in this
> case), an assignment reference
> count was incremented. When deassigned, the count was
> decremented. When
> the count became
> non-zero or zero, the scan field got the value of fastscan or
> slowscan
> respectively. In this case
> I obviously needed the record to manage the scan value rather
> than some
> external agent.
>
> Ain't EPICS wonderful.
>
> John Sinclair
>
> Mark Rivers wrote:
> > I think it would be a bad idea for a record to change the
> SCAN field.
> > That is something that you should let the database designer
> do. They
> > may want to use your record in ways you never thought of.
> >
> > However, if you really want your record to process again
> when something
> > happens then the record code can request reprocessing
> without changing
> > the SCAN field. There are several ways to do this (scanOnce,
> > processRequestProcessCallback) depending on the
> application. Look at
> > the Application Developer's Guide.
> >
> > Mark
> >
> >
> >
> >> -----Original Message-----
> >> From: [email protected]
> >> [mailto:[email protected]] On Behalf Of
> Heinrich du Toit
> >> Sent: Thursday, July 12, 2007 9:05 AM
> >> To: TechTalk EPICS
> >> Subject: Scan question
> >>
> >> Can I change the SCAN field at runtime?
> >> E.g. inside my own custom record.
> >>
> >> Some devices normally needs only be scanned say once a sec
> or every 5
> >> secs. But then when you change the value you want the scanned
> >> faster at
> >> say 0.2 secs.
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
>
>
- References:
- Re: Scan question John Sinclair
- Navigate by Date:
- Prev:
Re: Scan question Ralph Lange
- Next:
ai, soft channel, and breakpoint table John Dobbins
- 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: Scan question Ralph Lange
- Next:
Re: Scan question Emmanuel Mayssat
- 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
|