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

Subject: Re: sub routine record doesn't get value via INPD
From: Maren Purves <[email protected]>
To: "Dr. Peter Zumbruch" <[email protected]>
Cc: EPICS tech-talk <[email protected]>
Date: Mon, 13 Jul 2009 08:31:11 -1000 (HST)
Peter,

for all I remember the type of the inputs by default is "string".
Found that out the hard way myself.

Aloha,
Maren

On Mon, 13 Jul 2009, Dr. Peter Zumbruch wrote:

Hi all,
I have the following problem (EPICS 3.14.10 / Debian 4.0)
with this tiny database (minimized to my problem) .
Why don't I see the Value/Raw Value of "HAD:RPC:S1:M0:C9:ToTL" at the
input D of the sub record "HAD:RPC:S1:M0:C9:stToTL", which I try to
access at c-code.

1) The ingredients:
record(ao, HAD:RPC:S1:M0:C9:ToTL) {
  field(DESC, "0 0 0 2")
  field(DTYP, "Raw Soft Channel")
  field(FLNK, "HAD:RPC:S1:M0:C9:stToTL")
  field(OUT, "HAD:RPC:S1:M0:C9:stToTL")
  field(EOFF, "0")
  field(LOPR, "0")
  field(HOPR, "199")
  field(DRVH, "250")
  field(DRVL, "0")
  field(LINR, "LINEAR")
  field(OMSL, "supervisory")
}

record(sub, HAD:RPC:S1:M0:C9:stToTL) {
  field(DESC, "store 0 0 0 2")
  field(INAM, "mySubInit")
  field(SNAM, "myStoreFcn")
  field(INPA, "0")
  field(INPB, "0")
  field(INPC, "2")
  field(INPD, "HAD:RPC:S1:M0:C9:ToTL.RVAL")
  field(INPE, "0")
}
The referenced C-Code:
static long myStoreFcn(subRecord *precord)
{
  ...
  short thr;
  ...
  thr = precord->d;
  ...

  printf( "Record %s called myStoreFcn(%p), thr %d, precord->d %f\n",
           precord->name, (void*) precord, thr, precord->d);
  ...
  return(0);
}
...
epicsRegisterFunction(myStoreFcn);
...
2.) The test: (caput / dbpf)

epics> dbgf HAD:RPC:S1:M0:C9:ToTL
DBR_DOUBLE:         0

epics> dbpf HAD:RPC:S1:M0:C9:ToTL 200
Record HAD:RPC:S1:M0:C9:stToTL called myStoreFcn(0x80577b0), thr 0,
precord->d 0.000000
DBR_DOUBLE:         200

epics>dbpr HAD:RPC:S1:M0:C9:stToTL
A: 0                ASG:                B: 0                C: 2
D: 0                DESC: store 0 0 0 2 DISA: 0             DISP: 0
DISV: 1             E: 0                F: 0                G: 0
H: 0                I: 0                J: 0                K: 0
L: 0                NAME: HAD:RPC:S1:M0:C9:stToTL           SEVR: NO_ALARM
STAT: NO_ALARM      TPRO: 0             VAL: 200
3. ) The (stupid) question: Why don't I get the value of
HAD:RPC:S1:M0:C9:ToTL at D? At VAL I see it.

Thanks  for any explanation.

Peter



References:
sub routine record doesn't get value via INPD Dr. Peter Zumbruch

Navigate by Date:
Prev: sub routine record doesn't get value via INPD Dr. Peter Zumbruch
Next: Re: sub routine record doesn't get value via INPD Andy Foster
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: sub routine record doesn't get value via INPD Dr. Peter Zumbruch
Next: Re: sub routine record doesn't get value via INPD Andy Foster
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·