LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

present case-dependant case choosing

I am making an instrument driver that has an LCD
on it with three softkeys, which are used to
scroll through menus on the LCD. My problem is in
simulating the LCD: Each button corresponds to a
menu command on the LCD. If you press one of the
keys (i.e, choosing a menu), you are taken to a
different menu where all the softkeys now
represent different functions. So the next state
is dependant on the current state, and the
buttons act as triggers and don't actually
transfer a value. I tried to make the case
choosing from within the case, but LabVIEW
doesn't allow it. Does anybody have any
suggestions??? I am desperate!!!

thanks for any help!


Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 1 of 4
(2,586 Views)
I don't know if this will help...............


variante@my-deja.com wrote in message <896tr2$b50$1@nnrp1.deja.com>...
>I am making an instrument driver that has an LCD
>on it with three softkeys, I tried to make the case
>choosing from within the case, but LabVIEW
>doesn't allow it. Does anybody have any
>suggestions??? I am desperate!!!
>
>thanks for any help!
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.



[Attachment softkey_state.vi, see below]
0 Kudos
Message 2 of 4
(2,586 Views)
How about a string table on the front panel, and a numeric array (on the
front panel but not normally displayed to the end user). In the table,
place your LCD menu commands. Enter all the possible menus in the
rows. Reduce the size of the table so that only one row of the table is
displayed. In the 2D numeric array, store the number of the row you
would like to jump to when the particular menu item is selected. Then
use an attribute nodes to modify the index selection of the table, thus
displaying the selected menu row. I don't know if you can modify the
attributes of the table enough to get the look that you want - if not,
you can then pass the table values of the selected row to another
object. Hope you can get some ideas from this!
-ver



variante@my-de
ja.com wrote:

> I am making an instrument driver that has an LCD
> on it with three softkeys, which are used to
> scroll through menus on the LCD. My problem is in
> simulating the LCD: Each button corresponds to a
> menu command on the LCD. If you press one of the
> keys (i.e, choosing a menu), you are taken to a
> different menu where all the softkeys now
> represent different functions. So the next state
> is dependant on the current state, and the
> buttons act as triggers and don't actually
> transfer a value. I tried to make the case
> choosing from within the case, but LabVIEW
> doesn't allow it. Does anybody have any
> suggestions??? I am desperate!!!
>
> thanks for any help!
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
0 Kudos
Message 3 of 4
(2,584 Views)
variante@my-deja.com wrote:

> I am making an instrument driver that has an LCD
> on it with three softkeys, which are used to
> scroll through menus on the LCD. My problem is in
> simulating the LCD: Each button corresponds to a
> menu command on the LCD. If you press one of the
> keys (i.e, choosing a menu), you are taken to a
> different menu where all the softkeys now
> represent different functions. So the next state
> is dependant on the current state, and the
> buttons act as triggers and don't actually
> transfer a value. I tried to make the case
> choosing from within the case, but LabVIEW
> doesn't allow it. Does anybody have any
> suggestions??? I am desperate!!!
>
> thanks for any help!

You want to set up a "state machine" (essentially that's what you ar
e
simulating), which can be
implemented in LabVIEW using a Case structure inside a while loop; the
case
structure can jump to any case when the loop iterates. It's a little too

complicated to explain here. There is an example in NI's Example
Programs
Database, search for "state machine," which will return a couple of
examples.
The resulting link for a good one ("Pause/Resume & State Machine") is:

http://digital.ni.com/explprog.nsf/2222373937d4e9a38625666a00831a24/f345cd727b37f2f486256568007cfe07?OpenDocument

But anyway, within the different states, you can write to attribute
nodes of your booleans to change the
text on the "key" face. Or even easier, just write to string displays
above each key to indicate their particular function.

Good luck and happy wiring,

Rod


--
Roderic Don
Research Associate II
University of Delaware
Center for Composite Materials
302-831-8701
302-831-8525 (FAX)
------------------
"I don't think it's quite fair to condemn a whole program

because of a single slip-up." General "Buck" Turgidson, from
Dr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb
0 Kudos
Message 4 of 4
(2,584 Views)