LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

export/process data in C

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?

0 Kudos
Message 1 of 6
(3,273 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(3,254 Views)

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.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 3 of 6
(3,243 Views)
It's probably only really complicated and cumbersome for an inexperienced LabVIEW programmer:-)
0 Kudos
Message 4 of 6
(3,236 Views)

   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.

 

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 5 of 6
(3,211 Views)

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

 

http://www.ni.com/white-paper/7572/en/

0 Kudos
Message 6 of 6
(3,207 Views)