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