1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Converting LabView code to Matlab

  1. Jun 5, 2009 #1
    this is not actually a homework question, but as it has mostly to do with computer science, I thought this would be the appropriate place.
    At work we have a measurement setup which is currently controlled by a LabView program. My task is to move the code from LabView to Matlab. I don't necessarily need/want to convert the code directly from LabView to Matlab, there are tools for that, but instead desing a new measurement setup control program using Matlab based on the old program in LabView.
    I'm familiar with programming in Matlab, but I've never done any GUI and data acquisition stuff before. I was wondering what is the best way to do this in Matlab? For the GUI, I guess the best way is to use the GUIDE -editor, though I'm not sure if it is able to do everything that LabView does.
    Instrument control I've not even begun to think about...
  2. jcsd
  3. Jun 6, 2009 #2


    User Avatar
    Science Advisor

    In the future, you might want to ask questions like this in the Computer Science subforum (or better yet, Mathematical Software or Programming sub-sub-forums, but the distinctions get blurred there most of the time).

    Regarding the meat and potatoes of your problem, you'll need to figure out how your hardware is controlled, and whether or not there's an abstracted way of dealing with it (i.e. a high-level DLL, or driver that accepts / outputs text, or some such). As I'm more of an EE than a computer science type, I'd suggest getting core functionality going (in terms of being able to achieve basic and reliable communications) through the control line first before making a GUI, but that's probably just me.

    When I used Guide (back in MATLAB 6.5 or thereabouts), it just helped me create a (bare bones) layout; you still need to design the GUI functionality (what buttons / windows display what, and when) and write all your callbacks (stuff that happens when you click, press a button, instrument melts down, etc.)

    To complicate matters, you can call LabView and LabView functionality from MATLAB, and vice-versa:
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook