LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Matlab DLL vs Matlab script in LabView

Hello,
 
     I have some question for those who successed to import the Matlab DLL's to  LabView  Smiley Happy :
 Is there significant time difference between processing the matlab routine thru the DLL  and between the Matlab script in LabView ?
 For the  RT   program that I am doing in LabView the time is very impotent, and as I  measured , the code writen  in Matlab script
 takes 10 times more then the same  C  code using DLL  ( 20ms.  vs 2ms.) . As I understand, importing DLL from Matlab to
 LabView is not so easy,  so before I "step at the deep"  I would like to ask, if I would have the  shorter time in Matlab DLL, than in Matlab script?
 
 Thanks
  Michael Shklyar
  
_________________________________________________________________________________________________
LV 8.2 at Windows & Linux


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

Hello Michael,

Are you actually running this application in the LabVIEW Real-Time OS?  The Matlab Script uses ActiveX calls and only works on a Windows Operating System.  Calling the dlls in Call Library Function Node would be a more difficult that using the Matlab Script Node.  You will need the function names in the dll as well as the parameter list. 

Good luck  

Steven T.

0 Kudos
Message 2 of 4
(3,219 Views)
Hello Steven,
 
Yes, we are using Windows. About the dll's - I am using it right now, but written at C.
About Matlab: it`s very nice idea to use tha Matlab mathematical power instead of writing the basic (FFT for example) algorithm at C,
 but  as I understand it`s not trivial to import the Matlab dll to LabView.This why I have  question about the time of execution. Smiley Happy
 
Thanks,
Michael Shklyar
_________________________________________________________________________________________________
LV 8.2 at Windows & Linux


0 Kudos
Message 3 of 4
(3,199 Views)

mishklyar,

That is a great question.  DLLs will be run in the runtime environment of the program that created them.  So calling the DLL in C will give you a good idea of the performance of the DLL.  When calling the same DLL in LabVIEW, you should get similar behavior with regards to speed.  So in short, you should see a performance increase by calling the DLL compared to your current method.

I hope this helps,

Steven T.

0 Kudos
Message 4 of 4
(3,178 Views)