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  2009  2010  2011  <20122013  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  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: problem passing string to aSub record parameter
From: "Jim Chen" <[email protected]>
To: <[email protected]>
Date: Fri, 28 Sep 2012 14:49:23 +0100

Can anybody help please -- passing STRING to aSub record parameter field doesn’t seem to work.

 

My aSub record

 

record(aSub,"TRANSMIT")

{

                field(INAM,"myfunctionInit")

                ……

                field(INPA,"Test string")

                field(FTA,"STRING")

                field(NOA,"20")

                ……

}

 

myfunctionInit(aSubRecord * pSub)

{

……

                char test[40];

                strcpy(test, (char *)subr->a);

 

printf("Text: %s\n", test);

                ……

}

 

The printf statement doesn’ t print anything. When I check the length of the ‘test’ variable, it is always 0.

 

Have I done wrong?

 

Thanks,

Jim

 


Replies:
Re: problem passing string to aSub record parameter Tim Mooney
Re: problem passing string to aSub record parameter Andrew Johnson

Navigate by Date:
Prev: camon: multiple servers found? Laznovsky Michael
Next: Recall: problem passing string to aSub record parameter Jim Chen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: camon: multiple servers found? Laznovsky Michael
Next: Re: problem passing string to aSub record parameter Tim Mooney
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·