07-28-2016 11:13 AM
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.
07-28-2016 11:34 AM
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.
07-28-2016 11:51 AM
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.
07-28-2016 12:01 PM
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.
07-28-2016 01:32 PM
I tried it but I am not able to get the data from sub VI for some reason. I will post the code soon.
07-29-2016 08:40 AM
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 (a.k.a. Bob_Schor)
07-29-2016 09:53 AM
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.
07-29-2016 10:23 AM
@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.
07-29-2016 02:58 PM
@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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
07-29-2016 04:04 PM
As my son Stanford would say, "Ha ha ha ha ha!"
BS