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

Subject: Re: a puzzle about using stream device driver
From: Dirk Zimoch <[email protected]>
To: "Davidsaver, Michael" <[email protected]>
Cc: tech-talk <[email protected]>
Date: Mon, 20 Jun 2011 17:42:49 +0200
Geyang,

You probably want to disable scanning completely when the motor is not moving, not just reduce the rate.

From the position-set record FLNK to a seq or similar that sets moving to 1. Your position-read record can use the 'field(SDIS, "$(P)moving")' and 'field(DISV, "0")' directly to process only when moving is 1. The same for all other records that should only poll when moving.

If the device can be asked for "done" use this information to set moving back to 0 and all polling stops. This record should as well poll only when moving. If the device cannot be asked for "done", use a calcout record to calculate "done" yourself.


"I/O Intr" only works if the device is sending status updates automatically while moving, without being polled.

Dirk


Davidsaver, Michael wrote:
A simple way to get different scan rates based on a binary status.  I
haven't checked that this example works, but I think it gives the basic
idea.

Record(bi, "$(P)moving") {
}

Record(fanout, "$(P)slow") {
  Field(SDIS, "$(P)moving")
  Field(DISV, "1")
  Field(SCAN, "1 second")
  Field(FLNK, "$(P):opticalscale")
}

Record(fanout, "$(P)fast") {
  Field(SDIS, "$(P)moving")
  Field(DISV, "0")
  Field(SCAN, ".1 second")
  Field(FLNK, "$(P):opticalscale")
}

Record(ai, "$(P):opticalscale") {
}

Behavior of SDIS and DISV is described here:

http://www.aps.anl.gov/epics/wiki/index.php/RRM_3-14_dbCommon


-----Original Message-----
From: [email protected] [mailto:tech-talk-
[email protected]] On Behalf Of Silver
Sent: Monday, June 20, 2011 10:42 AM
To: tech-talk
Subject: a puzzle about using stream device driver

hi,

I am using stream device driver to communicate a galil motion control
which model is dmc21x3. To  get the value of optical scale, I use a ai
record like this:

record(ai,"$(PREFIX):opticalscale")
{
        field (DESC, "opticalscale position")
        field (DTYP, "stream")
        field (INP, "@dmc2143.proto ai_opticalscale motor")
        field (SCAN, ".5 second")
}
In that, I use the period scan. It works fine.
But in most of time, the value doesn't change. That means the IOC has
to communicate with device periodly. As the value only changes during
the motor moving,  may I use I/O Intr mode?
I checked the online document of stream device, seems the I/O Intr
mode
is not suitable for this case. Is there any good ways to avoid
checking
the devcie periodly?
Thanks a lot for your help.

Best regards
Geyang  2011-06-20






References:
a puzzle about using stream device driver Silver
RE: a puzzle about using stream device driver Davidsaver, Michael

Navigate by Date:
Prev: EPICS_DEPRECATED and gcc-2.96 Dirk Zimoch
Next: RE: radiation damage to electronics inside accelerator tunnel? Hu, Yong
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: a puzzle about using stream device driver Davidsaver, Michael
Next: EPICS_DEPRECATED and gcc-2.96 Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·