LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing data to a labview dll from a C program

Hello,
 
Can I pass data from a C (or C++) program to a labview DLL. The data is to be "streamed" to the labview dll in order for the latter one to process it and eventually plot it.
Is this possible?
 
I have looked at an example that shows a labview dll used to acquire, analyze, and present data. Link: http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=D6463414BBFF1646E034080020E74861&p_...
 
The example is ok, however, my problem is with the acquire part. I wanted to know if there is a labview function that would receive the data that my C (or C++) program generates. I don't have the option of saving the data to a file, then making labview read from that file. I need labview to get the data from C in a a "real time"manner.
 
Thanks in advance
 
0 Kudos
Message 1 of 2
(2,636 Views)

Hello!

 

It is possible to create arrays of data in your C program and pass that data to your LabVIEW DLL.  In order to do this you will need to set up your LabVIEW DLL to receive the data via data pointer which means you will have to pass the array length along with the pointer to the array.  I urge you to be extremely careful if you intend to resize the array data in your C program as you will need to make calls to the extcode functions.  Hopefully the following link helps out.  Please let us know if you have further questions!

 

 

https://www.ni.com/docs/en-US/bundle/labview/page/using-arrays-and-strings-in-the-call-library-funct...

 
Travis M
LabVIEW R&D
National Instruments
0 Kudos
Message 2 of 2
(2,619 Views)