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: subrecord INPx
From: "Hinko Kocevar" <[email protected]>
To: "Matthieu Bec" <[email protected]>, <[email protected]>
Date: Wed, 24 Nov 2010 18:04:05 +0100
Title: RE: subrecord INPx

Hi Matthieu,

I stand corrected. It was copy-paste with few manual modifications that resulted in a mistake.

Nevertheless the INPA is not being incremented when calc record increments its VAL, even with FLNK added.

Thank you!

Best Regards,
Hinko

-----Original Message-----
From: [email protected] on behalf of Matthieu Bec
Sent: Wed 11/24/2010 5:33 PM
To: [email protected]
Subject: Re: subrecord INPx

Hi Hinko,

its' not clear in your example how you produced a console trace for your
sub record, there is nothing obvious in your db example to make it process.

try add a FLNK, should work

 > record(calc, "$(user):subInc") {
 > field(SCAN, "1 second")
 > field(VAL, "0")
 > field(CALC, "(A+1)")
 > field(INPA, "$(user):subInc.VAL NPP")
   field(FLNK, "$(user):subExample")
 > }

Matthieu


On 11/24/10 11:49, Hinko Kocevar wrote:
> Hi,
>
> I'm poking around the example IOC I've created with:
>
> $ makeBaseApp.pl -t example app1
> $ makeBaseApp.pl -i -t example app1
>
> Example runs fine and records are behaving as expected, but..
>
> I tried to experiment with subRecord, but the mySubProcess routine does
> not seem to get values on INPx fields if they are not constants. I've
> added following line to get INPA value inside the C function:
>
> static long mySubProcess(subRecord *precord)
> {
> if (mySubDebug)
> printf("Record %s called mySubProcess(%p)\n",
> precord->name, (void*) precord);
>
> printf("precord->a %lf\n", precord->a);
> printf("precord->b %lf\n", precord->b);
>
> return 0;
> }
>
>
> Example:
>
> record(sub,"$(user):subExample")
> {
> field(INAM,"mySubInit")
> field(SNAM,"mySubProcess")
> field(INPA, "$(user):subInc")
> field(INPB, "123")
> }
>
> record(calc, "$(user):subInc") {
> field(SCAN, "1 second")
> field(VAL, "0")
> field(CALC, "(A+1)")
> field(INPA, "$(user):subInc.VAL NPP")
> }
>
> Output from IOC:
> Record hinkoHost:subcall called mySubProcess(0x9205998)
> precord->a 0.000000
> precord->b 123.000000
> Record hinkoHost:subcall called mySubProcess(0x9205998)
> precord->a 0.000000
> precord->b 123.000000
> Record hinkoHost:subcall called mySubProcess(0x9205998)
> precord->a 0.000000
> precord->b 123.000000
>
>
> At the same time, if I monitor the $(user):subInc:
> camonitor hinkoHost:subInc
> hinkoHost:subInc 2010-11-24 15:45:57.346136 14
> hinkoHost:subInc 2010-11-24 15:45:58.346438 15
> hinkoHost:subInc 2010-11-24 15:45:59.346628 16
>
> What am I missing?
>
> Best regards,
> Hinko
>


--
Matthieu Bec              Gemini Observatory
Tel: +56 51 205785        c/o AURA, Casilla 603
Fax: +56 51 205650        La Serena, Chile


References:
subrecord INPx Hinko Kocevar
Re: subrecord INPx Matthieu Bec

Navigate by Date:
Prev: Re: MAXv issue Jens . Eden
Next: RE: subrecord INPx Hinko Kocevar
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: subrecord INPx Matthieu Bec
Next: RE: subrecord INPx Allison, Stephanie
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, 24 Nov 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·