11-05-2024 11:03 AM
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?
11-05-2024 12:11 PM
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?
11-06-2024 04:25 AM
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:
|
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...
11-06-2024 07:24 AM
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.
11-06-2024 07:25 AM - edited 11-06-2024 07:26 AM
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.
11-06-2024 08:47 AM
The VI is attached
11-06-2024 10:54 PM
@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:
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:
Are you really trying to measure something more like this?:
At the moment I think you are measuring ~0.0003 but think you are seeing ~0.03.
11-07-2024 09:59 AM - edited 11-07-2024 10:48 AM
~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.