Real-Time Measurement and Control

Showing results for 
Search instead for 
Did you mean: 

How can i get the elapsed time from my



Im using visual studio, with national intruments for reading measures, for make the lectures im using the comand "BeginReadWaveform" but when im ploting the results in the waveformgraph it plots the data againist the date time and not with the elapsed time 

my question if y can reset the hardware clok or change the wai to adquire the time from my task.





0 Kudos
Message 1 of 4

If you are using the Waveform Graph from Measurement Studio, you can specify the LabelFormat to use FormatStringMode of ElapsedTime.




0 Kudos
Message 2 of 4

HI ZYOng, Thanks for your answer.


I think my problem comes more from the task and the internal clock from the device,

for get my waveforms i use this


nalogInReader.SynchronizeCallbacks = true;

// Start of the read 
analogCallback, myTask);


Im using the internal clok of the device.


// Configure the timing parameters
myTask.Timing.ConfigureSampleClock("", Convert.ToDouble(rateNumeric.Value),
SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples, 1000);


i have the axis from the waveformgraph configured


//axis conf

xAxis1.MajorDivisions.LabelFormat = new UI.FormatString(UI.FormatStringMode.DateTime, "g");


//plot waveformtime conf to graph

waveformGraph1.PlotWaveforms<double>(waveforms(im ploting an array of waveforms), new UI.AnalogWaveformPlotOptions(UI.AnalogWaveformPlotDisplayMode.Time,UI.AnalogWaveformPlotScaleMode.Scaled,UI.AnalogWaveformPlotTimingMode.Timing));


i think the problem is the task bc waveforms only get TimeStamp(Datetime) not elapsed time.

My problem is set my first time stamp to 0 (the first time stamp value in my wavefor is not 0) and 

also get the Absolutetime of the proces for make the repors and the Relativetime for work with it 

0 Kudos
Message 3 of 4

Thats what im seeing rigth now in my graph


0 Kudos
Message 4 of 4