Hi Zen,
I tried it and it works for me. I started with INPB, INPC, and INPD = 0. The
calc starts with 3600. When I write 1 to field B, the calc starts counting
backwards. This seems to be the expected behavior.
I use R3.14.8.2.
Have a nice weekend.
Dirk
Szalata, Zenon M. wrote:
I am trying to do something very simple and not succeeding.
I have two records:
record( longout, "$(P):LO:FIL:TVAL"){
field( DESC, "timeout in sec")
# field( OUT, "$(P):$(R):LO:TIME:LEFT PP")
field( OUT, "$(P):$(R):CALC:TIME:LEFT:1PSEC")
field( VAL, "3600")
field( PINI, "YES")
}
record( calc, "$(P):$(R):CALC:TIME:LEFT:1PSEC"){
field( DESC, "increment 1/sec")
field( SCAN, "1 second")
field( CALC, "C?D:B?(A?A-1:0):A")
field( INPA, "$(P):$(R):CALC:TIME:LEFT:1PSEC.VAL NPP")
field( INPB, "$(P):$(R):BO:TIME:LEFT:ENABLE.VAL NPP")
field( INPC, "$(P):$(R):CALC:TIME:LEFT:RESET.VAL NPP")
field( INPD, "$(P):$(R):LO:TIME:LEFT.VAL NPP")
field( FLNK, "$(P):$(R):GS:TIME:LEFT")
}
When my test soft ioc goes through the init phase, I expected that the first of the two records would process and write the value 3600 to the VAL field of the second record, but that does not happen. If my second record is longout then the value gets written to it. When I process the first record with caput by writing 1 to its PROC field, then the value is written to the calc record. Why does it not work at iocInit time? Is there some simple way of transferring the value from the first record to the calc record at iocInit time? Any suggestions will be appreciated.
Thanks,
Zen
--
Dr. Dirk Zimoch
Paul Scherrer Institut, WBGB/006
5232 Villigen PSI, Switzerland
Phone +41 56 310 5182
- References:
- Record Initialization Szalata, Zenon M.
- Navigate by Date:
- Prev:
Survey by ATOS on EPICS Applications Di Maio Franck
- Next:
Re: caget with an array of space-containing strings J. Lewis Muir
- 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:
Record Initialization Szalata, Zenon M.
- Next:
Survey by ATOS on EPICS Applications Di Maio Franck
- 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
|