EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: user-supplied functions
From: Benjamin Franksen <[email protected]>
To: [email protected]
Date: Wed, 27 May 2009 11:07:45 +0200
On Tuesday 26 May 2009 21:10, Patrick Thomas wrote:
> Is it possible to create a function in snl which takes the names of
> process variables and does pvGet and pvSet on them?

Depends on what you mean with "names" (of PVs). This is a quote from the 
seqencer documentation (2.0.12, page 32):

"""
The built-in SNL functions such as pvGet cannot be directly used in 
user-supplied functions. However, most of the built-in functions have a C 
language equivalent, which begin with the prefix seq_ (e.g. pvGet becomes 
seq_pvGet). These C functions must pass a parameter identifying the calling 
state program, and if a database variable name is required, the channel 
index of that variable must be supplied. This channel index is obtained 
from the pvIndex function. Furthermore, if the code if complied with the +r 
option the database variables must be referenced as a structure element as 
described in “Variable Modification for Reentrant Option” on page 33. 
Examination of the intermediate C code that the compiler produces will 
indicate how to use the built-in functions and database variables.
"""

HTH
Ben
-- 
"TDD replaces a type checker in Ruby in the same way that a
strong drink replaces sorrows."       (byorgey on #haskell)

Any text below this line has automatically been added by the
mail server and does not necessarily represent my personal opinion.
-------------------------------------------------------------------


References:
user-supplied functions Patrick Thomas

Navigate by Date:
Prev: Re: How to use process variable Mauro Giacchini
Next: Re: R3.14.9 access security and "no read access" w/caget John A. Priller
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: user-supplied functions Patrick Thomas
Next: CA.pm Pam Gurd
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·