From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.


Showing results for 
Search instead for 
Did you mean: 

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

Go to solution

I  am experiencing a problem with the  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 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
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

Many thanks. I added OR array and it works.

Thanks again.

0 Kudos
Message 3 of 3