Experimental Physics and Industrial Control System
|
From: "Pierrick Hanlet" <[email protected]> To: "Tech Talk" <[email protected]> Sent: Saturday, April 13, 2013 1:38:29 PM Subject: sequencer and c-code
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
Hey Pierrick, Sorry I didn't get back to you Friday. After looking over your code the only thing I think you're missing for seq_pvPut() is the Id for the PV. So I think you're right in that if you create an additional array to hold the values from pvIndex, your c should work. However, I tend to agree with Ben's comments. Doing this in python as a CA client may be an easier way to go. Especially as it may evolve over time. I can take a look at it again if you've updated the code. Just write me offline. Wesley
- References:
- sequencer and c-code Pierrick Hanlet
- Navigate by Date:
- Prev:
RE: Problem in installing asyn4-19 in mint13 system Mark Rivers
- Next:
Re: Problem in installing asyn4-19 in mint13 system Eric Norum
- 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: sequencer and c-code Benjamin Franksen
- Next:
Problem in installing asyn4-19 in mint13 system Priyabrata Jenamani
- 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
·
|