LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY Graph Datatype

Hi,

How do I change XY graph default data type?

When I make typedef of XY graph, I am unable to update array of clusters plot values using reference

Parthiban_SM_4-1711965846908.png

 

 

XY default  

Parthiban_SM_2-1711964529621.png

I need this

Parthiban_SM_0-1711964438378.png

Regards,

Parthiban

 

0 Kudos
Message 1 of 9
(333 Views)

@Parthiban_SM wrote:

Hi,

How do I change XY graph default data type?

 


There are two ways how you can do XY Multiplot graph:

snippet.png

Just connect terminal once to the correct type, then its gets changed.

 

0 Kudos
Message 2 of 9
(302 Views)

Have you tried to make it type def after you wire the array of clusters ? 

 

0 Kudos
Message 3 of 9
(275 Views)

mpg.png

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 9
(270 Views)

@Parthiban_SM wrote:

Hi,

How do I change XY graph default data type?

When I make typedef of XY graph, I am unable to update array of clusters plot values using reference

Parthiban_SM_4-1711965846908.png

 

The main problem here is that while wiring to a graph terminal will adjust to any of the supported datatypes, wiring to a value property node will not! 

 

It his case it would help to just temporarily wire the output of the build array to the graph terminal, at which time the property node will also change datatype to be compatible. (if the graph reference comes from the caller, you need to correct the caller and redo the reference input)

 

0 Kudos
Message 5 of 9
(254 Views)

Thank you all for the response. As per your suggestions, Temporarily connected the graph to change its type, after that I have created typedef, it solved my problem. I thought there might be a simple solution like changing graphs property rather doing something extra. Is there any other option or this is the only way?        

Parthiban_SM_1-1712119350221.png

 

-Parthiban

0 Kudos
Message 6 of 9
(212 Views)

@Parthiban_SM wrote:

Temporarily connected the graph to change its type, after that I have created typedef, it solved my problem. I thought there might be a simple solution like changing graphs property rather doing something extra. Is there any other option or this is the only way?    


This WAS a very simple solution and creating a typedef is not even needed for any of this.

 

All other ways would be more complicated!

 

The beauty of xy graphs is that the accept a large variety of datatypes (array of points, cluster of x and y arrays, complex 1D arrays and higher types for multiple plots). However, you cannot mix datatypes and whatever is wired to the terminal determines the type required for value property nodes, local variables, and such. It would be inconvenient having to define the type manually, just to get a broken wire later.

0 Kudos
Message 7 of 9
(183 Views)

Thanks for the details it was highly helpful

0 Kudos
Message 8 of 9
(132 Views)

Things will become more complicated if (when!) you pass the reference to subVIs.

 

The reference controls\indicators on subVIs won't automatically update their strict type.

 

So you either have to

+ replace them,

 + either manually or

 + by making the strict reference a type def, or

+ pass a non-strict reference and

  + cast it, or 

  + work with variants

 

There's not really a solution, but this isn't often a problem as long as you think about the graph's data type at the start.

0 Kudos
Message 9 of 9
(110 Views)