On 7/12/10 6:36 AM, PaweÅ PrÄdki wrote:
Hello,
Is it possible to choose at run-time which waveforms in the Cartesian
Plot object are visible and which are not?
Suppose I define four different inputs for such an object and want to
place four buttons which control the visibility of each of these input
waveforms. Can that be done?
I tried using the Erase option but it clears the whole object and can't
be used to choose specific waveforms.
Hi, PaweÅ.
I don't think that's possible.
A hack, if you're willing to display one waveform at a time, is to
define four Cartesian Plot objects, all of the same size, each on top of
the other. Make each plot display just one of the waveforms. Select
each plot, context-click on it, and choose Group. Create an mbbo record
in your IOC called "$(P)CartesianPlotSelection" (or whatever) and define
ZRVL=0, ONVL=1, TWVL=2, and THVL=3. Then make each grouped Cartesian
Plot object (which is now a Composite object) visible only if
"$(P)CartesianPlotSelection" matches the ID (0-3) of the particular
Cartesian Plot object. Make your buttons simply write to
"$(P)CartesianPlotSelection" the desired ID of the Cartesian Plot you'd
like to display.
If you want to actually display more than one waveform at a time
according to your button presses (i.e. making them behave more like
checkboxes), then you could extend this hack and create grouped
Cartesian Plot objects for all the combinations you want to support --
15 for all of them. You would then add extra behavior to your IOC or to
your Composite objects' calc expression for determining whether to
display the Cartesian Plot.
Lewis