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.
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.
08-22-2011 10:58 AM
I am trying to create a .mat file in LabVIEW using the Matlab dataplugin. It appears to create a group called "Vector" without being told to, and it also concatenates group and channel names together. I have made an example to demonstrate this behaviour. I am trying to create a group called "Group" and inside it a channel called "Channel". What I get looks like a group called "Vector" and inside it a channel called "GroupChannel". What am I doing wrong?
Best Regards,
John Sackett
Solved! Go to Solution.
08-24-2011 09:28 AM
Hello John
Thank you for getting in touch regarding your issue. I am an applications engineer here at National Instruments, as I understand you are using the data plugin for Matlab within LabVIEW, but as shown with your code when you label the channel or group you get an outcome which you don't expect.
I have opened and had a look at your code and can see where the issue is arising. The functions you are using are normally used with TDM files, .MAT files are compatible but there are a few differences between the file formats, which is why you are getting the outcome we have seen. A TDM file has headers named channelgroup and channel, but Matlab does not have the channelgroup header in the file type and therefore the functions in LabVIEW merge the 2 strings to the available header.
I am not able to open your .MAT file so could you give me a brief description of what occurs inside Matlab?
Have you looked into using the script node to allow for .MAT file types in LabVIEW? Here is the help file
I have also found some resources which you may find useful.
Let me know if you would like any further information
Regards
08-31-2011 02:55 AM
Dear Stephanie,
Thanks for your reply. It looks like I cannot use the Matlab dataplugin, because it is trying to force the .mat file to be like a .tdm file. I found your list of resources very helpful and am using the information in "LabVIEW to MATLAB" to make my own .mat file writing vi's.
Best Regards,
John Sackett
09-27-2011 04:26 PM
Hi,
I too face the same issue. I have a .mat file in which I have to edit a column and save it to the same mat file. I could edit the mat file using storage VIs, my input file has two groups in it, but my modified file has only one group and with default name Vector. Could you please help me in this regard?
Pls find the attachment for details.
Thanks..
09-28-2011 04:48 AM
Dear techy123,
The thing called "Vector" that the Matlab dataplugin shows you is very confusing. It appears even if it does not exist in the matlab file. This is because the dataplugin always tries to make the matlab file look like a TDM file. I had to abandon trying to use the dataplugin and write my own code to directly read and write the Matlab files.
09-28-2011 07:22 AM
Hi johnsackett,
Thank you for the reply. I would like to know is there any other way I could accomplish this. Or is there a tool which can convert .TDM format to .Mat format?
Thanks.
09-29-2011 03:28 AM
01-31-2013 11:25 AM
I am also having the same problem, I was wondering did you find a solution to convert .TDMS to .mat in labview?
06-12-2018 08:12 AM