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

Subject: RE: Setting RECORD value to another RECORD
From: Mark Rivers <[email protected]>
To: Mogamad Amien Crombie <[email protected]>, "[email protected]" <[email protected]>
Date: Fri, 11 Dec 2015 12:55:01 +0000
Hi Amien,

Here are 3 options. Note type DTYP "Soft Channel" is the default, so I have deleted that line, and I am only changing the first 2 records, the third one should probably be changed to the following in all cases, i.e. adding PP to OUT link so that the offset record will process.

record(ao, "$(dev):zeroOffset") {
field(OUT, "$(dev):offset PP")
field(VAL, "0")
}

In your version calcoffset had an FLNK to offset, but offset was not actually getting the value from calcoffset.  In this version offset has its INP link to get the value from calcoffset.  Your message said you were doing a PUT to calcoffset.  Did you mean to calcoffset.VAL (which is the default if you do not specify a record field)?  That is probably not what you want to do, you want to PUT 1 to calcoffset.PROC, which forces the calcoffset record to process, but getting its value from rawval.

record(ai,  "$(dev):calcoffset") {
field(INP,  "$(dev):rawval")
field(FLNK, "$(dev):offset PP")
}
record(ai,  "$(dev):offset") {
field(INP,  "$(dev):calcoffset NPP")
}

In this version calcoffset will automatically process every time the rawval record processes because it is a CP link.  This may or may not be what you want to do.
record(ai,  "$(dev):calcoffset") {
field(INP,  "$(dev):rawval CP")
field(FLNK, "$(dev):offset PP")
}
record(ai,  "$(dev):offset") {
field(INP,  "$(dev):calcoffset NPP")
}

Finally, this version eliminates the calcoffset record entirely, and the offset record just gets its value from rawval every time rawval changes.  Again this may or may not be what you want to do.
record(ai,  "$(dev):offset") {
field(INP,  "$(dev):rawval CP")
}

Mark


From: [email protected] [[email protected]] on behalf of Mogamad Amien Crombie [[email protected]]
Sent: Friday, December 11, 2015 3:16 AM
To: [email protected]
Subject: Setting RECORD value to another RECORD


Hi

I have 3 records like this:
#############################################
record(ai, "$(dev):calcoffset") {
field(DTYP, "Soft Channel")
field(INP, "$(dev):rawval")
field(FLNK, "$(dev):offset PP")
}

record(ai, "$(dev):offset") {
field(DTYP, "Soft Channel")
}

record(ao, "$(dev):zeroOffset") {
field(OUT, "$(dev):offset")
field(VAL, "0")
}

##############################################
All I want to do is to get a value from my Asyn INP (input) called
$(dev):rawval and assign the value to $(dev):offset.
Also I use $(dev):zeroOffset to set this to 0.

But somehow when I do a PUT to $(dev):calcoffset, my #(dev):offset is not set to this INP value.
What I'm I doing wrong?

Thanks
Amien Crombie
Cape Town
iThemba-LABS




References:
Setting RECORD value to another RECORD Mogamad Amien Crombie

Navigate by Date:
Prev: Setting RECORD value to another RECORD Mogamad Amien Crombie
Next: Re: Setting RECORD value to another RECORD Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Setting RECORD value to another RECORD Mogamad Amien Crombie
Next: Re: Setting RECORD value to another RECORD Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·