05-09-2023 03:17 AM
Hi,
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.
05-09-2023 11:06 AM
If you are using the Waveform Graph from Measurement Studio, you can specify the LabelFormat to use FormatStringMode of ElapsedTime.
05-10-2023 11:27 AM
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
analogInReader.BeginReadWaveform(TimeSpan.FromMilliseconds(20),
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
05-10-2023 11:29 AM
Thats what im seeing rigth now in my graph