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