LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to create stereo car radio interface

Solved!
Go to solution
Hello, I'm new to LabView and I'm trying to simulate the interface of a car radio in LabView 2009. I'm having particular trouble with the radio station seek and scan functions. I started with a numeric control to control the up and down seek function to find a "radio station." However, I would like to incorporate both seek and scan controls, but I am unsure of how to build my own control that would do this. I was thinking of somehow building two controls that would show up on the VI interface, with one control acting as the seek function and another control acting as the scan function and then wiring them both to the one "radio station" numeric indicator, but I'm not sure the best way to implement this. Any help would be appreciated, thanks. -Cheuk
0 Kudos
Message 1 of 8
(3,546 Views)

I haven't used the radio in my car in years, so I'm not sure I can even remember how the scan and seek are supposed to work. From what I recall, with the seek I would press the button once and it would hunt for the next station. With the scan I would keep the button down and it would keep the dial moving. I think. Is this the operation you were intending? If so, you really wouldn't need anything special. The first can be done with a standard button that uses the latch mechanism and the second can be done using the switch until released mechanism. Were you intending a different kind of operation?

0 Kudos
Message 2 of 8
(3,532 Views)
Yes you are correct, the scan would move the radio stations up or down by 0.2 Hz, and if you keep it depressed, it will keep moving. The seek function would hunt for the next station when you press the button once. I was thinking of using an array to store a preset list of "stations" and if you press the seek up button for example, it would go through the array and find the next radio station up in that array. However, when using a boolean button set with switch until release, I am unable to get the radio station indicator to move 0.2 Hz with every press, instead, the radio station indicator just changes to 0.2 and stays there. Also, I'm still not sure on how I would connect both sets of scan and seek buttons to the same indicator, since the indicator only allows for one input? I have uploaded the VI that I'm working on and I'm sorry if the questions seem really novice, but I'm new to LabView and I appreciate any help that I can get.
0 Kudos
Message 3 of 8
(3,503 Views)

You need to post some code.  Your attachment is not there.

 

To right to an indicator for different locations, you can use a local variable of that indicator.  Just be careful with the architecture of your code so you don't have a risk of race conditions where the multiple locations are battling to do the writing.  I think you may want to use an event structure in your architecture which is the best way to handle UI events such as button presses.

0 Kudos
Message 4 of 8
(3,497 Views)

I'm sorry about that, I thought I had attached the code but I guess I'm didn't.  Here it is again.

0 Kudos
Message 5 of 8
(3,472 Views)
Solution
Accepted by topic author chng

You need to put the code inside the loop, otherwise it only gets read at the start of the program. You also need to use a shift register to keep track of the current station. Attached is a modification that does just the Seek Up/Down. See if you can figure out how to add the other code. Smiley Wink

Message 6 of 8
(3,427 Views)

Would be neat to see a LabVIEW based carputer interface.

Why do geeks think Halloween and Christmas occur on the same day?
Because 31oct = 25dec!
0 Kudos
Message 7 of 8
(3,382 Views)
Thank you for your help, that was really helpful and I was finally able to get everything I needed working. Thanks again.
0 Kudos
Message 8 of 8
(3,304 Views)