LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmitcally adding annotations to a graph stored in a cluster

Solved!
Go to solution

Hello! 

 

I have a cluster that contains a waveform graph. I would like to take this cluster and input it in a SubVI and have the SubVI add markers to that graph that is stored in the cluster. The reason for this is that I would like to easily pass around this annotated graph in my code for later report generation. 

 

I am having trouble "saving" the annotations to the graph that is stored in the cluster. I have tried this which does not seem to work. 

marker creation.JPG

 

The annotations are generated correctly, and when I look at the front panel of this SubVI i see the graph with the proper annotations. But, when I wire this graph to an indicator elsewhere in my program, the annotations do not show up. Refrences are not my forte, and this was my best slapped together attempt. Any ideas?

 

Thanks!

-Paul

0 Kudos
Message 1 of 2
(2,266 Views)
Solution
Accepted by topic author PaulSammut

Hi Paul,

 

You will definitely want to use a reference here so that the subVI is modifying the property of the specific graph you want i.e. the graph from your main VI.Currently you use an implicit property node (the AnntList with the orange bar), which only modifies the graph in the subVI. This is because an implicit property node modifies a control by name, and that name is only recognized within that specific VI.

 

To create a reference, you would just right-click on the graph in your main VI and go to Create>>Reference. This reference will be what you pass in to your subVI.

 

As a side note, you want to make sure you don't overwrite previous annotations every time you write to the AnntList property. I would suggest using an explicit property node in the subVI that you then read the current value from AnntList, and then append/modify the specific parts you want, and then write to AnntList at the end.

 

Hope this helps!

Rahul B.
0 Kudos
Message 2 of 2
(2,227 Views)