Experimental Physics and Industrial Control System
Andrew Johnson wrote:
Emmanuel Mayssat wrote:
This technique appears to be somewhat fragile (meaning you must be
careful if you decide to use it). It's probably fine if you have a
small number of .dbl files and can keep track of all the variables that
each one needs, but what happens if you should re-use a variable name
(with different default values) in two different dbl files? The first
That's a risk we are willing to take ;-)
The advantage is that the input parameters can be changed just by
changing the template. this is very important to us for development
purpose ( we work at the driver and at higher levels at the same time )
Currently, we have scripts that automate the building of the stcmd file.
They literally replace the fields with other strings and concat the
modified template files to the stcmd.
dbl file would set the value it wants as the default, but the second
file would always see the earlier file's default setting (because the
variable was never unset), even if the user really wanted to use the
I would suggest that you require that the parent script must set *all*
parameters that a dbl file relies on itself, or load a single default
settings file early on like Eric suggested.
Impossible, because we want to use several times the same template in
the same stcmd file ( and with different parameter values ). For
example, we have a digital output/input on a DAC. We have one driver for
the digital input and one for the digital output. The board has 50 DIO
ports. We must dbLoad 50 intances with different parameters for each BI
and BO drivers.
We have several IOC which use the same drivers.
Using a template dbl enables us to upgrade all the IOC at once. ( that
's a big advantage for development purpose ). For example, you can
change the db file very easily which such a mechanism.
I was thinking about using a registar function as follow:
default("${BR}",9600)
that would check the value or $BR and if not set, then put 9600.
(and so far nobody mentioned that solution!! )
but what I really want to do is an if then else in iocsh ;-)
--
Emmanuel Mayssat
Lyncean Technologies, Inc.
Direct: 650/320-8300 x409
Cell: 650/793-0626
- Replies:
- Re: if-then-else in iocsh Andrew Johnson
- References:
- if-then-else in iocsh Emmanuel Mayssat
- Re: if-then-else in iocsh Andrew Johnson
- Re: if-then-else in iocsh Maren Purves
- Re: if-then-else in iocsh Emmanuel Mayssat
- Re: if-then-else in iocsh Andrew Johnson
- Navigate by Date:
- Prev:
Re: if-then-else in iocsh Maren Purves
- Next:
Re: if-then-else in iocsh Andrew Johnson
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
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:
Re: if-then-else in iocsh Maren Purves
- Next:
Re: if-then-else in iocsh Andrew Johnson
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
<2005>
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024