Options for Working with NI LabVIEW; The MathWorks, Inc. MATLAB® Software; and M-File ScriptsWith the National Instruments LabVIEW graphical development environment, you have several options for working with The MathWorks, Inc. MATLAB software and the associated m-file scripts you may have developed in that environment. Exchanging Data between LabVIEW and the MATLAB Software EnvironmentSome options involve moving data between the LabVIEW and MATLAB software environments. Both environments offer extensive file I/O capability and can work with binary and ASCII (text) files. The two software products can pass acquired and analyzed data through file I/O, particularly in applications where the measurement and automation tasks can take place separately from the analysis. Combining FunctionalityFile I/O is not as appropriate for measurement and automation applications and other tasks that require the inline or "on-the-fly" signal processing, analysis, and math defined by m-file scripts or functions. For such applications, you can build LabVIEW applications that can invoke m-file scripts developed with MATLAB software. One way of working with m-file scripts in LabVIEW is the MATLAB script node. The node coexists with LabVIEW graphical code as a "script node," a rectangular region that you can add to LabVIEW programs and use to enter or load m-files. When the node executes, LabVIEW calls the MATLAB software to execute the m-file script. LabVIEW MathScript is the newest alternative for working with m-file scripts in LabVIEW. Unlike the MATLAB script node though, MathScript adds native m-file script support to LabVIEW - you do not need additional third-party software to compile and execute your m-file scripts. For more information about MathScript, please refer to the Inside LabVIEW MathScript resource listed in the "Additional Resources" section below. MATLAB® is a registered trademark of The MathWorks, Inc. Additional Resources |
