LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Math Functions for NI-Scope

I am just beginning to program a PXIe-5160 and don't see any math functions in NI-Scope.  I am used to a Tektronix or LeCroy scope where the math functions are built into the scope. 

 

Do I have to write my own math functions like "Add" and "Difference"?

 

Thanks,

 

Paul

0 Kudos
Message 1 of 9
(3,350 Views)

Wrong forum ?

0 Kudos
Message 2 of 9
(3,270 Views)

I don't think so.  I am looking for LabWindows/CIV functions that would improve the  functionality of the NI-Scope.  I found a few in the Advance Analysis Library under the Signal Processing.   Maybe that is way NI want it, basic scope functions in NI-Digitizer, any more advance in the Analysis Library.

0 Kudos
Message 3 of 9
(3,264 Views)
0 Kudos
Message 4 of 9
(3,237 Views)

Trent,

 

Yes, these would do it.  However, NISCOPE_VAL_SUBTRACT_CHANNELS and NISCOPE_VAL_ADD_CHANNELS come back with an Error: 0xBFFA000C Attribute ID not recognized.  When I search for them in the Select Attribute Constant using the filter they do not show up.

0 Kudos
Message 5 of 9
(3,207 Views)

I'm not sure what you're referring to - posting a code snippet or screenshot might help.

 

The Advanced Measurement Library Example might be a good starting place:

Help > Find Examples > Hardware I/O > Modular Instruments > NI Scope > Measurements

Scope.PNG

https://www.linkedin.com/in/trentweaver
0 Kudos
Message 6 of 9
(3,202 Views)

The attribute NISCOPE_ATTR_MEAS_OTHER_CHANNEL is set using the niScope_SetAttributeVIString.  The attribute NISCOPE_VAL_ADD_CHANNELS is set using niScope_AddWaveformProcessing.  I was looking it the SetAttribute function.

 

Do you know if there is an order to which is ran firsst?  I am not seeing any difference in the fetched waveform.

0 Kudos
Message 7 of 9
(3,195 Views)

To gdargaud's point, Someone on the High Speed Digitizers board might have some more specialized knowledge:

https://forums.ni.com/t5/High-Speed-Digitizers/bd-p/150

 

I'll share my 2cents anyway but I wouldn't call myself a SCOPE expert... When you call call commit(), or call some other method like initiate() that calls commit()), that's when the task settings actually get applied. In my experience, the exact order of configuration before that isn't important... the order of when you set them relative to committing is important

 

Hope this helps!

Trent

https://www.linkedin.com/in/trentweaver
0 Kudos
Message 8 of 9
(3,189 Views)

I am able to add and subtract the waveforms.  The problem I have is that the normal scope functions like niScope_ReadMeasurement and  niScope_FetchMeasuresmentStats do not work on the resulting math waveform.  So there is no easy way to get the Frequency of the math waveform.

0 Kudos
Message 9 of 9
(3,180 Views)