Converting LabView code to Matlab

  • Thread starter Thread starter Jopi
  • Start date Start date
  • Tags Tags
    Code Matlab
AI Thread Summary
The discussion focuses on transitioning a measurement setup from LabView to Matlab, with the intent to design a new control program rather than directly converting the existing code. The user seeks guidance on creating a GUI in Matlab, considering the GUIDE editor, while also needing to understand instrument control and hardware communication. It is suggested to prioritize establishing reliable communication with the hardware before developing the GUI. Additionally, there is a mention of the possibility to integrate LabView functionality within Matlab. Overall, the conversation emphasizes the importance of understanding both software environments to effectively manage the transition.
Jopi
Messages
11
Reaction score
0
Hi,
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...
 
Physics news on Phys.org
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:
https://www.physicsforums.com/showthread.php?t=308217
 

Similar threads

Replies
3
Views
3K
Replies
5
Views
2K
Replies
4
Views
2K
Replies
3
Views
3K
Replies
11
Views
6K
Replies
3
Views
1K
Replies
12
Views
3K
Back
Top