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: Re: asynchronous record behavior
From: Dirk Zimoch <[email protected]>
To: [email protected]
Cc: [email protected]
Date: Thu, 16 Sep 2010 15:51:19 +0200
Hi Andrew,

I can only discourage from using INP(.... PP) at all. It does not work as one might expect (you will get an old value) if:
* The record the input link points to is asynchronous.
* Any record in the OUT(... PP) or FLNK(...) processing chain of that record is asynchronous.


The first point is probably easy to check but with complex record networks it is hard to see if the second point is fulfilled. Furthermore, you can't tell from the name of a device support if the record is synchronous or asynchronous.

Thus it is better to avoid PP input links completely.

Dirk



[email protected] wrote:

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






References:
asynchronous record behavior apwagner

Navigate by Date:
Prev: Re: Stream Device With Parameters Dirk Zimoch
Next: Re: Testing the new DBE property in EPICS R3-14-11 Ralph Lange
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: asynchronous record behavior Andrew Wagner
Next: Strange gateway error message Dirk Zimoch
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 ·