09-16-2015 02:48 AM - edited 09-16-2015 02:49 AM
I have acquired data using DAQmx system at a frequency of 40Hz. Now I want to process the data that's acquired. Unfortunately, the calculation is really complicated and will only be cumbersome if done in LabVIEW's diagram. I know LabVIEW is written in C, so when it gives me the acquired data, it must be stored somewhere in the dark (most likely in C). I'd like to access it so that i can have more flexibility on what I do about that data.
So is there a way I can "export" the raw data somehow?
09-16-2015 03:16 AM
Hi XDu,
I know LabVIEW is written in C
Are you sure?
stored somewhere in the dark (most likely in C)
Data is stored in RAM - until it is disposed…
So is there a way I can "export" the raw data somehow?
Yes, there is a way!
When you want to "export" data the usual way is to save those data to files…
09-16-2015 03:48 AM
You can also create a DLL that contains your C functions and then call that from within LabVIEW.
You can also use things like formula nodes, SubVIs or even run mathscript on your data from within LabVIEW itself.
09-16-2015 03:53 AM
09-16-2015 08:32 AM - edited 09-16-2015 08:35 AM
I know LabVIEW is written in C
It's mostly written in C++, aside from intrinsicacies like parts of the MacOS X version which are likely written in Objective C.
so when it gives me the acquired data, it must be stored somewhere in the dark (most likely in C).
the data is stored in memory and that is completely independent on the programming language used to write an application
I'd like to access it so that i can have more flexibility on what I do about that data.
Look into DLLs and the Call Library node if you want to really go that path. Most likely it is not the best solution for you though unless you already have ready made C(++) code that does everything you need to do with the data.
If you need to still develop the code, it's probably easier to bite the bullet and learn LabVIEW properly. You will anyhow have to do that when using the Call Library Node, but the Call Library node simply makes your problem even bigger by adding an additional component you need to learn about. Most likely if your data manipulation code isn't extremely esoteric, LabVIEW comes with ready made functions that perform most of the things you need with a few mouse clicks compared to interfacing to analysis libraries for things like FFT, Differenential Equation and what else. And while you have to worry about invalid pointer references in C(++) all the way you can simply concentrate on the actual algos in LabVIEW without worrying about General protection fault errors because you happend to not resize the array pointer properly.
09-16-2015 08:36 AM
@XDu wrote:
Unfortunately, the calculation is really complicated and will only be cumbersome if done in LabVIEW's diagram
So don't do it in LabVIEW's diagram.