From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Import and export data arrays from labview to matlab

Hello!
 
I don't know how to import and export data arrays from labview to matlab during a simulation. I need to use this information during he simulation to calculate other values.
 
Thank you!Smiley Wink
0 Kudos
Message 1 of 6
(5,096 Views)
Hi.

The code shown in the attached image will save a 2-d array from LabVIEW into a text file which Matlab can easily load.  In the Matlab command window or script, you use the following command to load the data into a variable with a name that matches the file name:

load tacho.dat

If you need to send the data to Matlab in "real time", that is, not waiting for the LabVIEW program to finish, you will need to use the Matlab script node in LabVIEW, found in functions>analyze>mathematics>formula.

Hope this helps.

Alejandro
Message 2 of 6
(5,087 Views)
Sorry, I forgot to attach the image...Smiley Surprised

Here it is.
0 Kudos
Message 3 of 6
(5,084 Views)

Hello, could you please explain in a bit detail.

 

0 Kudos
Message 5 of 6
(3,026 Views)

Hi nitish,

 

could you please explain in a bit detail.

As written in message #2:

The code shown in the attached image will save a 2-d array from LabVIEW into a text file which Matlab can easily load. In the Matlab command window or script, you use the following command to load the data into a variable with a name that matches the file name: load tacho.dat

Do you really think you will get good answers in a 14 year old thread?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(3,019 Views)