LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Number operated menu system

Hi there,

I'm new to labview and need to create a a menu program using labview. It is similar to those menus you get when you call big companies by which I mean you will be played an audio file that will indicate what button to press for a sub sections of the menu.

Any tips for achieving this? Even just a simple example for me to follow with just one option.

Thanks again.

0 Kudos
Message 1 of 19
(3,720 Views)

Hi Raw92,

 

Welcome to the NI Discussion Forums!

 

I am a little unsure what you would like with regards to the audio file. Could you clarify this?

 

However, the following KnowledgeBase article described the process of creating custom menu items in LabVIEW.

http://digital.ni.com/public.nsf/allkb/17803AA31C8C07C986256CFD0080D609

 

 

You will also see during this process, that you are given an option for 'Shortcut', where you can enter a key combination.

 

The following help file describes the process of using the created menu with events to execute code:

http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/runtime_shortcut_menu_handling/

 

The following is a community example which implements a simple application using these concepts:

https://decibel.ni.com/content/docs/DOC-4166

 

Please let me know if you require any more information.

 

Regards,
Chris (CLED, CLA, CTA)
Applications Engineering Specialist
0 Kudos
Message 2 of 19
(3,685 Views)

Thanks Chris.

 

The audio files will be prerecorded instructions telling the user how to navigate the menu. For example when the access the main menu an audio file will play (something similar to "press 1 for ..., press 2 for ... etc")

0 Kudos
Message 3 of 19
(3,673 Views)

Hi Raw92,

 

Provided I have understood correctly, this should not be an issue. 

You could insert code to play a sound file into the event structure, which is run if the event if from a Main Menu select.

LabVIEW includes examples on how to play sound files (Help -> Find Examples, then search for Sound).

 

Please let me know if you would like me to clarify anything.

Regards,
Chris (CLED, CLA, CTA)
Applications Engineering Specialist
0 Kudos
Message 4 of 19
(3,670 Views)

Are you using an actual a phone system here, or are you just simulating one? If you plan to use a real phone system, you need a modem that can handle it.

 

Given that it sounds like you're trying to model a phone system menu, I think the links to creating on-screen menus will probably not help you.

 

If you are not using a real phone system, are you planning to put an on-screen keyboard where the user clicks on a number and it plays a sound, or will you use the numeric keypad on the computer's keyboard?

0 Kudos
Message 5 of 19
(3,654 Views)

The project we're working on is a central heating interface redesign for the visually impared community. We're using a USB keypad as a standin for an actual keypad because we were told we would have to get a decoder.

What we want is for there to be an idle mode which will be a while loop used to display the current time while also checking if it is time to turn off/on the heating. When the user presses any button on the keypad then a prerecorded menu plays, informing them what button (on the keypad) will do what. So for example, "Press one to turn on boost, press two to set heating time etc".

 

This is what we have at the moment. It's not the working program but just what we have at the moment thrown into a vi.

 

0 Kudos
Message 6 of 19
(3,626 Views)

Right. What I have now is the first stages. There is the main loop that displays the current time. When a button is pressed, the main menu audio file (yet to be recorded) is played. How do I get it so that the menu .wav file plays once and then waits for the user to press a number between 1 and 9 on our usb keypad (depending on what menu selection they want to choose)?

0 Kudos
Message 7 of 19
(3,603 Views)

Use a case structure to select the filename of the corresponding audio file depending on which key is pressed. To play the main menu file once when the program starts, copy the code that plays the sound outside the while loop and wire an error out wire from the last sound VI to the edge of the while loop to force the sound to play before the while loop starts.

0 Kudos
Message 8 of 19
(3,595 Views)

I don't want the main menu audio to play at the start of the program. I want it to play after any button is pressed. If you think of the heating system in your home, it is constantly displaying the time until you press something. So basically we have a while loop that goes until a button is pressed.

0 Kudos
Message 9 of 19
(3,586 Views)

I think I haven't understood, so correct me if I'm wrong. The first time the user presses any button, play the main menu. After that, wait until the user presses a button again, which causes it to take some action. So, add a shift register that keeps track of which state it's in - waiting for the first button press, or waiting for the second button press.  If you only have those two states, a boolean shift register is sufficient, but you might want to use an enumeration in case you later add more states.

0 Kudos
Message 10 of 19
(3,580 Views)