EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  <19961997  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  Index 1994  1995  <19961997  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 
<== Date ==> <== Thread ==>

Subject: Re: Fixed-size arrays vs. variable-size malloc'ed arrays for waveforms
From: [email protected] (Jeff Hill)
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Date: Mon, 22 Jan 96 15:36:37 MST
John,

> 	I'm trying to display a waveform using EPICS. I've gotten the state
> 	sequencer to save the data into a file, but I cannot seem to display
> 	it. Timestamps are working. I get the error message
> 
> 	sydCAFunc: error on ca_array_get_callback(GR) for WAVEFORM_ARRAY.VAL :
> 	Count requested inappropriate for that channel
> 	sydCAFuncConnHandler: error finishing connection for WAVEFORM_ARRAY.VAL
> 
> 	but the count should be initialized to zero. Does anyone have a short
> 	program illustrating the proper way  to display a waveform? Maybe there's
> 	something incorrectly set in gdct or edd. 
> 
> 	Also, do I *have* to use fixed-size arrays for waveforms? Can't I use
> 	a pointer and the C functions calloc and free to vary its size?
> 
> 	Thank you very much.
> 
> 	John Spring
> 
> 

If you are writing a new record be sure to include a routine that
converts the db address correctly (including setting the element count)
for the proxy array field.

Otherwise, try increasing the NELM field (the maximum number of elements). 
The current element count will be in NORD. The error you are getting from 
the CA client lib occurs when NELM is less than the number of elements fetched
through the CA client interface. After Deb and I looked in the code it 
appears that dm is always fetching one element in order to get the 
display limits. If NELM is zero this will fail with the message that 
you received. We could be criticized for printing a less than clear message
but otherwise the code in dm is working correctly. We will improve the 
message.

Perhaps this was working with the sequencer because the ca client lib
does not apply an array count check when events (monitors) are 
subscribed for (because the element count is returned to the
monitor call back) - and perhaps the sequencer uses only monitors
and not get call back.

Let us know if we have incorrectly identified the cause of your problem.

Jeff & Deb

______________________________________________________________________
Jeffrey O. Hill			Internet	[email protected]
LANL MS H820			Voice		505 665 1831
Los Alamos, NM 87545 USA 	FAX		505 665 5107


Navigate by Date:
Prev: Re: Fixed-size arrays vs. variable-size malloc'ed arrays for waveforms Carl Lionberger
Next: Re: request to modify db_name_to_addr for USHORT mapping Marty Kraimer
Index: 1994  1995  <19961997  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: Fixed-size arrays vs. variable-size malloc'ed arrays for waveforms Carl Lionberger
Next: Re: request to modify db_name_to_addr for USHORT mapping Marty Kraimer
Index: 1994  1995  <19961997  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, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·