title: Reading .TDMS files that possess a time interval/duration
body: <p>I am trying to develop an application to read .tdms (National Instruments) files, for which I'm using the "TDMSReader" package <a href="https://github.com/mikeobrien/TDMSReader" rel="nofollow">link to the package + use</a>. This works fine except for those files which use a set duration or time interval.</p>
  
  <p>In the .tdms example file <a href="http://speedy.sh/GAdKM/tdms-file-example.zip" rel="nofollow">I'm providing</a> it can be noted that the file consists of five channels, each of which holds 174080 items.
  (The content of the file can be viewed with this <a href="http://www.ni.com/example/27944/en/" rel="nofollow">excel add-in</a>)</p>
  
  <p>However, the C# package I mentioned doesn't take this into account, it can only read the amount of items equal to the "wf_samples" field (10240), discarding the rest. Has anyone found a solution on how read the "Length" property of the channel and extract the rest of the array values?</p>
  
  <p>Example of my code to convert a .tdms file to .csv</p>
  
  <pre><code>                //file.Fullname = full path to the .tdms file
                  using (var output = new StreamWriter(File.Create(file.FullName + ".csv")))
                  using (var tdms = new NationalInstruments.Tdms.File(file.FullName))
                  {
                      tdms.Open();
                      List&lt;object[]&gt; All_Values = new List&lt;object[]&gt;();
  
                      //Headers
                      string channels = "";
                      foreach (var group in tdms)
                      {
                          foreach (var channel in group)
                          {
                              channels = channels + channel.Name + ";";
                              All_Values.Add(channel.GetData&lt;object&gt;().ToArray());
                          }
                      }
                      output.WriteLine(channels);
  
                      //Values
                      long cnt = tdms.First().Channels.First().Value.DataCount;
                      for (int i = 0; i &lt; cnt; i++)
                      {
                          string values = "";
                          foreach (object[] columnValues in All_Values)
                          {
                              values = values + columnValues[i] + ";";
                          }
                          output.WriteLine(values);
                      }
                  }
  </code></pre>
  
  <p>Any other alternative that provides a way to read .tdms files with C# is welcome.</p>
  
  <p>EDIT: TDMS sample files:</p>
  
  <p><a href="http://speedy.sh/vZzuQ/Tdms-sample-file-NO-INTERVAL.zip" rel="nofollow">NO Interval sample</a> 
  This one works fine</p>
  
  <p><a href="http://speedy.sh/GAdKM/tdms-file-example.zip" rel="nofollow">Interval Sample</a>
  This one discards most of the array values</p>