Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017 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
<== Date ==> <== Thread ==>

Subject: Re: global variable asub type double
From: Michael Davidsaver <mdavidsaver@gmail.com>
To: Miguel Bordalo <miguel.b.fernandes@gmail.com>
Cc: EPICS Tech Talk <tech-talk@aps.anl.gov>
Date: Thu, 15 Jun 2017 17:25:10 +0200
You need to specify the type of the variable in your .dbd

>     variable(myvariable)

is a shorthand for

>     variable(myvariable, int)

then replace 'int' with 'double'.


On 06/15/2017 05:09 PM, Miguel Bordalo wrote:
> hello,
> 
> I would like to create a global variable of type double in my asub
> routine c program.
> Following the example and for an integer type if I add 
> to .c file:
>     int myvariable;
>     epicsExportAddress(int, myvariable);
> to .dbd file:
>     variable(myvariable)
> to st.cmd
>      var myvariable 60
> 
> 
> indeed the integer variable is initialized as 60 and i can change it in
> runtime. although if i change the variable to double it gives me an
> error compiling.
> 
> Ty
> -------------------------------------------------------------------------
> *Miguel Bordalo*
> 
> Licenciado em Engenharia Electrotécnica e de Computadores
> Instituto Superior Técnico
> 
> miguel.b.fernandes@gmail.com <mailto:miguel.b.fernandes@gmail.com>
> 


References:
global variable asub type double Miguel Bordalo

Navigate by Date:
Prev: global variable asub type double Miguel Bordalo
Next: MEDM to EDM Conversion Script Stubbs, Scott A.
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
Navigate by Thread:
Prev: global variable asub type double Miguel Bordalo
Next: MEDM to EDM Conversion Script Stubbs, Scott A.
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
ANJ, 15 Jun 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·