If you are using a Mathworks, Inc. Matlab® supported DAQ device and would like to connect your DAQ device directly to Mathworks, Inc. Matlab®:
- Use the Mathworks, Inc. Matlab® Data Acquisition Toolbox Support Package for NI-DAQmx.
If you want to acquire or generate a single data set in LabVIEW then process the data in Mathworks, Inc. Matlab®:
- Acquire or generate your data in LabVIEW.
- Using the Write to Measurement File Express VI or using the methods shown in the LabVIEW Example Finder, write your data to a Mathworks, Inc. Matlab® compatible file type.
- Once your VI has finished running and has closed the file containing the data, open the file in your Mathworks, Inc. Matlab® program.
If you want to continuously generate data in LabVIEW and process the data in Mathworks, Inc. Matlab® on-the-fly:
- This behavior is best accomplished using a Producer/Consumer Loop.
- The Producer Loop should be used to acquire or generate your data.
- The Consumer Loop should be used to repeatedly generate a file, open the file, write a chunk of data to the file, and close the file.
- The size of the chunks of data written to each file can be set programmatically or it can be based on user input.
- Files that have been written and closed can then be processed on-the-fly by Mathworks, Inc. Matlab® while the LabVIEW VI continues to run and generate new files.