03-31-2009 04:55 AM
1) I pass a large buffer (>500 MByte) to a DLL call. The buffer will be filled over a long time (>10s, LabVIEW windows freezes if synchronous called) within the DLL. To get rid of this window freezing I create a new thread to do the buffer filling and return from the library call immediately.
2) With a second library function call I can test wether all data has arrived in the buffer.
3) After successful buffer filling I would like to do a third library call to get the data, but LabVIEW allocates a new buffer on each library call. So my question is: How can I reuse the buffer I have used on my first call. I have tried to pass the buffer as a handle and copied the handle of step one buffer back, but this does not work.
Are there any examples how to do this?
OS: WinXP SP3 with LabVIEW 7.1
04-01-2009 09:54 AM
For this there is in Labview 8.5 and later the in place element structure:
http://forums.ni.com/ni/board/message?board.id=170&message.id=398475
In Labview 7.1 unfortunately there is no such feature.
04-01-2009 09:55 AM
04-01-2009 10:02 AM - edited 04-01-2009 10:06 AM
Diana,
Could you please post a small example of how we can use the in-place operators with dll calls to avoid extra buffers?
The following is just thinking out loud:
In LV 7.1 an Action Engine may help with the buffer copies but I'm not sure how you would monitor the buffer filling.
AE's when set as sub-VI priority will expose a "skip if busy" property for the VI call. That feature may be useful with checking if it is done.
Done thinking out loud.
Thank you,
Ben