Error -20061 When Using the Peak Detector VI in LabVIEW

Updated Jul 17, 2024

Reported In

Software

  • LabVIEW

Issue Details

  • I am getting error -20061 when using the Peak Detector VI from LabVIEW, after wiring the error code to the Error Cluster From Error Code I see the following error message, why is this happening?
Error -20061 occurred at PeakDetectErrors.vi 

Possible reason(s);
Analysis: (Hex 0xFFFFB1A3) The selection is invalid
image.png

Solution

This LabVIEW issue happens when the width input of the Peak Detector VI is lower than 3.

According to the documentation the width input specifies the number of consecutive data points to use in the quadratic least squares fit. Width is coerced to a value greater than or equal to 3. The value should be no more than about 1/2 of the width of the peaks above threshold or valleys below threshold and can be much smaller (but > 2) for noise-free data.