LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do start with button myrio

Hi everyone, who can help me to know how can i starting and ending my VI with the button of myrio 1900 and thank you.

0 Kudos
Message 1 of 6
(4,042 Views)

Since we are technically talking about an embedded device, you do not really want your VI/program to stop.  You just want it to stop doing something.

 

You need to set up your program to be a state machine.  One of the states will be an idle state where you are just looking for the button press before doing whatever it is you want your program to do.  In there, it can monitor a button press to stop and then go back to the idle state.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 6
(4,034 Views)

i don't understand very well so can you add me with an example or a VI and thank you.

0 Kudos
Message 3 of 6
(4,016 Views)

@amrimed wrote:

i don't understand very well so can you add me with an example or a VI and thank you.


If you don't understand LabVIEW, how do you expect to understand his VI?

http://www.ni.com/academic/students/learn-labview/

0 Kudos
Message 4 of 6
(4,011 Views)

State Machines


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 6
(4,005 Views)

@amrimed wrote:

i don't understand very well so can you add me with an example or a VI and thank you.


There isn't a VI that can help you understand this concept.  You need to grasp the concept before worrying about asking someone to do your work for you.  It'll be better for everyone involved.

 

First, you need to think about what happens when you push a button.  Let's say when it's not pressed it creates a 0 value.  When pressed, it creates a 1.  This is done in hardware circuitry.  But, it follows the old question about a tree falling in the woods making a sound.  If there's nobody listening, there isn't a sound.  If nothing is looking for the button press, there's no way to start an action.  You cannot start your VI based on this button.  That's why you were pointed towards the idea of a state machine.

 

In an embedded system, you want your VI to run on startup.  That way, it's always running in the background and looking for the button press.  Once pressed, it goes into a "state" that performs the task you have in mind.  It's not a VI.  Instead, it's a state.  When you press the button again, it goes back into the original idle state.  Doing this, you maintain the ability to read the next button press.

 

You should start by trying to make a VI that can handle this.  Then, transition the idea to your myRIO

Message 6 of 6
(3,970 Views)