LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display Data Information from 2D array and show in graph

I have a file of captured data which is in the form of signed short* sample {n}. It is a 2D array data. I need to plot graph of data vs. time. I have the information of sampling rate and time interval. Another thing is that this data is located in another Sub VI which is being used in main project. How can I retrieve this information.

0 Kudos
Message 1 of 13
(3,364 Views)

We'll really need to see some example code (not pictures). Please save for 2012 if you'd like me to look at it.

 

You mention that the data is in a file and in a SubVI, which one is it? If all of your time axes are exactly the same, you can get away with a Waveform graph, otherwise you'll want an XY graph. It is a little tricky to get multiple plots on an XY graph, (you have arrays of clusters of arrays), but the help does explain it. 

 

If you want to modify a front panel object from a SubVI, you pass the reference into the SubVI. If you want to get the data from a SubVI into the top-level, you pass it as an output from the SubVI.

 

 

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

 So the data is saved in a file and a sub VI is created to get that data information and then convert to binary format. Then the same sub VI has the data information so it is being used in the main project to retrieve that data info and convert from binary format and show it in graph. The problem is I know where is the data I just don't know how to retrieve in the main project. I will try to add the example code.

0 Kudos
Message 3 of 13
(3,339 Views)

This is an example to take an array of data out of a SubVI, and plot it on an XY graph. Notice in index array that the index is wired to the column, not the row, which is why the index of 0 is necessary in this case. Full project attached.

 

Plot Data.png

Message 4 of 13
(3,336 Views)

I tried it but I am not able to get the data from sub VI for some reason. I will post the code soon.

0 Kudos
Message 5 of 13
(3,312 Views)

We are looking forward to your posting code (meaning things we can examine and execute, not static pictures).  Believe it or not, I did not create this Snippet, but copied it from Hooovahh ...

Bob Schor is not pleased.png

Bob Schor (a.k.a. Bob_Schor)

Message 6 of 13
(3,294 Views)

Actually the problem all that code is confidential and I am not supposed to share it that's why I am not able to post the whole code.

0 Kudos
Message 7 of 13
(3,282 Views)

@studentgirl wrote:

Actually the problem all that code is confidential and I am not supposed to share it that's why I am not able to post the whole code.


Try simplifying it, and changing control and indicator names until it's not confidential. 

0 Kudos
Message 8 of 13
(3,276 Views)

@Bob_Schor wrote:

Believe it or not, I did not create this Snippet, but copied it from Hooovahh ...


And believe it or not I did not create this Snippet but have been copying it from this post by James.

 

http://forums.ni.com/t5/LabVIEW/input-terminal-configuration/m-p/3199107#M927339

 

I always thought you made it and he copied it from you.

0 Kudos
Message 9 of 13
(3,259 Views)

As my son Stanford would say, "Ha ha ha ha ha!"

 

BS

0 Kudos
Message 10 of 13
(3,255 Views)