06-03-2009 03:46 PM
I've been fumbling with a WaveformGraph in a finite aquisition program. It records 100 points at 10kHz.
I plot the data as below:
waveformGraph1.PlotWaveforms<double>(dataIn, new AnalogWaveformPlotOptions(AnalogWaveformPlotDisplayMode.Time, AnalogWaveformPlotScaleMode.Scaled));
But it doesn't plot in milliseconds or anything, it plots with major marks at "6.337e10", which, though some sleuthing, I think are "ticks" in the Timing property. I can't seem to find a way to convince it to use something else -- something more reasonable. When I try to set a different XAxis, it shifts and only shows me the select part of the dataset at that X-Range.
I hope this is descriptive enough; if you need clarification, please let me know. Thanks much.
06-04-2009 05:49 PM - edited 06-04-2009 05:49 PM
In the properties of the WaveformGraph (you can use Design mode for this if you want) you can edit the X-axis ranges and scaling. It sounds like you just have this set to an unfortunate value.
Regards,
Steven Zittrower
Applications Engineer
National Instruments
06-09-2009 09:01 AM
No matter what I set the x-axis for, it changes when I plot the waveform. If I change the range after plotting, it only shows me a fragment of the graph, corresponding to that time range.
This is the problem I am getting, when using the following code:
AnalogWaveformPlotOptions options = new AnalogWaveformPlotOptions(AnalogWaveformPlotDisplayMode.Time, AnalogWaveformPlotScaleMode.Raw);
waveformGraph1.PlotWaveforms<double>(dataIn, options);
As you can see, it gives me time in CPU ticks. While precise, it is of little help in deciphering the graph easily. I just need to convert "ticks" to "milliseconds", but have not yet found a way to do that.
06-10-2009 03:03 PM
It looks like the LabelFormat of the Xaxis of the WaveformGraph is set to a numeric rather than a DateTime format, which is what you want. Changing that should fix issue.
Regards,
Steven Zittrower
Applications Engineer
National Instruments