Hi- sent as private email, but maybe of interest to the community...
Mike
-----Original Message-----
If you ever need to launch a thousand seqs "for real", you could do what
I'm doing: rather than a humungous startup file, have a separate small
state
set which reads a config file and calls seq() itself for each entry.
The
only fly in the metaphorical ointment appears to be that snl progs seem
to require at least one PV connection to be happy; with no PVs assigned
it complains about "0 out of 0" connections, so you need a dummy PV in
that state program (and Ben just told me that will be fixed in the next
release).
And fwiw, it's better to have the "startup" seq hibernate rather than
die, to ward off resource-destruction demons.
//-----------------------------------------------
// read -- read one config entry
//-----------------------------------------------
state read {
when (1) {
%% n = fscanf(fp,"%s %s %s",devName,devType,devCfg);
if (n != 3) {
if (feof(fp)) done = 1;
else { //error
bubu = 1;
}
}
} state spawn
}
//-----------------------------------------------
// spawn -- spawn one magnet-cycling seq
//-----------------------------------------------
state spawn {
when (done || bubu) {
if (fp) fclose(fp);
} state done
when (1) { // !done
%% {
%% extern struct seqProgram seqMagCycle;
%% char seqParms[99];
%% sprintf(seqParms,"DEV=%s,TYP=%s,CFG=%s",devName,devType,devCfg);
%% seq(&seqMagCycle,seqParms,0);
%% }
} state spawn_delay
}
//-----------------------------------------------
// spawn_delay -- delay between spawns
//-----------------------------------------------
state spawn_delay {
#define SPAWN_DELAY 0.333 // adjust to taste
when (SPAWN_DELAY) {
} state read
}
- Navigate by Date:
- Prev:
Re: Transform Record no_inlink test Bruce Hill
- Next:
RE: building 64-bit base on windows Mark Rivers
- 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: building 64-bit base on windows matthew.pearson
- Next:
Regarding Labjack and Xcode Kamleshkumar Suthar (suthar)
- 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
|