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  2012  2013  <20142015  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  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Using a Waveform record (char type representing a String) as input to an aSub record
From: Andrew Johnson <[email protected]>
To: <[email protected]>
Date: Mon, 10 Mar 2014 12:24:57 -0500
Hi David,

On 03/10/2014 11:27 AM, David Michel wrote:
> I'm using a Waveform record of type char to represent a string (not
> using a  Stringin or Stringout record since this string has more than 40
> characters).
> 
> That works well and I can easily put a string into this record such with
> caput -a and read it back with caget -s

You can also use the -S option (upper-case S) to caput and caget which
was added for long string support.

> Now, I need to use this string in an aSub record but I'm having
> difficulties in doing so.
> 
> char ** myString;
> myString = (char **) precord->a;
> printf("%s\n",myString);
> 
> The results of the printf statement shows only the first character of
> the string in ASCII.
> 
> Any idea of I can solve this?

How is your asub.A field configured, i.e. what have you set FTA and NOA
to? They should match the waveform record, FTA=CHAR and NOA=256 or
whatever your waveform string length is.

- Andrew
-- 
Advertising may be described as the science of arresting the human
intelligence long enough to get money from it. -- Stephen Leacock

References:
Using a Waveform record (char type representing a String) as input to an aSub record David Michel

Navigate by Date:
Prev: Using a Waveform record (char type representing a String) as input to an aSub record David Michel
Next: Re: Using a Waveform record (char type representing a String) as input to an aSub record Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Using a Waveform record (char type representing a String) as input to an aSub record David Michel
Next: Re: Using a Waveform record (char type representing a String) as input to an aSub record Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·