LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Warning code 20021 (0x4E35)

I am getting this warning: Warning 20021 occurred at "NI_MAPro.lvlib:Transition Measurements 1 chan.vi

 

This is a pretty straightforward transition measurement with a reasonably clean signal (waveform data type).  I cannot find any documentation on the cause for this warning. I have tried to adjust the reference levels with no success, but if I manually choose "histogram" and reduce the histogram size for the percent level settings, the warning goes away.  I don't like the idea of manually changing the histogram size since other code might be affected.

 

Does anyone have any further insight on this warning?

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 1 of 8
(176 Views)

Hi vt,

 


@vt92 wrote:

I am getting this warning: Warning 20021 occurred at "NI_MAPro.lvlib:Transition Measurements 1 chan.vi


Do you get good results even with this warning?

Or do you get a warning with bad/unexpected results?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(154 Views)

Can you post a VI that replicates the problem?  If you output a waveform generating the warning to an indicator, then right click it to set its value as default, then change it to a control and use that as the input, you can replicate the warning with no hardware.

 

The warning is "The measurement of state level may be inaccurate, which leads to the inaccuracy of other measurements." 

 

The "Help" for "Auto select" is:

Determines whether the histogram bins that correspond to the high and low state levels each have over 5% of the total hits. If so, LabVIEW returns those results. Otherwise, LabVIEW uses the peak method. This ensures a reasonable answer for either a square wave (ignoring the overshoot and undershoot) or a triangle wave (where a histogram fails).

 

It could be that you need to use a method other than auto select to determine which to use if its choice isn't working.  Seeing the waveform in question would be informative to assist with that...

0 Kudos
Message 3 of 8
(122 Views)

Thanks for the reply.  I get good results even with the warning. Maybe the warning doesn't matter, I would just like to understand it.

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 4 of 8
(112 Views)

As I mentioned above, I tried turning off the "auto" option and sometimes the error goes away with the histogram method and a lower number of bins.

 

I will try to post the VI later today.

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 5 of 8
(111 Views)

The VI is attached

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 6 of 8
(99 Views)

@vt92 wrote:

Thanks for the reply.  I get good results even with the warning. Maybe the warning doesn't matter, I would just like to understand it.


OK, I see that you posted data.  You say "I get good results" but I am not sure that you do.  This appears to be the transition you have measured with the sample data:

Kyle97330_3-1730955000482.png

 

The two cursors is the length of the transition time you measured.  Are you really trying to measure that?

 If you don't see two cursors, look closer, zoom in... they're almost on top of each other.

 

Code I used to generate this:

Kyle97330_1-1730954811548.png

Are you really trying to measure something more like this?:

Kyle97330_2-1730954957586.png

At the moment I think you are measuring ~0.0003 but think you are seeing ~0.03.

0 Kudos
Message 7 of 8
(61 Views)

~0.0003 is the correct value.  I realize that I am using absolute levels, but when I change the percent level settings the warning goes away (at least on my machine).   Are you getting the error?

 

I can imagine that the code might have trouble since it is probably interpolating across only 2 - 3 data points, but even when I increase the absolute range to include 100 points, the warning persists.

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 8 of 8
(51 Views)