LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to interface LabVIEW to Matlab?

Hallo everyone,

 

I have a function written in Matlab that does some calculations, the final result which is a number should be sent to LabVIEW to do something else. I want to know what is the best method to do this, ActiveX, TCP/IP or something else. why do I need this? because both programms were developed apart from each other, but know should be connected and it would take more time to rewrite either one in another software.

 

Thanks in advance!

0 Kudos
Message 1 of 5
(3,159 Views)

Hi Valdi

 

There is a presentation available here which discusses LabVIEW and Matlab interoperability.

There is also the 'MATLAB script node' VI available to place on your block diagram which 'calls the MATLAB(R) software to execute scripts'

 

I hope this helps solve your problem.

 

Kind Regards

 

Chris | Applications Engineer NIUK
0 Kudos
Message 2 of 5
(3,152 Views)

Thanks! but the thing is that my Matlab code is some hundred lines, sooooo it would be very difficult and tiring to put such code in a script node!

0 Kudos
Message 3 of 5
(3,140 Views)

Hi Valdi

 

Have you tried right clicking on the MATLAB script node, selecting import and choosing your matlab function file?

 

Kind Regards

Chris | Applications Engineer NIUK
Message 4 of 5
(3,127 Views)

Ive tried but it doesnt help. My matlab code is extremely complicated its all about fuzzy logic stuff and the labview program communicates with a microcontroller to control a pump.

 

to make it simple, Ive 2 programms one in Labview and the other in Matlab, i want to give the inputs of the "matlab code" in LabVIEW, then matlab code works, then the result is delivered to Labview to do sth else. does anybody have any idea how to do this or is it even possible?

 

 

0 Kudos
Message 5 of 5
(3,017 Views)