LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Executing MatLab script

Solved!
Go to solution

Hi guys!

 

I'm using TestStand to log a bunch of data and save them as binary files. When the test is finished I would like to run a matlab script. At the moment I do this manually, just opening MatLab and changing the path that the script uses to find the particular set of binary files from the test.

 

From what I understand you can't use the MathScript function with the base package.

 

I don't require anything more than opening mathlab/running the script in the background at at certain point in the test. Could this be done by using a system call and just passing the path as a parameter from a LabView VI?

 

Any ides to what is the best approach?

 

Thank you for your time!

0 Kudos
Message 1 of 5
(2,924 Views)

You'd be better off posting this question in the TestStand forum, since this is really a TestStand question. In fact, all of your other questions have actually been in the TestStand forum. As far as doing this using a LabVIEW VI, sure you could do it. The VI would contain just a couple of lines of Matlab code to call the script, I suppose. You could also use the Matlab COM server to call Matlab that way. That's how the LabVIEW interface works, so you can just cut out the middle-man, so to speak.

0 Kudos
Message 2 of 5
(2,908 Views)

I'm sorry I didn't make it clear that I was really asking about LabView. I didn't really need to mention TestStand at all.

 

Since I only have the base package for LabView, I don't think I can use the MathScript. I'll do a couple of searches for what you mentioned.

 

Thanks for your help!

0 Kudos
Message 3 of 5
(2,905 Views)
Solution
Accepted by topic author q-bertsuit

Ah, I understand now. Yes, the Base edition does not have the Matlab script node. In that case you could use System Exec to simply call Matlab from the command line. The Matlab documentation contains the various switches for it.

0 Kudos
Message 4 of 5
(2,900 Views)

Thanks, I got it working now.

0 Kudos
Message 5 of 5
(2,885 Views)