DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert string channel to time channel

Hello,

 

Is there a method to change a channel that has time data sored as a strings into a date/time channel (data are saved as tdms from LabVIEW)? My timing data is coming from a NI9467 GPS Timestamping and Synchronization Module and we have been successful at outputting the timing data as a date/time but it is locked into the timezone where the unit is located (we would prefer to record the data in the GMT time zone because we are syncing the data with a separate unit). However, when the timing data are saved as a string the timezone used follows the timezone setting on the cRIO which is what we would like. The problem occurs when importing the data into diadem because it is not possible to create waveforms using a string channel.

 

0 Kudos
Message 1 of 4
(5,372 Views)

 

Hello,

 

I believe that the attached script will fix the data values.  At least it worked on the sample file.

 

Paul

 

ps. Suggest strongly that the source file format be fixed,  DIAdem stores numbers in channels very well.  Not so much for string channels, expecially if the number of values in the string channel are long. 

0 Kudos
Message 2 of 4
(5,223 Views)

Thanks Paul! That does work on my machine as well. I would love to be able to fix the source but according to NI there isn't a viable solution on the LabVIEW side. Would you expect that the length of my current date/time string would exceed DIAdems capabilities?

 

0 Kudos
Message 3 of 4
(5,138 Views)

Hello Need,

 

I dispute that assertion that there are no other options on the LabVIEW side.  Could you describe your data acquisition environment?  Are you or someone you know in control of the LabVIEW data acquisition code?  LabVIEW can write brown date/time wires directly to the TDMS VIs.  I am not aware of any good reason to write those as strings-- LabVIEW also contains lots of string to date/time conversion VIs.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 4 of 4
(5,120 Views)