LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Analysis: The width must meet: 0 < width < samples.

what does this error mean?

 

Analysis:  The width must meet: 0 < width < samples. 

0 Kudos
Message 1 of 15
(4,567 Views)

It seems that one of your input paramteres is outside the valid range that the programmer defined. Can you show us some code or at least explain what your program does?

 

It is not clear if this is a LabVIEW system error or some custom error. Do you have the exact wording of the entire error message

  • Do you have an error code?
  • What is the name of the VI that generated the error?
  • Can you attach some code?
Message 2 of 15
(4,567 Views)

 I have created a program that detects and records pulses through a Threshold Peak Detector.vi . Everything used to run just fine, up to the moment i tried to play a sound (Play File.vi)  when a peak was detected. After that i got the same message...

 

For me it is:

Error -20013 occurred at an unidentified location Possible reason(s): Analysis: The width must meet: 0 < width < samples.

and after i click "CONTINUE" i get another message:

Error 4823 occurred at Sound Input Read (DBL).vi->NTUA_BERM_v4.v Possible reason(s): LabVIEW: (Hex 0x12D7) A task must be running to perform this operation.

 which also only allows to click "CONTINUE". If i re-execute the VI everything runs just fine.

 

Thank you in advance.

 

 

0 Kudos
Message 3 of 15
(4,394 Views)

Hello Stergios,

 

without any code we cannot tell what happens.

 

But when you use the Threshold peak detector the 'width'  you asked for must meet two criteria:

  1. It must be greater than 0 (zero)
  2. It must be smaller than the number of samples

What might happen is that you send an empty array, such a situation makes it impossible to meet criterium 2.

 

Based on your question I think you don't connect error wires. I think that's the reason you get error number 2. 

 

Ton

Message Edited by TCPlomp on 07-05-2010 08:22 PM
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 4 of 15
(4,383 Views)

TCPlomp, here is my VI.

 

I was trying to find a way around the error all night but no luck... Here it is, i hope anyone can help. t is a PEAK detector/counter, which monitors the microphone for peaks, plays a sound every time a peak is detected and records each count. It is based on the LabVIEW example "Continuous Sound Input".  Just tap your microphone to create a countable peak..You should get the error 2-3 seconds after the first count.

 

Here is the necessary "TEST.vi" and "beep.wav" in a ZIP file.


Thank you for your time and effort.

Message Edited by Stergios on 05-08-2010 04:23 AM
0 Kudos
Message 5 of 15
(4,360 Views)

I have seen your error once, the first time a beep was about to be played I first got the error from the peak detector, but then the while loop terminated because of an error in the 'acquire sound' loop.

 

What basically happened is that the first time of initialization of the output sound, the input card was halted.

Then the input function returned an error and an empty soundset, since you don't check the error before sending the data to the peak detector you get an error as well from there.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 6 of 15
(4,351 Views)
TCPlomp, thank you for your answer. Do you suggest that checking the errors will solve the problems? Were you able to solve them in your previous problem?
Once again, i deeply appreciate your efforts..
0 Kudos
Message 7 of 15
(4,323 Views)

Here is a low CPU usage version. Sound is somewhat cryptic in Labview so I offer to help. One the error you made was to have extra buffer size for sound input. Now you have 2x buffer size in respect to samples read each time.

Remember that sound files can be quite large so. So preparing the setup by reading all the samples before the loop, must be used with care. But for a small beep it works fine. The wiring is somewhat chaotic but you are free to fix it.



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Message 8 of 15
(4,310 Views)
Thanx Coc Rouge! I will be testing it first thing tomorrow morning!
0 Kudos
Message 9 of 15
(4,282 Views)
*Coq Rouge! 😞
0 Kudos
Message 10 of 15
(4,277 Views)