LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event Handling in labview with arrays as event data

Attaching the code that crashes....

0 Kudos
Message 11 of 12
(485 Views)

Ok, so ive got a small update on this. After digging a lot i have realized that passing clusters containing arrays (float array for example) to & fro between a C dll and a Labview App is not possible (Unless there is some way to do this that i have'nt come accross yet in all my google searchees). In particular i had a look at this link "https://decibel.ni.com/content/thread/6033" and the array data (array in the dll) is accessed using a reference and dereferencing the pointer to get the actual data.

 

I wanted todo something similar but ran into another implementation problem. The event data in my Labview Application gets queued and then plotted. Events come in think and fast and at times based on priority the plotting will be delayed. Hence i cannot use the same pointer for all the events. It has to be seperate pointers since using the same pointer would come along with the risk of overwriting data that has not been plotted.

 

Now using a seperate pointer for each event (Sending the pointer to the dll, performing memoory allocation, copying the data, then dereferencing the pointer to get the data in the lanview application & finally freeing the memory) seems to be a huge task.

 

Hence for now i am using 10 independant float variables in a cluster to get the event data into labview and soon as the event is received i build an array out of the data and perform all futhur manipulations uisng the array (just like i wanted to). This seems to be the best way for now...

 

However i still have a feeling that there may be something i am missing... Any pointers would be of great help.

 

Thanks in advance,

Abel.

0 Kudos
Message 12 of 12
(464 Views)