LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Matlab Dll Initialize and Terminate

Danielle,
 
Did you ever get this to work in the LV environment?  I have done this and it works fine with a exe but the DLL does not seem to ever detach from the LV process with the development environment.
 
John
0 Kudos
Message 21 of 27
(1,856 Views)

Hi,

I posted a working example with Matlab 7.0, Labview 7, and MSVC 6 in http://forums.ni.com/ni/board/message?board.id=170&thread.id=29793&view=by_date_ascending&page=3.

Hope this helps,

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 22 of 27
(1,839 Views)

Hello,

I am doing a project, trying to use dll created by Matlab compiler under Labview environment. I have obtained the dll and other files, and I didnot use wrapper, as I donot have input or output variables. 

Now I am having trouble with initialize and terminate the MCR. Could you tell also how to do this? I cannot find the two functions, mclInitializeApplication and mclTerminateApplication. I think they should be belong to one dll of matlab, but which one?

 

I am using Labview 2011 Version 11.0. and Matlab MCR v717.

Thank you for your help and any suggestion.

0 Kudos
Message 23 of 27
(1,448 Views)

Hi,

 

As far as I can recall, it should be in the same dll as your function.

 

Thanks,

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 24 of 27
(1,434 Views)

Hello,

 

I checked the dll I created, these two functions were not here. there are two functions related to my dll's initialization and termination. Before <mylib>Initialize, I should  to initiaze the Call the MCR and library initialization functions---mclInitalizationApplication. Now I am wondering where I can find this function, which dll I should call to call this function.

Thank you very any help and information.

Songpo.

0 Kudos
Message 25 of 27
(1,429 Views)

I looked at my C code, and apparently these function calls are imported from mclmcrrt.lib. They probably exist in mclmcrrt.dll, or mclmcr.dll. The init function returns an int and accepts void. The terminate dll accpets void and returns void. I'm not sure how to access it directly because I accessed it through C. Hope this helps.

 

Thanks,

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 26 of 27
(1,422 Views)

Hello Danielle,

 

Thank you very much for the infromation. I think I found it mclmcrrt7_17.dll. 7_17 is the version of runtime. In that dll, there is a function mclInitinalizeAppliation_proxy, I think this is equivalent to mclInitinalizeApplication.

After I finished the program in labview and run. There is no error, everything looks fine, but this is no output. The dll should capture live image from a USB camera, and display the image full-screen. so two toolboxes are included in that dll, imageAcquisition and ComputerVisionSystem Toolboxes. and even the camera is not running. Do you have any idea about this? I included the .m functions in the attachment, if you get a chance, please take a quick look. 

Thanks,

songpo

0 Kudos
Message 27 of 27
(1,398 Views)