LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert XY graph data to type "signal in" for plot

Solved!
Go to solution

Hello. i want to convert two xy waveforms (which are in array type) to type 'signal in' so tha ti can plot them on the same Graph using Waveform Graph.

 

I know i can use something like the "BUILD WAVEFORM"  fuction to convert my xy values to type 'signal in' and then plot then on the same waveform.

Convert_to_signal.png

 

But instead of 'dt' variable of the "BUILD WAVEFORM", i want to use the real x values of each of my xy values. Otherwise the output graph is messed up, i need specifix 'x' values.

 

 

0 Kudos
Message 1 of 7
(2,450 Views)

You can't use a Waveform Graph.

 

A waveform graph is a 1-D array of points with X values that start at t0 and increment by dT.

 

You need to use an XY Graph.  Extract the 1-D arrays out of the waveforms and combine them.  Look at the Detailed Help of an XY graph to see the various ways you can combine the data.

0 Kudos
Message 2 of 7
(2,434 Views)

Could not do it, i used matplotlyb + linux instead. Hail the opensource!

This is what i wanted to do:

The red is the one function, and the blue is the other function, both in the same graph.

plgjiknpccdjjeba.png

Here is the link of the source code if anyone is interested.

https://gitlab.com/Basilisvirus/matplotlib-functions/-/tree/master/merge_two_functions

0 Kudos
Message 3 of 7
(2,346 Views)

Hi Christian,

 

well, you can use a waveform graph too:

But I agree: a XYGraph would also be my first choice for such data displays (of Y vs X relations).

 

Why do you think you need to use an ExpressVI to create an array of waveforms/plots? (Did you even notice the explanations in the context help of the graph?)

Best regards,
GerdW


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

I tried this, the issue here is that i give a 'dt' value. My data have no constant 'distances' between them.

 

I dont know which function to use (express VI or non-express). I am actually new to labview, but i have experience on mcu programming. I was just looking for suggestions.

 

Which Graph are you reffering to?

The one i see here has no 'help' option

 

Untitled.png

 

Thanks for the suggestion/help and for your time.

0 Kudos
Message 5 of 7
(2,337 Views)
Solution
Accepted by topic author Christianidis

Hi Christianidis,

 


@Christianidis wrote:

I tried this, the issue here is that i give a 'dt' value. My data have no constant 'distances' between them.


I also used two different dt values for the plots.

When the distance between the points isn't constant you need to use a XYGraph…

 


@Christianidis wrote:

Which Graph are you reffering to?

The one i see here has no 'help' option


I mentioned the context help in LabVIEW: open it using Ctrl-H, then move the mouse over the waveform graph terminal:

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 7
(2,330 Views)
Solution
Accepted by topic author Christianidis

This simple video is what I needed at the end, as I could not figure it out on my own. Thanks for the help everyone!

 

https://www.bing.com/videos/search?q=labview+nonlinear+curve+fit&&view=detail&mid=A58AB824BB16FF6527...

 

Two_charts_one_graph.png

0 Kudos
Message 7 of 7
(2,269 Views)