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: Multiple patterns/ .sub files for the same .db file
From: Tito Körner <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Wed, 18 Sep 2013 11:22:22 +0200
Hi everyone,

Emmanuel's solution works for me. Thanks for that!

And to explain things a little more: I have records redaing and setting voltage values - therefor i need "pattern {PROTO, P, BOXNO, LEVELNO, CHANNELNO, ELEMENTNO}" and then I have records reading and setting some internal values of the hv boxes and fo these I need the other pattern. I thought I could use a single .db file containing all the records and one .sub file with the patterns but obviously epics doesn't like different patterns in one .db file.
But by splitting up the records in 2 .db files (one related to everything concerning high voltage setting, and the other taking care of internal values it works out fine)!

Thanks again for the help!
Regards,
Tito


2013/9/11 Emmanuel Mayssat <[email protected]>
In your template file, all the parameters need to be defined.
I believe you need to break down your db file in 2 templates.
You substitution file to call in dbLoadTemplate can look like
file "template1.dbt"

{
    pattern {PROTO, P, BOXNO, LEVELNO, CHANNELNO, ELEMENTNO}
        {hvtest.proto, HV, 19, 0, 0, 0}
        {hvtest.proto, HV, 19, 0, 1, 1}
}
file "template2.dbt"

{
   pattern {EELO, EEUP}
        {dhcp, DHCP}
        {ip, IP}
}

template1.dbt includes ONLY the records that use the first set of parameters
template2.dbt includes ONLY the records that use the second set of params.

Cheers,
--
Emmanuel


Date: Tue, 10 Sep 2013 19:06:11 +0200
Subject: Multiple patterns/ .sub files for the same .db file
From: [email protected]
To: [email protected]


Hello,

I have .sub file looking like this:

file "hvtest.db"
{
    pattern {PROTO, P, BOXNO, LEVELNO, CHANNELNO, ELEMENTNO}
        {hvtest.proto, HV, 19, 0, 0, 0}
        {hvtest.proto, HV, 19, 0, 1, 1}
}

Now I would need another pattern in the same .db file looking like this:

file "hvtest.db"
{
   pattern {EELO, EEUP}
        {dhcp, DHCP}
        {ip, IP}
}

I tried two dbLoadTemplate - lines in my .cmd file

dbLoadTemplate "a.sub"
dbLoadTemplate "b.sub"

but I then got Error messages saying the substitutions from the first file are undefined. I also tried to put both patterns in one file (I found examples with different patterns for different .db files). But then again I get error messages saying the substitutions are undefined. When I directly append the second pattern after the first, I get a syntax error message. So how can this be done?

Regards,
Tito
       


References:
Multiple patterns/ .sub files for the same .db file Tito Körner
RE: Multiple patterns/ .sub files for the same .db file Emmanuel Mayssat

Navigate by Date:
Prev: RE: Installing epics.3.14.12.3 Mark Rivers
Next: RE: PiezoSytemJena motorcontroller driver problems Lauer, Kenneth
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: Multiple patterns/ .sub files for the same .db file Emmanuel Mayssat
Next: EtherCAT and NI slave chassis [SEC=UNCLASSIFIED] LYNCH, Damien
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 ·