LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Novice LabView user query - LONG

Hi

I've only been using LabView for a couple of months and need to use it to
remotely control an instrument. The instrument is capable of running stand
alone and is operated via a menu system. The menu is displayed in an LCD
panel with menu labels sitting above several push buttons. The menus are
accessed using push buttons with the labels (and hence functions) above
each push button changing according to which sub menu is displayed in the
LCD panel ie when you press one of the buttons a sub menu executes which
means that subsequent presses of the same button control different
instrument parameters. (Its a very common solution found wherever space
limits both the display size and numbers of buttons)

I want to use LabView to remotely control the instrument and I thought it
would be best done by emulating the stand alone type of menu operation.
This would make the remote control software intuitive to users already
familiar with the instrument. I realise that by trying to emulate the menu
system I am constraining the usability of the control software with the
same constraints which exist in the menu/push button mode of the stand
alone instrument, but to be honest there isn't much more functionality to
be gained.

I've tried all sorts of things but have so far been unable to figure out
how to do the menu/push button type interface using LabView. I tried to
write a VI which has a single boolean control (switch until released
mechanical action, the type which mimics the stand alone mode) which
increments a digital indicator by +1 with each press, whilst still running
the VI. I thought that if I could achieve this then I could do what I
wanted to do using LabView. But I've not been able to do this simple
thing!

Can anyone help with this very basic query, or point me to a more
appropriate newsgroup/forum. I am not a programmer and only have
experience of using LabView on a very basic level, so please bear this in
mind when offering help.

Many thanks in advance, all advice gratefully received.

Cheers

Bill

wsymonds@clara.co.uk
0 Kudos
Message 1 of 5
(2,383 Views)
Bill Symonds wrote:

> Hi
>
> I've only been using LabView for a couple of months and need to use it to
> remotely control an instrument. The instrument is capable of running stand
> alone and is operated via a menu system. The menu is displayed in an LCD
> panel with menu labels sitting above several push buttons. The menus are
> accessed using push buttons with the labels (and hence functions) above
> each push button changing according to which sub menu is displayed in the
> LCD panel ie when you press one of the buttons a sub menu executes which
> means that subsequent presses of the same button control different
> instrument parameters. (Its a very common solution found wherever space
> limits both the display size and numbers of buttons)
>
>
>
> Many thanks in advance, all advice gratefully received.
>
> Cheers
>
> Bill
>
> wsymonds@clara.co.uk

Bill,
Here is the way I would approach this. Hopefully I can describe it
meaningfully.
Start will a top level VI that recreates the main menu with the buttons and
text
as seen on the instrument. Save this VI (ie as Main.vi) and then save another
copy with a name
that relates to ONE of the buttons on Main.vi (for instance if a button is
labeled Setup, then save the
second vi as Setup.vi. Change the buttons, labels , etc to match the menu
appearance of this sub-menu.
On Main.vI have the button labeled Setup call the VI Setup.vi. You may also
want to have a button
labeled back or quit or similar to get back to Main.vi. If you follow this
apporoach what you will have
is a number of VIs each mimicing the appreance of the LCD after the related
button is pressed.
When all this is done you can go to each VI and have it send the appropriate
commands to the instrument.

This may seem like more work, but it is much easier to modify / maintain.
If you would like a small example let me know and I will e-mail you one.
Also check the examples (espcially the Dynamic load example) these
should give you some idea about how to implement the windowing system.

Kevin Kent
0 Kudos
Message 2 of 5
(2,383 Views)
In article <3957C051.469ECB3D@usa.alcatel.com>, Kevin.Kent@usa.alcatel.com
(Kevin B. Kent) wrote:

> Bill,
> Here is the way I would approach this. Hopefully I can describe it
> meaningfully.
> Start will a top level VI that recreates the main menu with the buttons
> and
> text
> as seen on the instrument.

Thanks for that Kevin, I've tried a few things today and have decided that
making the VI emulate the hardware is too restrictive (read difficult 🙂
The tip of dynamically loading VIs will work well however and today I
found out how to use a global variable which I think will make things much
more straight forward.

Thanks again,

Regards

Bill

wsymonds@clara.co.uk
0 Kudos
Message 4 of 5
(2,383 Views)
....

> I've tried all sorts of things but have so far been unable to figure out
> how to do the menu/push button type interface using LabView. I tried to
> write a VI which has a single boolean control (switch until released
> mechanical action, the type which mimics the stand alone mode) which
> increments a digital indicator by +1 with each press, whilst still running
> the VI. I thought that if I could achieve this then I could do what I
> wanted to do using LabView. But I've not been able to do this simple
> thing!
>

Start out with the single Boolean VI. Switch from a switch to a latched Boolean.
In particular, the Latch on Mouse Down, or the Latch until Released. The
first will be read once and pop back up when read by the diagram. So it will
be read on
ce unless the mouse is pressed again before the diagram reads
it. The
second will be read at least once, but will stay True until the mouse
goes up,
and the diagram reads it.

After this, you will likely want to build an array or cluster of these buttons
so that this is easier to manage. Then surround this with a cluster or array
of string controls.

Now that I've told you how to do what you are asking for, I'd highly recommend
another approach. The technique of reusing buttons for lots of actions is
being used by the HW because that is what choice they have. It isn't possible
for them to add more buttons, bring up dialogs, etc. It took many
man-years for
someone to build the interface to your instrument. You probably don't need
all of the functionality duplicated on the remote computer. You
probably need
access to a dozen or so actions. Work on a decent panel using rings, buttons,
sliders, or whatever makes sense to see on the computer screen. Then
use VISA,
GPIB, or whatever
transport you are using to communicate with the instrument.
Don't worry as much about how the instrument looks, worry more about the options
and the results that you need to present on the computer.

Greg McKaskle
0 Kudos
Message 3 of 5
(2,383 Views)
In article <39580C2C.22560EB7@austin.rr.com>, gmckaskle@austin.rr.com
(Greg McKaskle) wrote:

> Don't worry as much about how the instrument looks, worry more about
> the options
> and the results that you need to present on the computer.
>
> Greg McKaskle

Thanks for that Greg, I had forgotten the mechanical action example!
Simple to do what I wanted but it rapidly highlights how difficult and
messy it would be to make a VI work using the reusing buttons technique.

Thanks again for the advice, I think your right about what should have
priority. Emulating the hardware would be nice but not at the expense of a
good computer interface, which it would be. If I can make the VI intuitive
enough then the operators shouldn't have a problem.

Regards

Bill


wsymonds@clara.co.uk
0 Kudos
Message 5 of 5
(2,383 Views)