02-13-2017 08:14 AM
This is a quite simple question but I can't find an answer.
Does TDMS format support Unicode characters?
I mean, can I save Unicode characters in a TDMS file (with LabVIEW 2016)?
Solved! Go to Solution.
02-13-2017 11:14 AM - edited 02-13-2017 11:20 AM
I think the answer is 'yes' but may involve some extra work. You certainly can flatten any data type to an array of bytes and read and write those bytes. But if you have a unicode string (how are you getting this in LabVIEW again?) and you do a normal write string in TDMS I'm guessing it won't be recorded properly, but haven't tested it.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
02-13-2017 08:15 PM
02-14-2017 01:09 AM
I downloaded LabVIEW Unicode Programming Tools from here; then I added
UseUnicode=True
to LabVIEW.ini file.
In this way I'm able to work with Unicode quite easily (at least for the features included in the Unicode Programming Tools).
But I can't save Unicode string to tdms file; I attach a simple LV 2016 example to show it (you need LabVIEW Unicode Programming Tools and
UseUnicode=True
entry)
02-16-2017 09:54 AM
Hi Vix,
can you post the error you receive from LabVIEW as soon as you try to write the TDMS file (if you receive an error)?
regards,
Stefano
02-16-2017 09:56 AM
Hi Stefano,
I didn't receive any error from LabVIEW.
You can easily see by yourself what happens running the vi I attached to my previous message.
02-16-2017 10:29 AM
I can't find the "LabVIEW Unicode Toolkit"... so I'm not able to open your VI.
can you share me the link where I can download this packages. In VI Package manager I found a library about Unicode, but it is not the same of yours.
regards,
Stefano
02-16-2017 10:30 AM
It seems that you only write the the first two hexagonal values. The write stops at 00.
02-16-2017 10:37 AM
The read appears either the read or the write treat it as a null terminated string, and either stop writting at the first \00 or what is more likely is the read stops returning the string once a \00 is seen. I think the TDMS read/write string shouldn't stop on null terminated strings so I say it is a bug. But NI might disagree, and if that is the case doing this might be more difficult task.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
02-16-2017 10:43 AM
Hi Stefano,
as I wrote in my first message, you can download "LabVIEW Unicode Toolkit" from here.
Please, follow carefully the steps I described to be able to run the vi.