EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  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  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: dbpf before iocInit...
From: Emmanuel Mayssat <[email protected]>
To: "'tech_talk'" <[email protected]>
Date: Tue, 08 Mar 2005 11:50:10 -0800
Hello,

I am pushing the limit of iocsh...
As all of you already know the iocsh script goes like this:

load_databse_definition
register_device_driver
Instanciate(record1)
Instanciate(record2)
iocInit

As I described a month ago ( see if-then-else for iocsh thread ), we are using templates for record instanciations.
Also we have programs that generate stcmd files automatically. ( user select subsystem of attached hardware and stcmd is generated automatically to work only with this hardware -- great for troubleshooting)


1/ In this context, in the above stmcd file record1 doesn't know if record2 is instanciated. But if record2 exist then record1.FLNK should point to it.

So, immediately in the block/template instanciate(record2), I insert
dbpf("record1.FLNK","record2").
I run the stcmd file, it freeze with the message:

dbLoadRecords("/home/epics/devel/lyncean/db/DELTA.db","deviceName=iocir:DELTA:14:1,referenceRecordName=SBC1:APhsAO,targetRecordName=SBC1:BPhsAO,engineeringUnits=V");
dbpf("SBC1:APhsAO.FLNK","iocir:DELTA:14:1:AO")

A call to "assert (dbLockIsInitialized)" failed in ../dbLock.c line 168.
EPICS Release EPICS R3.14.6 $R3-14-6$ $2004/05/28 19:27:47$.
Current time Tue Mar 08 2005 11:18:24.183692000.
Please E-mail this message to the author or to [email protected]
Calling epicsThreadSuspendSelf()

... Great :-( !.....

When I put the dbpf after the iocInit and it works.
But in term of "engineering beauty", I really want to put the dbpf in the instanciate(record2) template ( i.e. before iocInit call ). Also if I put it in instanciate(record1) and record2 doesn't exist, you get error messages.


How would you suggest I do this?

2/ I thought about creating records in a running database. That is run dbLoadRecord commands after iocInit. But it doesn't seem to work as I expected. Can we do this with iocsh? i.e. create and delete records in a running database?

--
Emmanuel









References:
RE: dm and edm problems with CA gateway Kenneth Evans, Jr.

Navigate by Date:
Prev: PCI CAMAC Highway Driver? Paul Sichta
Next: RE: dbpf before iocInit... Allison, Stephanie
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: dm and edm problems with CA gateway Kenneth Evans, Jr.
Next: RE: dm and edm problems with CA gateway Albert Kagarmanov
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·