LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Active x for Mathematica

I am trying to use Labview to call another program called Mathematica and then Run the Mathematica notebook. So far I have been able to call and open the Mathematica notebook using Labview "System Exec.vi" but I have not been able to Run the notebook. I am having trouble trying to figure out how the Mathematica options for the command line can be used.

I also tried to use Active X with "Automation Open" but I cant seem to find the proper reference for Mathematica for this vi. Any suggestions?

0 Kudos
Message 1 of 11
(4,296 Views)

You have given us a specific step.  What are you actually trying to do.  If we understand that, we can likely help you find an easier way.

0 Kudos
Message 2 of 11
(4,293 Views)

I am trying to open a Mathematica file and evaluate the notebook using Labview. In other words I am trying to use Labview to open the Mathematica file and then tell Mathematica to Evaluate the notebook (Go to Evaluation then go to Evaluate Notebook).

0 Kudos
Message 3 of 11
(4,285 Views)

What makes you think that Mathematica supports ActiveX?  True, in 2003, someone presented a talk on "Mathematica for ActiveX" (which they named "MAX" -- I hope NI sued them), but given that Microsoft, itself, has largely abandoned ActiveX, this is probably not the way to go.

 

This is much more a Mathematica topic than one for LabVIEW.  You can run Mathematica in "Script" mode (using "m files" -- can't these guys come up with better names?), as discussed on the Web and within Mathematica itself.  Start there.  It doesn't look at all easy to me.

 

Bob Schor

0 Kudos
Message 4 of 11
(4,261 Views)

Well I also mentioned that I was able to call and open Mathematica using the Labview "System Exec. vi" . I run into a problem when I try to tell Mathematica to evaluate the notebook. I would prefer to use Labview to call Mathematica because I have created a Labview software to drive a motion control driver and to acquire data from a detector at the same time. But I use Mathematica to post process the data that is acquired. What are your thoughts on using "System Exec.vi"?

0 Kudos
Message 5 of 11
(4,252 Views)

By the way Bob I was referring to Mathematica not MatLab

0 Kudos
Message 6 of 11
(4,245 Views)

I am not familiar with Mathematica's command line, but typically you would need to pass parameters in the standard input of SystemExec.vi, such as the notebook name (and read the result in the standard output if that's even possible). Most likely you will need to have your notebook generate some kind of file to read or open later on.

Check this StackExchange thread which seems to be dealing with that question: http://mathematica.stackexchange.com/questions/30310/command-line-execution-of-mathematica-notebooks...

0 Kudos
Message 7 of 11
(4,231 Views)

I am perfectly aware that you were referring to Mathematica, which calls its script files "m files".  From a Wolfram Help Document:

 

"A Wolfram Language script is typically written as a file with extension .m in the Wolfram Language source format."

 

Bob Schor

0 Kudos
Message 8 of 11
(4,198 Views)

unfortunately the link failed to load but I will try to search the site for help. Thanks

0 Kudos
Message 9 of 11
(4,155 Views)

That's strange, it still works fine for me.

I am attaching a PDF of that page if that can help.

0 Kudos
Message 10 of 11
(4,148 Views)