LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

building a dll in LabVIEW

I'm facing more than one problem with building a dll in LabVIEW 7.1.
 
problem 1:
I need to write an application which downloads a binary file (0.5 MByte ... 2 MByte) to a UUT by means of a serial protocol word for word. When I write the VIs the profile window shows me it can be done in less than 3 minutes (Total time of the HpbHsslDomoTransfer.vi). But instead of the 3 minutes it actually takes more than 30 minutes. No other programs than LabVIEW is running.
Who can explain this difference to me?
 
problem 2 and 3:
All the VIs in this project are written almost exactly as the functions written in a Delphi dll. When I try to build the VIs in a shared lib. I cannot get to run it properly because the other dll that is called runs apparently in a different thread. I've put all VIs in the data acquisition thread, played with some priorities, but still nothing works. When I initialize the board seperately and then run the dll, the returned error states that the board isn't initialized. So two problems: How to create a dll in LabVIEW that runs as fast as the Delphi dll and how to get the calls to the layer beneath (hssl32.dll) properly?
 
problem 4:
When I build a shared lib. from the HpbHsslDomoTransfer.vi, it seems like the dll calls the subVIs as subVIs and not as part from the dll. I cannot open the subVIs during run -time of dll.
 
 
Help please, Miranda
 
0 Kudos
Message 1 of 2
(2,615 Views)

Hi Miranda,

Problem 1.

What is type of bus you are using to transfer the data, and what is the speed of this bus? These factors mainly determine the time it takes to move the data.

Problem 2&3:

This is probably because the DLL is not thread safe. It is not possible to cal the DLL from different threads. Even if you have them in the same execution system 'data acquisition' the VI can still run in different threads in side the 'data acquisition' execution system. To resolve this you can force the DLL to be called from the UI thread by setting this in the Call Library Node configuration.

Problem 4:

Do you mean that you would like to see the Front Panel of the 'HpbHsslDomoTransfer.vi'? To show the Front Panel of the VI when it is called inside the DLL you will need to set the Show Front Panel When Called property (Right-click on the VI icon in the upper right of the window and go to VI Properties» Window Appearance»Customize)

Hope this helps

Regards

Karsten

0 Kudos
Message 2 of 2
(2,557 Views)