On 12/21, Wang, Andrew wrote:
> Sorry if I wasn't clear. Basically if I run both caput commands with no wait period in between, will I expect to see 100 in A and 200 in B when I run caget.
>
> A and B are separate records. There is no forward linking between them. They are the only records in the database file and are both passive.
OK, so your Bash script would contain the following?
----
caput A 100
caput B 200
caget A
caget B
----
What is DTYP of each ai record set to? Or is it not set? If not set,
it would normally default to "Soft Channel".
If that's the case, I think most of the time it will work as you expect
without a delay, but I think you are not guaranteed that caget will
return 100 for A and 200 for B because the CA puts from the caput
commands could still be executing when the caget commands run. (But
I could be wrong about this; I haven't looked at the ai record source
code. An EPICS developer would know and can correct me if I'm wrong.)
However, I think what would guarantee the happens-after relationship
that you want for the caget commands is to make the caput commands
synchronous by using the "-c" and "-w <sec>" options. The "caput
-h" help output is a little confusing, IMO, in that it calls it
an "asynchronous put" where it says, "-c: Asynchronous put (use
ca_put_callback and wait for completion)," when what you're really
getting is synchronous behavior for the caput program: it will wait for
the CA put to complete before exiting. Anyway, assuming you're OK for
the caput commands to wait, I think that would do what you want, so:
----
caput -c -w 15 A 100
caput -c -w 15 B 200
caget A
caget B
----
Lewis
- References:
- Reliability of caput Wang, Andrew via Tech-talk
- Re: Reliability of caput J. Lewis Muir via Tech-talk
- RE: Reliability of caput Wang, Andrew via Tech-talk
- Navigate by Date:
- Prev:
RE: Reliability of caput Wang, Andrew via Tech-talk
- Next:
Re: Reliability of caput Michael Davidsaver via Tech-talk
- 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: Reliability of caput Wang, Andrew via Tech-talk
- Next:
Re: Reliability of caput Michael Davidsaver via Tech-talk
- 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
|