EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: A perl *.sch to *.db converter (utility for capfast)
From: "Redman, Russell O." <[email protected]>
To: "'Goetz Pfeiffer'" <[email protected]>, [email protected]
Date: Fri, 6 Sep 2002 12:43:24 -0700
Dear Goetz,

I have copied over the Sch2db.pl script and tested it a bit.  I am impressed
with the approach - perl strikes me as the correct language for the sch to
db translator.  Unfortunately, there are still a few things that prevent me
from using the script as it stands.

1) All of the Capfast symbols must reside in a single directory.  This is a
problem because we have one directory for the "standard" Capfast symbols,
but allow user-defined symbols to be developed in application-specific
directories.  It is essential to keep the user-defined symbols separate from
the standard symbols to prevent different applications from redefining each
other's symbols.

The correct solution would be to allow multiple directories in the search
path.  Internally, sympath could be changed from a variable to a list of
directories to search.  On start up, the behaviour of the -s switch could be
changed to accept a colon-separated list of directories (similar to the Unix
PATH environment variable), or to allow multiple -s switches. I think the
latter may be the most versatile solution.  Currently, if there are multiple
-s switches, the last one over-writes the previous values.  I would suggest
that each -s switch should append another directory name to the list of
directories in sympath.  The current directory should always be searched by
default, since that is where symed is likely to have written any
user-defined symbol files.  

2) Much more seriously, there does not seem to be any support for
hierarchical diagrams.  I use hierarchical diagrams as my primary mechanism
for abstraction and data hiding, so this is an absolute requirement for me.
As nearly as I can tell from the code, the script translates each schematic
file into a separate database file.  

To test this, I tried defining a subdiagram syb.sym + sub.sch and manually
copied sub.sym into my Capfast standard symbol directory.  Instead of
reading the contents of the sub.sch file, it just stuck a dummy record entry
	record(,"junk:sub1") {
	}
into the database.

3) I could not find any support for buses.  In several places I have been
forced to run buses containing 16 signals between my hierarchical diagrams.
I am having trouble with e2db, which does not seem to handle buses very
well.  I believe this is a portability issue, because e2db routinely mallocs
memory and uses the resulting data structures without initializing them. I
was motivated to look at Sch2db.pl by the hope that it would have fewer
memory management problems, and might handle the buses more successfully.

Unfortunately, I have absolutely no time available to help with writing a
more capable version of Sch2db.pl, as I am facing looming deadlines.  Very
reluctantly, I think it will be faster for me to fix the memory
initialization problems in e2db than to write the extensive new perl code
that will be required for Sch2db.pl.  

I offer these comments in hopes that they will encourage you to continue to
develop Sch2db.pl, which really looks to me like the correct way to
translate schematic files into database files.

Cheers,
Russell O. Redman

> -----Original Message-----
> From: Goetz Pfeiffer [mailto:[email protected]]
> Sent: Thursday, 2002 June 13 3:34 AM
> To: [email protected]
> Subject: A perl *.sch to *.db converter (utility for capfast)
> 
> 
> Hi,
> 
> I would like to announce Sch2db.pl. This is a perl-script
> that converts capfast drawings (*.sch - files) directly to
> the epics db-format (*.db files).
> 
> By using this script, sch2edif and e2db are no longer needed.
> You can convert your capfast files without the need to have
> capfast or the capfast license-server installed on your system.
> 
> However, this script needs the capfast symbol-files (*.sym). The
> path to these files can be given on the command-line or can be
> hard-coded into the script (look for "$opt_sympath"...).
> 
> The script has a short help-text which can be seen with
> "./Sch2db.pl -h"
> 
> The no-defaults ("-n") option can be used in order to see
> at a glance, what a capfast drawing really defines, by omitting
> all default-values and just showing fields that are set to a
> specific value. Together with "dbdiff" I use this to have a kind
> of "diff" utility for capfast files.
> 
> Benjamin Franksen ([email protected]) has modified
> "makeBaseApp.pl" here at BESSY in order to use Sch2db.pl instead
> of sch2edif and e2db during make.
> 
> The script has been tested with most of the capfast-drawings here
> at BESSY and converts them the same way the combination of
> sch2edif and e2db does.
> 
> The script can be found at:
> 
> http://www-csr.bessy.de/~pfeiffer/perl/Sch2db.pl
> 
> I hope somebody finds this software useful.
> Suggestions or comments are welcome.
> 
> greetings
> 
>   Goetz Pfeiffer            ([email protected])
> 

Navigate by Date:
Prev: RE: JCA thread safety Jeff Hill
Next: xy542 and koDevLib Allan Honey
Index: 1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: A perl *.sch to *.db converter (utility for capfast) Goetz Pfeiffer
Next: EPICS 3.14 question john sinclair
Index: 1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·