Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Tdms set AnalogWaveform x properties

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();
0 Kudos
Message 1 of 3
(2,023 Views)

Hi,

do you still have the problem, or did you already found a solution?

0 Kudos
Message 2 of 3
(1,936 Views)

This seems to be ok by definition. No solution found.

0 Kudos
Message 3 of 3
(1,881 Views)