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: 

using .mat as a control in LABVIEW

Hi everyone

 

I am interested to use .mat data as  a control in my LABVIEW program.

 

As a simple program, if I display control value on any indicator I use only one control and one indicator. Now I am interested that control value would be the same value as it is on .mat data stored any directory.

 

Thanks

Best Regards

Muhammad Abul Hasan

0 Kudos
Message 1 of 6
(2,234 Views)

Are you referring to Matlab .mat files, or something else? There is no "control" for .mat files. There are controls to display data, but you have to read the data yourself in code and write that data to an indicator. You could create an XControl if you really wanted to.

0 Kudos
Message 2 of 6
(2,231 Views)
.mat is matlab in the form of an array (say 3 rows,2col). Rather than to input this mat data through a keyboard, I want to call the name of variable in the control. Actually, in my case I have to change the value of control many times based on the mat data.
0 Kudos
Message 3 of 6
(2,220 Views)

So from what I understand, you want to import the variables from the Matlab workspace to LabVIEW, rather than a .mat file which would consist of Matlab script.....

Is that correct?

-FraggerFox!
Certified LabVIEW Architect, Certified TestStand Developer
"What you think today is what you live tomorrow"
0 Kudos
Message 4 of 6
(2,218 Views)
Yes this correct.
Is there any solution?
0 Kudos
Message 5 of 6
(2,215 Views)

Did you refer to Mathscript node ?

Unless there is application requirement where your matlab workspace variable values are changing dynamically with LabVIEW running in parallel, mathscript node will work.

Else, you can use ActiveX call for Matlab and poll the workspace variables in matlab.

-FraggerFox!
Certified LabVIEW Architect, Certified TestStand Developer
"What you think today is what you live tomorrow"
0 Kudos
Message 6 of 6
(2,212 Views)