Quantcast
Channel: Measurement Studio for .NET Languages topics
Viewing all articles
Browse latest Browse all 1999

Tdms set AnalogWaveform x properties

$
0
0

I can't find a way to set the x axis name (wf_xname) for an analog waveform channel. The only way I found is not valid for the WaveformTiming with the RegularInterval option.

 

var opt = new TdmsAnalogWaveformWriteOptions {TimingAxisName = "time"};

 

It seems that the analog wfm properties are autogenerated at save by the tdms Library and then they are read-only. automaticproperties

code example:

var myTdmsWfmGrp = myTdmsFile.AddChannelGroup("ScopeShotsWfm");
myTdmsWfmGrp.WaveformLayout = tdmsWaveformLayout.NoTimeChannel;
var wfmData = AnalogWaveform<double>.FromArray1D(yData);
wfmData.PrecisionTiming = PrecisionWaveformTiming.CreateWithRegularInterval(PrecisionTimeSpan.FromMilliseconds(xData[1] - xData[0]),PrecisionDateTime.Now);
var myTdmsWfmCh = new TdmsChannel(scopeChannel, TdmsDataType.Double, "Voltage", "V");
 myTdmsWfmGrp.AddChannel(myTdmsWfmCh);
myTdmsWfmGrp.AppendAnalogWaveform<double>(myTdmsWfmCh, wfmData);
myTdmsFile.Save();

Viewing all articles
Browse latest Browse all 1999

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>