LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I put abort execution button and Run button in GUI ?

Dear All ,

Can I put "abort execution button" and "Run button" in GUI with bigger buttons ?

Thanks.....

0 Kudos
Message 1 of 20
(4,907 Views)

You shouldn't use "abort execution". Never ever!

 

What you are looking for is a state machine with idle case. In this idle case, you poll the "run" button. Once your machine is working, all your transitions will poll the "abort" button (i would rather call it "stop" in distinction to "quit") and handle it appropriately.

 

Norbert 

 

EDIT: Danil is of course right. The buttons i refer to are front panel elements (not connected to the "buttons" in the icon bar!) and so the VI has to run in order to poll those buttons. 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 20
(4,900 Views)
As I understand from your question If you want a button that starts running the VI, that won't be easily possible, because the VI needs to be running in order to read the button state. Please explain your question more clearly.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 3 of 20
(4,896 Views)

@Norbert_B wrote:

You shouldn't use "abort execution". Never ever!


Unless you have a situation like this. (note that it's from the same poster)

 

To OP: Are you simply asking for a bigger toolbar?

0 Kudos
Message 4 of 20
(4,888 Views)

@danil33 wrote:
As I understand from your question If you want a button that starts running the VI, that won't be easily possible, because the VI needs to be running in order to read the button state.

Not exactly. XControls get around this "limitation". See example... http://forums.ni.com/t5/LabVIEW/Adding-Run-Button-to-VI/m-p/1027332#M457607

0 Kudos
Message 5 of 20
(4,886 Views)

@smercurio_fc wrote:

@Norbert_B wrote:

You shouldn't use "abort execution". Never ever!


Unless you have a situation like this. (note that it's from the same poster)[...]


Still i insist on NEVER EVER!

It always gives me stomacheache seeing something like this. To be more precise: You should never ever come into a situation like this!

 

There is a reason for advanced design patterns like producer/consumer or actor framework......

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 20
(4,881 Views)

I wasn't disagreeing with you Norbert. I was simply pointing out a suspected reason for the question, given the earlier post. Smiley Wink

0 Kudos
Message 7 of 20
(4,875 Views)

Exactly I want to create button in gui and link it to " Run button in toolbar" and create other button link to "Abort button in toolbar"

0 Kudos
Message 8 of 20
(4,844 Views)

This is not possible but if it was, not suggested (the abort button).

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 9 of 20
(4,839 Views)

Hi wMw.

             Aborting normally works fine for very small applications or architectures but not for anything after that. Aborting a VI can leave things in states that you don't want to be in or references open. Sometimes you do need to Abort the code though (other programming environments use Abort buttons) so I don't think we can get rid of it entirely.But try to avoid it maximum.

 

EDIT:why you are trying to do such a strange thing??

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 10 of 20
(4,836 Views)