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

Subject: asynchronous record behavior
From: [email protected]
To: [email protected]
Date: Mon, 13 Sep 2010 14:56:58 -0700 (PDT)

Hey everyone, 

I'm having a problem with a calcout record that seems to process before it has passed control to its input record(s). I have a database with two records, 

record(calc, "Current:Coil") {
  field(DESC, "Coil Current")
  field(SCAN, "Passive")
  field(MDEL, ".1")
  field(ADEL, ".1")
  field(INPA, "Current:Coil.VAL  NPP")
  field(INPB, "$(MUX)VOLT:Chan203.VAL  PP MS")
  field(CALC, "A + B")
  field(PINI, "NO")
  field(EGU, "A")	
  field(SDIS, "0")
}

record(calcout, "Voltage:Output") {
  field(DESC, "Output Voltage")
  field(SCAN, "Passive")
  field(INPA, "Current:Coil.VAL  PP MS")
  field(OOPT, "Every Time")
  field(DOPT, "Use CALC")
  field(CALC, "A")
  field(OUT, "$(VLTPROG)P25V.VAL PP MS")
  field(PINI, "YES")
  field(EGU, "V")	
  field(SDIS, "0")

}

and when I start my ioc, I get: 

Starting iocInit
############################################################################
## EPICS R3.14.11 $R3-14-11$ $2009/08/28 18:47:36$
## EPICS Base built Sep  2 2010
############################################################################
2010/09/13 14:37:11.593 172.25.100.69:1234 write 32
MEAS:VOLT:DC? (@203)\n++read eoi\n
2010/09/13 14:37:11.593 172.25.100.97:1234 write 25
APPL P25V, 0.000000, 0.1\n

iocRun: All initialization complete
## Start any sequence programs
#seq sncxxx,"user=andrewwagnerHost"

epics> 2010/09/13 14:37:11.870 172.25.100.69:1234 read 16
+8.92303000E-04\n


It seems the calcout record processes at init (as desired) passes control to input A which issues the MEAS:VOLT:DC? command but doesn't wait for input A to actually return a value. Input A returns control to the calcout record too quickly so if I print the record I get: 

epics> dbpr Voltage:Output
A: 0                ASG:                B: 0                C: 0                
CALC: A             D: 0                DESC: Output Voltage                    
DISA: 0             DISP: 0             DISV: 1             DLYA: 0             
E: 0                F: 0                G: 0                H: 0                
I: 0                J: 0                K: 0                L: 0                
NAME: Voltage:Output                    OCAL: 0             OEVT: 0             
OVAL: 0             POVL: 0             PVAL: 0             SEVR: INVALID       
STAT: LINK          TPRO: 0             VAL: 0              


with an INVALID LINK. How can I guarantee that control from the input is not passed back to the calcout record until it has finished measuring the voltage? Should I set SDIS "Current:Coil.PACT" ? Thanks very much for your help. 

Andrew




Replies:
Re: asynchronous record behavior Eric Norum
Re: asynchronous record behavior Dirk Zimoch

Navigate by Date:
Prev: RE: debian package update to 3.14.11 Davidsaver, Michael
Next: Re: asynchronous record behavior Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: streamDevice hex format input Gorka Ronda
Next: Re: asynchronous record behavior Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·