From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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,018 Views)

Hi,

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

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

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

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