LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Playing sound based on exceeding a threshold value. 1D array data type

Solved!
Go to solution

I  am experiencing a problem with the beep.vi.  I have a DAQ program, which acquired  signal and compare it to a threshold value. When one signal is out of range, a visual and sound alarm occurred. I am using the VI beep.vi to generate the sound. Everything is working well except the sound alarm. It gives type mismatch 1-D array. I tried to overcome this by putting it in a case structure. But it still doesn't work. could any one help? Please find attached my VI. Best regards to all visitors of NI Discussion Forums.

Ihab El-Sayed

0 Kudos
Message 1 of 3
(3,168 Views)
Solution
Accepted by topic author Ihab

Why did you create a new thread? All you needed to do was add a reply to the previous, attaching the VI that you forgot to attach.

 

Please keep all subsequent discussion in this thread.

 

As to your question: I have no idea why you are using a Type Cast function on a 1D array of Booleans. Did you randomly pick a function out of the palettes until you found one that didn't give you a broken wire? It seems to me that since you are comparing an array of values to a threshold, then you'd probably want to beep if any of them is out of range. In this case you'd want it if any of the elements in the Boolean array is True. This implies an OR condition. And this means you'd need to use the Or Array Element function. This will return a True if any value in a Boolean array is True.

Message 2 of 3
(3,164 Views)

Many thanks. I added OR array and it works.

Thanks again.

0 Kudos
Message 3 of 3
(3,157 Views)