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  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 
<== Date ==> <== Thread ==>

Subject: Re: CSS BOY Dynamic Strip Charts with Macros
From: "Kasemir, Kay" <kasemirk@ornl.gov>
To: Alex Dunn <ajd@anl.gov>, "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Cc: "bryan@bryanorr.net" <bryan@bryanorr.net>
Date: Wed, 1 Aug 2012 08:58:50 -0400
I believe there's Option 5:
Create an XYGraph with all 4 channels, then change the visibility of those individual traces.
A rule connected to the PV of a combo box could decide which trace is visible.

Visibility has only been added recently to the XYGraph, so you'll have to get the latest.

Thanks,
-Kay

From: Alex Dunn <ajd@anl.gov<mailto:ajd@anl.gov>>
Date: Tuesday, July 31, 2012 17:17
To: "tech-talk@aps.anl.gov<mailto:tech-talk@aps.anl.gov>" <tech-talk@aps.anl.gov<mailto:tech-talk@aps.anl.gov>>
Cc: "bryan@bryanorr.net<mailto:bryan@bryanorr.net>" <bryan@bryanorr.net<mailto:bryan@bryanorr.net>>
Subject: CSS BOY Dynamic Strip Charts with Macros

There are 4 channels of data, but I want only one XYGraph on screen.  To flip through the channels on this single strip chart, I thought of several options.

PV's are named in the fashion $(TS)STATS0:S$(CH)_ampl
$(CH) takes values 1,2,3,4 to indicate the 4 channels.

The .opi I am working on can be downloaded here<https://raw.github.com/kienjakenobi/storage/master/css-boy/front.opi>.

Option 1
Use a combo box to change the value of $(CH) for each combo box selection.  This will not work because it is explained here<http://www.aps.anl.gov/epics/tech-talk/2010/msg01036.php> that, "the macros property cannot be changed via script during runtime. It is only loaded once during opi startup."

Option 2
Create a different .opi file for each channel.  The channel number is then hardcoded into each PV of each widget in each .opi.  This is extremely inelegant and very hard to maintain.

Option 3
Use rules to change the PV of the strip chart.  See a screenshot of my rules setup here<https://github.com/kienjakenobi/storage/raw/master/css-boy/rules.png>.  This works if I remove $(TS) from the output expression of the rule.  It appears that rule output expressions do not evaluate macros.  This can be seen here<https://github.com/kienjakenobi/storage/raw/master/css-boy/unresolved-pv.png>, where I ran the .opi and right clicked --> PV Info.  You can see "$(TS)" in the PV's name.  If correctly substituted, this should say whatever value I have $(TS) set at.  I have $(TS) defined both in my global preferences and on my root grouping container.  Unless I have made a mistake that is preventing macro evaluation, this will not work because there must be at least the $(TS) macro on every PV.

Option 4
Use an action to reopen the same .opi with $(CH) redefiend.  This works, but not with a single combo box.  I do not see how to assign a different action to each item of a combo box.  Hence, I must use one action button for each channel.  Furthermore, this inefficiently reloads the entire screen and has the negative side effect of wiping the history of the strip chart.  However, this is the only usable solution at the moment.

Also note that the strip chart plots 4 PVs, and there are other widgets which must also respond to the change in channel selection.  Hence, any solution must be capable of handling both macros and multiple PV changes.

Thank you,
Alex


References:
CSS BOY Dynamic Strip Charts with Macros Alex Dunn

Navigate by Date:
Prev: Re: stream device string/hex parsing Gerrit Kühn
Next: Re: CSS BOY Dynamic Strip Charts with Macros Alex Dunn
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 
Navigate by Thread:
Prev: CSS BOY Dynamic Strip Charts with Macros Alex Dunn
Next: Re: CSS BOY Dynamic Strip Charts with Macros Alex Dunn
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 
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 ·