03-10-2013 10:08 PM
Hello, everybody.
I want to write Timestamp channel in TDMS Files.
Next code is my writing source.this part is data callback and tdms wrting source.
if(NI9219_1_2set_Task.AIChannels.Count > 0)
{
NI9219_1_2set_Task.Timing.ConfigureSampleClock("", Convert.ToDouble(rateNumeric.Value), SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples, Convert.ToInt32(sampleNumeric.Value));
if (LoggingCheckBox_1.Checked) { NI9219_1_2set_Task.ConfigureLogging(tdmsFilePathTextBox.Text + DateTime.Today.Year.ToString() + DateTime.Today.Month.ToString() + DateTime.Today.Day.ToString() + "\\" + DateTime.Today.Year.ToString() + DateTime.Today.Month.ToString() + DateTime.Today.Day.ToString() + "_" + DateTime.Now.Hour.ToString() + "_" + DateTime.Now.Minute.ToString() + "_" + DateTime.Now.Second.ToString() + "_NI9219_1set2set.tdms", TdmsLoggingOperation.CreateOrReplace, LoggingMode.LogAndRead, "NI9219_1_2set"); }
NI9219_1_2set_Task.Control(TaskAction.Verify);
NI9219_1_2set_analogInReader = new AnalogMultiChannelReader(NI9219_1_2set_Task.Stream);
NI9219_1_2set_callback = new AsyncCallback(NI9219_1_2set_AnalogInCallback);
NI9219_1_2set_callback_Graph = new AsyncCallback(NI9219_1_2set_AnalogInCallback_graph);
NI9219_1_2set_runningTask = NI9219_1_2set_Task;
NI9219_1_2set_InitializeDataTable(NI9219_1_2set_Task.AIChannels, ref NI9219_1_2set_dataTable);
NI9219_1_2set_dataGridView.DataSource = NI9219_1_2set_dataTable;
NI9219_1_2set_analogInReader.SynchronizeCallbacks = true;
NI9219_1_2set_analogInReader.BeginReadWaveform(Convert.ToInt32(sampleNumeric.Value), NI9219_1_2set_callback, NI9219_1_2set_Task);
NI9219_1_2set_analogInReader.BeginReadMultiSample(Convert.ToInt32(sampleNumeric.Value), NI9219_1_2set_callback_Graph, NI9219_1_2set_Task);
}
ConfigureLogging Function in order to do TDMS write.
However, I want add channel.
It's timestamp channel.
I used ConfigureLogging Function in order to do TDMS write.
But, I want to the Add to time stamp channel.
I want this FORM
CHANNEL1(this channel is physical channel) | TIMECHANNEL(this channel i want) <-- this is Header Column
0.123 (this is analog data) | 2013-03-11 12:01:10 (this is time stamp)
I look forward to Response.
Thank you for reading to the message.