Experimental Physics and
| |||||||||||||||
|
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
| ||||||||||||||
ANJ, 02 Sep 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |