LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution
Highlighted

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

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.

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.

Message 1 of 7
(341 Views)
Highlighted

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

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.

Message 2 of 7
(325 Views)
Highlighted

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

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.

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

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

Message 3 of 7
(237 Views)
Highlighted

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

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 LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
Message 4 of 7
(233 Views)
Highlighted

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

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

Thanks for the suggestion/help and for your time.

Message 5 of 7
(228 Views)
Highlighted
Solution
Accepted by topic author Christianidis

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

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 LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
Message 6 of 7
(221 Views)
Highlighted
Solution
Accepted by topic author Christianidis

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

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...

Message 7 of 7
(160 Views)