LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I hide the toolbar abort button using the Property Node whilst a VI is running?

Hi all,
 
I have a vi that I would prefer people not to be able to close once it begins a particular part of its code. This particular part of the code is only a small portion, but lasts a few minutes and if closed during the process it will cause problems with some other devices attached to the computer. However, as much as I'd like to just hide the Abort button on the toolbar completely using the Window Appearance settings (using LabVIEW 6i) it has to be visible and 'working' for most of the time, so this option isn't open to me.
 
Is it possible to ghost, hide, or 'turn off' this Abort button (and perhaps also the X at the top right) whilst a vi is in the middle of running? I've tried looking at the Property Node but all I can do is turn off the Menu, not the Toolbar.
 
It will save me a lot of trouble separating this particular bit of code out and putting it into a separate 'unabortable'  vi.
 
Thanks in advance,
 
Riggy.
0 Kudos
Message 1 of 13
(9,631 Views)

7.1 has the properties for this inside the Toolbar part of the VI class.

The Front Panel Window part includes a Closable property.

Another option is to hide the abort button and instead use the Abort VI, which can be found in the Application Control palette. Add a case for it in your UI loop or make an indepedent loop for it. Obviously, the best solution would be to write the VI in such a way that you will be able to properly stop it, but I understand you can do that (why, by the way?).


___________________
Try to take over the world!
Message 2 of 13
(9,622 Views)

Sure. You can do all that you requested.

1) Application Control --> Property Node

2) Right-Click --> Select Class --> VISA Server --> VI

3) Right-Click --> Properties --> Toolbar --> Show Abort Button           (to control the abort button)
   or                                                           --> Visible                               (to control the visibility of the toolbar)
   and/or                                 --> Front Panel Window --> Closable      (to control the ability to close the window)

See the attachment (LV v7.1.1)

Message 3 of 13
(9,618 Views)
Thanks tst,
 
I agree my question sounds odd. I'm writing code for people who like to frequently stop all my vi's by aborting them - regardless of all the lovingly included stop buttons that close down all the network and RS232 connections properly. Many a time has a student (I work at a University) come to me crying about a vi, only to see that they've jammed/crashed a piece of equipment because they failed to close the vi properly and left TCP connections etc. open. This can typically cause the vi to fail on startup because the device won't respond to calls. Maybe I could code them better?
 
Anyway, this latest vi is a calibration tool, and it changes settings on a pressure transducer device. Of course, the settings have to be restored once calibration is complete, but if the user (student) aborts the program midflow then the wrong settings will be left on the device - and it'll be me them come crying to again. Thus it would be nice to ghost out the abort button while this piece of code runs. If I completely disable the abort button, it could cause a lot of problems with people not knowing how to stop the code - even with a great big STOP button on the centre of the font panel! (Yes, they can be that thick Smiley Sad) So I thought it would be good to leave the abort button available and simply disable it during this particular part of the code.
 
Thanks again Smiley Happy
 
Riggy
0 Kudos
Message 4 of 13
(9,614 Views)
I don't believe it! Smiley Surprised
 
That's exactly what I wanted to do, and that's exactly where I was originally looking to do it too! I just completely missed it! Smiley Sad
 
Thanks a lot, thats brilliant!
Smiley Very Happy
 
Riggy
0 Kudos
Message 5 of 13
(9,614 Views)
I think your only recourse with the abort button is to hide it since, as far as I can tell, there are no capturable VI events associated with it, but you may want to leave the close-window option available and if you want to cover all your bases then you also need to consider the application exit event. Again see the attached example.
Message 6 of 13
(9,598 Views)

Riggy,

you should try to educate your users not to use the abort button.  Start with yourself!

Since your users are students, I assume they are still able to learn Smiley Wink
 
You can help them learning by always showing up a stop button and always program in a way that your algorithm end in a proper way (I assume you did that) ... AND don't (never.... ok, just during debugging) show the abort button in the running vi's .
 
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 7 of 13
(9,505 Views)

Warren,

Could you provide your Stop Example.vi for version 7.0 at all please? I don't have version 7.1.1 and cannot load it.

Thanks,

Riggy

0 Kudos
Message 8 of 13
(9,588 Views)
Sure. Here it is. LV v7.0

Message Edited by Warren Massey on 12-23-2005 06:39 AM

Message 9 of 13
(9,577 Views)

Henrik,

  • You can never be sure who is going to be using code once it is released to the field.
  • A developer must always assume the worst of a user and must program to protect him against making bad decisions.

Since there is no way to intercept a press of the toolbar abort button, if it is important for the user to not press it during some phase of the execution of the program then I agree with Riggy, it must be hidden during those phases.

Warren

0 Kudos
Message 10 of 13
(9,448 Views)