From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-05-2009 09:43 AM
I am attempting to make a car CD and radio system for a project i am working on for my university degree.
I am having trouble with making the start and stop and pause functions for the VI. Getting the file to play has been achieved and i do have a start button around a case structure. But getting the program to pause the file from the same start button and start again from where it left off and getting the stop button to stop the wav file and reset it is proving more difficult.
At the end i will have about 12 tracks to be cycled through, with a previous and next buttons. could u help me design this vi...
Hope to hear some good news soon!! hehe any vi's u can send me would also help(assuming they do help ^^)
Andy
university systems engineering student
03-05-2009 10:41 AM
It is hard to say without your code, and since this is for a university project I cant give you too much help, but I would look at an overall architecture of a state machine or possible a queued state machine. your states could be :
idle:no cd, error, playing, paused idle:cd loaded then your transitions fro the state play are to pause if pause is pressed, idle:cd loaded if stop is pressed, Idle:no cd if eject is pressed. and so on...
The queued state machine architecture is more complex but even more flexible where you can queue up multiple states to execute depending on the user inputs.
03-05-2009 11:31 AM
Heres a quick tip just in case you run into this issue later on :
To my knowledge, the only sound file type supported by LabVIEW is .wav
So dont try to make any MP3 CD's, etc.
03-09-2009 11:37 AM
Well tbh falkpl being a systems engineer does kinda involve using other people with more understanding and knowledge to gain the results that u want to obtain ^^ thats just a side note....
But yeah anyway i am still having major problems with the start/pause button being the same button...since the mechanical action is for it not to latch its hard to come up with a solution....
Any ideas guys? or do u want me to screenshot the play vi for the wav file i am using to see if u can use that?
03-09-2009 01:10 PM
From Labview help
Sound Output Stop VI
Owning Palette: Sound Output VIs
Installed With: Base Package (Windows, Linux)
Stops the device from playing sound from the buffer. Use the Sound Output Clear VI to clear the data in the buffer. Use the Sound Output Start VI to restart output. I have not tested it. Also take a look at the Sound Output Write VI and the timeout control
Good luck
03-10-2009 04:04 AM
BloodPhoenix wrote:Well tbh falkpl being a systems engineer does kinda involve using other people with more understanding and knowledge to gain the results that u want to obtain ^^ thats just a side note....
But yeah anyway i am still having major problems with the start/pause button being the same button...since the mechanical action is for it not to latch its hard to come up with a solution....
Any ideas guys? or do u want me to screenshot the play vi for the wav file i am using to see if u can use that?
Are you using the event structure to handle the UI events? With that it should be really a piece of cake to handle that. Depending if you want icons to be visible you could either customize the true and false images of the boolean or another approach would be to have one button for each operation, aligned above each other and make the one visible that changes to the operation not currently active.
Rolf Kalbermatter
03-10-2009 05:49 AM