LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW and C code

Hi

 

I'm working on a project, where I have to capture images from an external USB cam with NI-IMAQdx and export them as 10 frames/sec (10 arrays/sec). The problem is that, my group member on this project, has to capture those 10 array/sec using C-language from me. Is there any method in LabVIEW to export 10 arrays/sec into a C-code ?. If not, is there an another method I can use ?

 

Thanks in advance

Best regards

Oesen
0 Kudos
Message 1 of 15
(3,849 Views)

Hi,

 

If you have Application Builder, you can compile your LabVIEW code into a DLL and call that from your C program: https://www.ni.com/en/shop/labview/can-labview-c-.html

Certified LabVIEW Developer
0 Kudos
Message 2 of 15
(3,829 Views)

Thanks for the reply JKSH

 

Do you know whether it is possible to export data to a DLL continuously ?

Best regards

Oesen
0 Kudos
Message 3 of 15
(3,821 Views)

Yes. Your C program will just have to call the relevant LabVIEW subVI (function) continuously.

 

Alternatively, you can compile your C program into a DLL and make LabVIEW call a C function continuously for image processing.

 

Be aware though that the maximum frame rate you can achieve will depend on the size of your frames and the speed of your processor.

Certified LabVIEW Developer
0 Kudos
Message 4 of 15
(3,814 Views)

Doh.. My university doesn't have a license for Application Builder. What about exporting my arrays to a .csv file continuously and capture the data from that file with C ?

Best regards

Oesen
0 Kudos
Message 5 of 15
(3,804 Views)

Yes you can do that, but synchronizing the data between read and write will be an issue, Take precaution there

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 6 of 15
(3,802 Views)

We're talking about exactly this add-on ?. If yes, then it is installed and activated

 

 Untitled.png

 

Best regards

Oesen
0 Kudos
Message 7 of 15
(3,799 Views)

Yes, it looks like you have the required license 🙂

 

I don't recommend exporting to .csv files if you need to transfer 10 frames per second (that's very fast, so it's difficult to synchronize). DLLs will be more reliable.

Certified LabVIEW Developer
0 Kudos
Message 8 of 15
(3,791 Views)

Hi!

A second option could be to stream the data via TPC/IP.

Your Labview program could act as a server, the C program as a client connecting to a server and receiving the stream.

 

Regards,

Marco

Message 9 of 15
(3,774 Views)
Hi Marco. But I still need to translate it to C ?
Best regards

Oesen
0 Kudos
Message 10 of 15
(3,749 Views)