06-28-2023 01:16 PM
Good morning labview engineers
I have a problem with this labview code that is used to read and save an audio file, the problem is that I want to enable all the code with a boolean but because it has two internal reading and writing whiles I can't figure out how to do it, at least Putting it into a state machine like subvi doesn't work for me either because it already has two internal loops. How could I call everything with a button that can be activated and deactivated at any time? I would greatly appreciate your help
06-28-2023 01:19 PM
You can try using Queue Message Handler with parallel Loops.
06-28-2023 01:38 PM
Hi, could you explain to me how to do that, I don't have much experience in labview
06-28-2023 02:56 PM
@TORRESDANIEL wrote:
Hi, could you explain to me how to do that, I don't have much experience in labview
There is a template that you can create and start with.
Using a Queued Message Handler in LabVIEW
06-28-2023 07:27 PM
The problem is that it also takes time to call the sound file open only once, would it still help me to use that method?
06-30-2023 08:25 AM
Hello, @TORRESDANIEL. Welcome to the LabVIEW Forums, where we share ideas and help about All Things LabVIEW.
I see you are a new member, and also possibly a new user of LabVIEW. Here are some things to help us help you.
Bob Schor
06-30-2023 09:16 AM
Hi TorresDaniel,
I am trying to understand what you are asking.
Do you need a start button to start your program? If that's what you need, try out the attached code.
07-01-2023 09:47 AM
As it happens, processing "Audio" data and "Video" (or "Visual", or "Picture") data are some of the trickier and more "advanced" aspects of LabVIEW, possibly because the "hardware" has been developed and "standardized" by other device manufacturers following other rules than simple Analog and Digital signal processing.
As I mentioned in my previous response, I cannot look at your code because I do not have LabVIEW 2022 (or 23) installed on my computers. I should also ask if you are using LabVIEW Project (and have a Project (.lvproj) file, and possibly a Project Folder, associated with this effort. If you only have a "Main" and a few (2-4) sub-VIs, then attach them all (Saved for Previous Version, of course). Otherwise, save the Project for previous version, compress the "Previous Version Project Folder", and attach that.
I agree that you probably do want a State Machine, with the "Start" button safely held in a parallel Event Loop where it basically tells the State Machine (which is sitting idle, waiting for a State/Message), to "Start". If I can see your code, I can provide more guidance.
Bob Schor
07-01-2023 12:28 PM - edited 07-01-2023 12:30 PM
@GRCK5000 wrote:
I am trying to understand what you are asking.
Do you need a start button to start your program? If that's what you need, try out the attached code.
Please don't answer with off-topic "solutions" and code full of totally crazy constructs. This might not confuse you, but it will distract and lead every other beginner even deeper into the swamp.