LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL crashing

I want to create a DLL with the attached VI. I did the same steps like in the explanations on your site (creating a DLL with LabView). The fact is I don´t know which parameters I have to enter (handle, pointers, values and so on...) so I let the default settings. The I/O of the DLL appear each time I press the + button: N, Record Length ,... and len,len2,len3 -> that do not appear in the diagram !!! What do they correspond to and how to configure them ?
Anyway I try to build the DLL and the DLL can be created. Then I put in a new VI a "Call Library Function Node", I browse my new built DLL and select the Function Name LabView crashes.
I tried to put the same name for the DLL and the function, it changes nothing.
Could you tell me how to proceed:

- for the settings selection of each parameters (should I select pointer, value, ...):
4 inputs: record length, N, Data In and
Count In
1 output: Count Out
- for the creation of a DLL that does not crash try to call the function you built.
thanks
0 Kudos
Message 1 of 3
(2,867 Views)
Have you read the using External code in LabVIEW manual? It will answer many of your questions. You will also want to look at a shipping example in LabVIEW 7 called Call Dll. It is found by going to help >> find examples >> communicating with external applications >> using external code >> integrating dlls. Do not forget to propertly set your calling convention (it is described in the manual).
0 Kudos
Message 2 of 3
(2,867 Views)
Frederic - Munchen;

I just want to make a quick comment in your code. If I understand your code correctly, you can avoid the local variables by using shift registers. The attached image labeled "Option 1" shows you how to do that.

If the control "Record Length" is the size of the array "Data In", you can further simplify your code as shown in "Option 2". If that's not true, then you need the control "Record Length".

Regards;
Enrique
www.vartortech.com
Download All
Message 3 of 3
(2,867 Views)