LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I need to make a sound when data is above limit without causing delay

I have a program that reads values from an arduino at about 1000 hz via VISA.

 

When a value gets above a predetermined limit, I want to play a .wav file or a tone but have it cease as soon as value is back below the limit.

 

I also need this monitor function to not make the acquisition thread wait.

 

Any help is most appreciated.

 

Labview 2019

Newbie grateful for any help!

 

Jake

University of Vermont
0 Kudos
Message 1 of 8
(2,922 Views)

here is the vi

University of Vermont
0 Kudos
Message 2 of 8
(2,913 Views)

Hi Jake,

 

when the playing of those sounds should not interfere with data acquisition then you need to move this into their own loop running in parallel…

 

(Cleaning up your VI is recommended, too.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 8
(2,895 Views)

You might find a Notifier useful for communicating the status of your primary loop to the sound-playing loop.


GCentral
Message 4 of 8
(2,889 Views)

Gerd,

Thank you for your help.

 

I have been having trouble understanding  the parallel loop.  Are the yellow highlighted loops below parallel to the main one?  If not will you be so kind as to help me understand what a parallel loop is?

 

JakeHappiness_0-1582907052732.png

Thank you very much!

Jake

 

University of Vermont
0 Kudos
Message 5 of 8
(2,886 Views)

No.  They are not even loops, they are just case structures.

They aren't even parallel to the bigger case structure since they require an output from the big case structure before they can execute.

 

I would recommend you learn more about LabVIEW from here. How to Learn LV

 

PS:  You don't need to duplicate the Index Array.  It is expandable by dragging the bottom border giving you multiple outputs.  By default they'll give you 0, 1, 2, 3 indices if you don't wire up the index terminals.

 

Message 6 of 8
(2,871 Views)

RavensFan,

Thank you for your thoughts!

 

Much appreciated!

Jake

University of Vermont
0 Kudos
Message 7 of 8
(2,862 Views)
Thank you Cbutcher,

I'll check that out.
Jake
University of Vermont
0 Kudos
Message 8 of 8
(2,857 Views)