Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

DigitalWaveform creation via change sets - Is it possible?

I'm trying to create DigitalWaveformGraph controls using Measurement Studio for .net 2008.  My datasets are long-running but have few transitions.  The problem that I'm seeing is that the DigitalWaveform objects appear to contain a sample per index.  This is fine for small numbers of samples, but doesn't seem practical (how I'm trying to use them) for large sample numbers.


In LabVIEW, I can create a compressed digital data value using a 'build digital data' with transition/data pair inputs.  For example, if there is a signal that contains two transitions; the first is a 1 at time=0, and the second is a 0 at time=2 000 000 000.  The compressed data set is represented by:


[0, 1]
[2000000000, 0]

Which appears to be handled nicely by LabView since it doesn't actually allocate 2
e9 values.

So how do I do the same thing in measurement studio for a digitalwaveformgraph?  I would be happy with 0-U32 for transition times (DigitalWaveform uses I32), but U64 would be even better.


Thoughts?

 

neck 

0 Kudos
Message 1 of 4
(3,908 Views)

Hello neck,

Thank you for posting on the NI Discussion Forums.  There aren’t any functions which directly correspond to the Build Digital Data VI that you see in LabVIEW, but there are other means to accomplishing what you are trying to do.  You can set up the timing for your digital waveform using the WaveformTiming class.  Take a look at the help for it, and you will notice that it has a method called WaveformTiming.CreateWithIrregularInterval that you can set the times for each of the samples in the waveform.  You should be able to use these to create the waveform, and save some memory by not specifying a value for every single sample. 

Chris_G
Sr Test Engineer
Medtronic, Inc.
0 Kudos
Message 2 of 4
(3,885 Views)

Chris,

 

Thanks for the quick response.  The documentation for the digital waveform shows that it will throw an InvalidOperationException if the timing is set to irregular (which is also the case in practice... I had to try).  Looking over the irregular timing posts for digitawaveforms, I ran across another thread:

 

http://forums.ni.com/ni/board/message?board.id=232&thread.id=6610

 

Looks like others have tried unsuccefully as well.  The suggestions in that post don't quite work since they require allocating huge arrays in my case.  If only the digitalwaveform would allow irregular timing...

 

Thanks, 

noel 

 

 

0 Kudos
Message 3 of 4
(3,867 Views)

neck,

 

I apologize for overlooking this missing feature.  It appears that for now, we have no choice but to specify a value for each sample of the waveform.  I do believe, however, that this would be a great addition to the functionality of the DigitalWaveform class.  Please feel free to make a Product Suggestion so that this feature will be considered for future versions of Measurement Studio.

Chris_G
Sr Test Engineer
Medtronic, Inc.
0 Kudos
Message 4 of 4
(3,859 Views)