LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Start & stop buttons xcontrol

i want to create two button 

1-Start Button :run the current VI 

2-Stop Button : to abort execution

i tryed that with Xcontrol but I had a problem

when the start button is activated I can not do anything

what should i do?

0 Kudos
Message 1 of 4
(2,672 Views)

You probably won't need Xcontrols for most applications in LabVIEW.

 

It sounds like you might want to think about taking a step back from your immediate development targets and spend a bit of time training to become familiar with the basics of LabVIEW. If you have a service contract, you may be entitled to free on-line training. LabVIEW Core 1 & 2 could be useful to you perhaps. Otherwise, I haven't done them myself but there are 'Getting Started' tutorial modules here. Module 1 seems to be mostly about LabVIEW capabilities etc but later modules may provide some insight as to how to go about simple tasks such as the one you are asking about here. There are more training resources on the front page of this board.

 

Good luck!

Message 2 of 4
(2,657 Views)

You already have these buttons in the toolbar. No code needed! 🙂

 

(I have the feeling that you are trying to duplicate my silly old code posted long ago. Have you read that entire thread? Why didn't you post a link to make things more clear?)

Sorry, posting by phone, links are more difficult for me...

 

Taking this one step in a better direction, edit mode is pointless unless you are actually developing, so create a simple state machine with a state with activity and an idle state and switch between them based on your button(s). Since you only have two states, a single Boolean is sufficient. Make the vi "run when opened", starting in the idle state.

0 Kudos
Message 3 of 4
(2,617 Views)

When developing, you should ask yourself two questions:

 

1) How long will this take to develop

2) How much time do you expect this will save in aggregate.

 

In this case, you're going through the work to develop a start and stop button.  You're going to spend far more time than you'll save.  Is this a learning exercise or something you'd be better off eliminating?

0 Kudos
Message 4 of 4
(2,596 Views)