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  2015  <20162017  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  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Fwd: break table
From: Andrew Johnson <[email protected]>
To: <[email protected]>
Date: Tue, 27 Sep 2016 16:16:16 -0500
Hi Pete,

On 09/27/2016 03:33 PM, D Peter Siddons wrote:
> 
>   I have a breakpoint table for converting thermistor resistance to
> temperature which I have used in various projects for many years. I
> tried to add it to a new IOC and this is what I get:

> breaktable("Therm10kdegC") {
>     point(34.1115, 99)

Hmm, have you been experimenting with any Base-3.15 releases at all?

> The input table in the IOC src directory does not have all these
> point()s, just the bare numbers. The IOC sees these additions as a
> syntax error. Where did they come from? If I delete them in the dbd
> directory, the table loads fine. But every time I recompile they get
> replaced.
> 
> This is on EPICS 3.14.12.5, compiling natively on Debian Arm.

Are you sure about that Base version number? What is the output from the
IOC's iocInit command?

The point() syntax was added to the Perl version of the DBD processing
chain in Base-3.15, and the new dbdExpand.pl script converts breakpoint
tables from the old-style list of numbers to a list of points like
you're seeing. In 3.14 though the DBD-file expansion was done using a C
program called dbExpand, so there's no way that a 3.14 build could be
running the dbdExpand.pl script even if you happened to have both
versions of Base in your PATH.

Actually it appears there is an unfortunate bug in Base-3.15 because the
IOC's DBD-file parser doesn't seem to understand that new point() syntax
at all. It's interesting that nobody else has reported this problem yet,
given that 3.15.1 was released in December 2014...

One workaround for this on 3.15-based IOCs is to *not* include the
breakpoint table file(s) when generating the IOC's DBD file, but to load
it/them separately from the IOC startup script, with either a
dbLoadDatabase or dbLoadRecords command. I would recommend loading the
breakpoint table(s) before the databases that make use of them.

Alternatively if you prefer to fix your Base-3.15 installation, you can
apply the following change:

> === modified file 'src/tools/DBD/Output.pm'
> --- src/tools/DBD/Output.pm     2014-10-03 19:23:04 +0000
> +++ src/tools/DBD/Output.pm     2016-09-27 21:10:00 +0000
> @@ -92,7 +92,7 @@
>      my ($out, $breaktables) = @_;
>      while (my ($name, $breaktable) = each %{$breaktables}) {
>          printf $out "breaktable(\"%s\") {\n", $name;
> -        printf $out "    point(%s, %s)\n", @{$_}
> +        printf $out "    %s, %s\n", @{$_}
>              foreach $breaktable->points;
>          print $out "}\n";
>      }

After making that change you only need to run 'make' once in the
Base/src/tools directory to apply the fix.

Sorry, my bug!

- Andrew

-- 
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon

Replies:
Re: Fwd: break table D Peter Siddons
References:
Fwd: break table D Peter Siddons

Navigate by Date:
Prev: Fwd: break table D Peter Siddons
Next: RE: Fwd: break table Steiner, Mathias
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Fwd: break table D Peter Siddons
Next: Re: Fwd: break table D Peter Siddons
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 28 Sep 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·