LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unicode characters in TDMS file

Solved!
Go to solution

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)?

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 1 of 13
(3,747 Views)

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.

0 Kudos
Message 2 of 13
(3,712 Views)
TDMS supports unicode, there should be no problem.
Message 3 of 13
(3,688 Views)

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)

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 4 of 13
(3,680 Views)

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

0 Kudos
Message 5 of 13
(3,662 Views)

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.

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 6 of 13
(3,659 Views)

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

0 Kudos
Message 7 of 13
(3,652 Views)

It seems that you only write the the first two hexagonal values.  The write stops at 00.

TDMS.jpg

Message 8 of 13
(3,650 Views)

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.

0 Kudos
Message 9 of 13
(3,645 Views)

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.

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 10 of 13
(3,638 Views)