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

Subject: Re: duplicating process variables
From: James F Ross <[email protected]>
To: "Dalesio, Leo" <[email protected]>
Cc: Eric Norum <[email protected]>, EPICS Tech-Talk <[email protected]>
Date: Thu, 10 Jan 2013 12:23:20 -0500
Oh, I think i know what is going on.  This is epics version 3.14.9.  Were aliases implemented by then?
James

On Thu, Jan 10, 2013 at 12:22 PM, James F Ross <[email protected]> wrote:
I believe the alias command is the correct approach.  I would like to be able to reference the same channel with two different names.  So that, for instance, "caget TEMPF" and "caget TemperatureF" are the same.  However, I tried adding the line alias("TemperatureF") and I get an error:

Error: syntax error
Parsing 'alias'
   in file db/devhygrometer.db line 49
db_parse returned -1

The record:
record(ai,"TEMPF") {          
    alias("TemperatureF")

    field(DESC, "Channel 4: Temperature in F") 
    field(PREC, "4")
    field(EGU,"F")
    field(HOPR,"95")
    field(LOPR,"50")
    field(HIHI,"83.5")
    field(LOLO,"60")
    field(HIGH,"82.5")
    field(LOW,"68")
    field(HHSV,"MAJOR")
    field(HSV,"MINOR")
}

Is there something else I need to do before alias will work?
Thanks all
James



On Thu, Jan 10, 2013 at 12:18 PM, Dalesio, Leo <[email protected]> wrote:

Alternatively:

 

 

Or do you want to have multiple records with the same value:

 

record(ai,"TEMPF") {

    field(DESC, "Channel 4: Temperature in F")

    field(PREC, "4")

    field(EGU,"F")

    field(HOPR,"95")

     field (FLNK, “TemperatureF”)

.

.record (ai,”TemperatureF”){

    field (INP), “TEMPF”)

    field(PREC, "4")

    field(EGU,"F")

    field(HOPR,"95")

)

 

 

.

 

 

On Jan 10, 2013, at 9:04 AM, James F Ross <[email protected]> wrote:



Hello all,
Is there a way to duplicate values within the .db files of an epics IOC?  I mean I want the same channel to apply to two different varaibles so that other applications that use different PV names to refer to the same thing can each use it.  For example, I have a temperature monitor variable, TEMPF that has a value of, say, 75 (the actual value is received from the device that IOC handles).  I want this value to apply both to the variable TEMPF and a variable TemperatureF.  TEMPF will get the value and be the main variable as far as the IOC is concerned, and TemperatureF will get its value from TEMPF and act as its own channel, so I can caget either TEMPF or TemperatureF and see the same value. 

However, when I simply try to include a record identical to TEMPF in the db file, save that it is named TemperatureF, this does not work.  I have tried playing with FLNK as well, but I am unsure how to use it correctly for this purpose. 

Here is TEMPF:
record(ai,"TEMPF") {
    field(DESC, "Channel 4: Temperature in F")
    field(PREC, "4")
    field(EGU,"F")
    field(HOPR,"95")
    field(LOPR,"50")
    field(HIHI,"83.5")
    field(LOLO,"60")
    field(HIGH,"82.5")
    field(LOW,"68")
    field(HHSV,"MAJOR")
    field(HSV,"MINOR")
}

I tried adding field(FLNK,"TemperatureF") below the HSV field, then added another record:
record(ai,"TEMPF"), but I'm not sure what fields, if any, I should include in that so it is a clone of TEMPF. 

Thanks!
James

 

-- 
Eric Norum
[email protected]

 




Replies:
Re: duplicating process variables Eric Norum
References:
duplicating process variables James F Ross
Re: duplicating process variables Eric Norum
RE: duplicating process variables Dalesio, Leo
Re: duplicating process variables James F Ross

Navigate by Date:
Prev: Re: duplicating process variables James F Ross
Next: Re: duplicating process variables Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: duplicating process variables James F Ross
Next: Re: duplicating process variables Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·