LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interface LabVIEW and matlab

Solved!
Go to solution

Hello, I want to interface LabVIEW with MATLAB using TCP/IP for data transfer. Can anyone, please give me a step-by-step instruction to how to do this? Or else can you point out where I can get them? Thanks.

0 Kudos
Message 1 of 3
(3,409 Views)
Solution
Accepted by topic author SANCHU

Hi Sanchu,

 

As TCP/IP is such a generic protocol then you should be able to fairly easily build TCP/IP interfaces for both your LabVIEW and Matlab code and transfer data using ASCII, or variants etc depending on what sort of data you are trying to transfer. I'm not too familiar with Matlab, but on the LabVIEW end there are some very good TCP/IP server and client examples that ship with LabVIEW.

 

Another option that you may want to consider, and the reason I'm answering this is that I've recently done a project whereby we took some legacy Matlab code which we wanted to transpose into LabVIEW so that we could then fully automate a test system we have using TestStand. Much of it we were able to derive LabVIEW equivalent functions, but for some functions where LabVIEW didn't appear to have a suitable equivalent, or where it was simply more efficient, we simply copy and pasted the Matlab code into either in the first instance MathScript nodes (not dependant on Matlab) or Matlab script nodes (which will hopefully return to at a future date to fully transpose over to LabVIEW so that we are no longer dependant on a Matlab licence).

 

In both instances the relative ease of doing this was very impressive, and we were able to wrap huge amounts of Matlab code within LabVIEW with very few issues. As an idea, have you considered wrapping your Matlab functionality in this way and then keeping all the TCP/IP client and server comms within LabVIEW?

 

N.B. if you haven't found it search the palette for 'Matlab Script'

 

Best of luck,

 

David

David Clark
CLA | CTA
Genesee Technologies Ltd
Hampshire, England
0 Kudos
Message 2 of 3
(3,370 Views)

thanks David...

0 Kudos
Message 3 of 3
(3,329 Views)