06-07-2019 08:53 AM
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();
07-26-2019 02:33 AM
Hi,
do you still have the problem, or did you already found a solution?
08-05-2019 08:47 AM
This seems to be ok by definition. No solution found.