From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make programatic changes to other plots/waveforms from change to plot legend context menu

Solved!
Go to solution

Setup:

I only want to display one plot legend on the front panel for four different plots that show different aspects of the same signal.  Signals have a tendency to overlap each other and so it is beneficial to be able to toggle them off.  This context menu setting is available even after the VI has stopped running. 

 

Question:

  What is the easy way to convey that change to the other plot menus?  (I'm thinking it is related to references but can't figure out the recipe.

 

 

Other links:

This has some hints, but doesn't go far enough.  https://forums.ni.com/t5/Example-Programs/Programmatically-Change-Visible-Plots-on-Waveform-Graph-Us...

-Regards

eximo
_______________________________________________
UofL Bioengineering M.S.
Neuronetrix

"I had rather be right than be president" -Henry Clay
0 Kudos
Message 1 of 5
(2,653 Views)

Hi eximo,

 

why don't you put those 4 different aspects into just one plot? You may separate them by NaN values...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,651 Views)

I would start with an event structure that is configured for "Waveform Chart" Plot Attribute CHange".

 

It returns the plot index and ref so that you determine if was shown or hidden.

 

Then use the "Active Plot" and "Plot Visible" property for the other charts...

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 5
(2,647 Views)

I have a method that works while the program is running.  However, the context menu for a waveform works even if the program isn't running.  I'm looking for a way to accomplish this change in all the waveforms from the one context menu.

-Regards

eximo
_______________________________________________
UofL Bioengineering M.S.
Neuronetrix

"I had rather be right than be president" -Henry Clay
0 Kudos
Message 4 of 5
(2,644 Views)
Solution
Accepted by topic author eximo

@eximo wrote:

I have a method that works while the program is running.  However, the context menu for a waveform works even if the program isn't running.  I'm looking for a way to accomplish this change in all the waveforms from the one context menu.


It is easier to keep the VI running.

 

Otherwise you will have to create an XControl which is a custom control where you write the code that runs it. Not trivial. At one time the help for the XControl said it should only be developed by an architect that understand performance in LV etc.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 5 of 5
(2,639 Views)