LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to reuse buffers over multiple library (DLL) calls?

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

 

0 Kudos
Message 1 of 4
(3,039 Views)

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.

Regards
DianaS
0 Kudos
Message 2 of 4
(3,009 Views)

sorry wrong link:

http://zone.ni.com/devzone/cda/tut/p/id/7860

 

 

Regards
DianaS
0 Kudos
Message 3 of 4
(3,006 Views)

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

Message Edited by Ben on 04-01-2009 10:06 AM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 4
(3,004 Views)