04-01-2024 05:10 AM
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
XY default
I need this
Regards,
Parthiban
04-01-2024 06:57 AM
@Parthiban_SM wrote:
Hi,
How do I change XY graph default data type?
There are two ways how you can do XY Multiplot graph:
Just connect terminal once to the correct type, then its gets changed.
04-01-2024 09:06 AM
Have you tried to make it type def after you wire the array of clusters ?
04-01-2024 09:33 AM
04-01-2024 12:13 PM
@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
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)
04-02-2024 11:54 PM
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
04-03-2024 11:53 AM
@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.
04-11-2024 04:10 AM
Thanks for the details it was highly helpful
04-12-2024 06:57 AM
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.