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: histogram record and CSS XY Graph
From: "[email protected]" <[email protected]>
To: "Kasemir, Kay" <[email protected]>
Cc: "<[email protected]>" <[email protected]>
Date: Mon, 13 Oct 2014 21:36:56 +0200 (CEST)

Hi,
I just tried to define a const://array in CSS in order to plot X axis with
a different PV but the problem is always the same, the histogram 'store'
values correctly but when you plot it X axis refers to 'index' of array;

just to be more clear imagine that you want to plot a temperature
histogram where lower bound is -30 and upper bound is +30 with 61 bins
(one for each temperature value);

if you store temperature value '-30' it will stored in histo[0]
if you store temperature value '0' it will stored in histo[30]
if you store temperature value '+30' it will stored in histo[60]

well, if you plot this histogram in CSS with XYgraph widget you will
see X axis starting from 0 to 60 with three little bars located at start
in the middle and at end of graph; the problem is that X axis value is
the 'index' and not the 'value' of the temperature. I'm looking for a
method to display 'value' with a X-axis between -30...+30;

Thanks in advance,
Gennaro

On Mon, 13 Oct 2014, Kasemir, Kay wrote:

Hi:

Just as you produce the data for the "Y" axis on the IOC in a histogram record, you might want to generate the data for the "X" axis in a record on the IOC as well.
Then configure the XY Graph widget to show those X and Y records.

To generate arbitrary "X" waveforms on the IOC, you may be able to use a "compress" record fed by a calc that counts from your desired start to end value, but otherwise I've used a genSub/aSub record for that.

Thanks,
Kay


On Oct 13, 2014, at 9:48 AM, "[email protected]" <[email protected]>
wrote:
Hi,
I'm using a 'histogram' record to store some values:

record(histogram,"$(P):noisefloor") {
  field(DTYP,"$(D)")
  field(DESC,"LTC2499 noise floor")
  field(SCAN,"1 second")
  field(SVL,"$(P):microvolt:CH0")
  field(ULIM,20)
  field(LLIM,-20)
  field(NELM,100)
}

as you can see number of bin is 100 and values are from -20 to 20;

I'm able to create a histogram on CSS starting from XY Graph widget, but
X axis reports values from 0 to 100. Is there a script in order to display
values from -20 to 20 ?

If I set 'Minumum' and 'Maximum' properties of "Primary X Axis" to -20 and
20 the graph is empty because values are plotted by histogram index and not by histogram value... (e.g. value 0 -> position 50)

Thanks in advance,
Gennaro

--
Gennaro Tortone
INFN Napoli
Italy
tel: +39 81 676169

"Computer Science is no more about computers
   than astronomy is about telescopes."
   - Edsger Dijkstra




--
Gennaro Tortone
INFN Napoli
Italy
tel: +39 81 676169

"Computer Science is no more about computers
    than astronomy is about telescopes."
    - Edsger Dijkstra

Replies:
Re: histogram record and CSS XY Graph Kasemir, Kay
References:
histogram record and CSS XY Graph [email protected]
Re: histogram record and CSS XY Graph Kasemir, Kay

Navigate by Date:
Prev: Re: histogram record and CSS XY Graph Kasemir, Kay
Next: Re: histogram record and CSS XY Graph Kasemir, Kay
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: Re: histogram record and CSS XY Graph Kasemir, Kay
Next: Re: histogram record and CSS XY Graph Kasemir, Kay
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 ·