Experimental Physics and Industrial Control System
|
Hi all,
I'm developing a state machine for a string of superconducting
magnets. I'm reading from an
external configuration database (cdb) to pick up fields (alarm,
adel, scan, etc) for each of my
PVs as well as the state transition parameters. At present, on each
entry block of each state, I
call my c-function to read from the cdb and fill a global struct
with the field values for each PV.
Since the list may change in each state, I have arrays for each
field. For example:
PV.name[ndx] and PV.hihi[ndx] which I fill for each state and these
are global in a header file.
I also have, in another header file, all of my assignments:
e.g. SS2cx01[4] is assigned to MICE-SS2-CX-01:RDGK.HIHI in a header
file.
What I want to do is to have another c-function, SetPVFields(),
which invokes seq_pvPut(). Since I
call SetPVFields(ssId,State,ndx) in a loop over ndx in my .st file,
I want to be able to relate PV.name[ndx]
with pvIndex() inside of my SetPVFields() function. Is there a way
to do this? One thought that I had is
to create the relationship array between pvIndex and the PV name in
the global entry block and use
it inside of SetPVFields(), but I'm not sure of the details and this
does not strike me as very elegant.
Thanks,
Pierrick
--
"Whether you think you can or think you can't, either way, you are
correct" -- Henry Ford
_______________________________________________________________
Pierrick Hanlet
IIT/Fermilab
+1-630-840-5555 (FNAL)
+1-312-567-5745 (IIT)
+1-630-697-8758/+44-79-48-860-197 (US/UK mobile)
|
- Replies:
- Re: sequencer and c-code Benjamin Franksen
- Re: sequencer and c-code Wesley Moore
- Navigate by Date:
- Prev:
devIocStats Benjamin Franksen
- Next:
Re: sequencer and c-code Benjamin Franksen
- 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: devIocStats Allison, Stephanie
- Next:
Re: sequencer and c-code Benjamin Franksen
- 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
|
ANJ, 20 Apr 2015 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|