LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event stucture

Do you expect your user to run this VI out of LabVIEW or do you plan to give them an executable that they run?

 

If in the LabVIEW IDE, then the run arrow in the toolbar runs the VI.

 

If in an executable, then you will want a button to perform a single run and then go back to idle.  This still can be simply handled in the event structure.


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 11 of 20
(1,631 Views)

@orginal-iceman wrote:

 

I wanted to be able to push the "run" icon next to the waveform so that it will start the vi only. In many codes I see that a operator selects the right arrow icon left side of window to run the vi, then the "run" button next to the waveform is the one that actually starts the program. Maybe I am confused on the way the the vi should run when a user runs this program.

 


As I said, make the Vi into a state machine and start in an idle state with the VI running. Add a button that starts the more functional parts. The distributed code should be set to run when opened and not even show the toolbar. The program should be closed with the [X] in the upper right, something you can trap with an event to possibly run shutdown code if needed. A end user should never need to start or stop a VI. Stop chasing  unicorns. What you think solves your problems is a horrible kludge, forget about it!

Stick to standard behavior! No regular program (browser, text editor, etc.) needs to be started or stopped or needs special instructions. Make it behave in a familiar way!

0 Kudos
Message 12 of 20
(1,630 Views)

Hi Knight,

 

I expect the user to push the "run" button to perform a single run form the executable.  If you can please show me how in the event structure.

 

Thanks for your help.

 

Elias

0 Kudos
Message 13 of 20
(1,614 Views)
What is the definition of a "single run"?
0 Kudos
Message 14 of 20
(1,605 Views)

Sorry, I meant a continious run once the "run" has been pushed. I will try to be more specific in my questions. So bottom line a user will push the "run" button from the executable, and be able to "clear" the waveform or "stop" the program all within the executable.

 

Thanks again

 

Elias

0 Kudos
Message 15 of 20
(1,592 Views)

This should give you some ideas. Modify as needed.

Message 16 of 20
(1,570 Views)

Thank you Knight

0 Kudos
Message 17 of 20
(1,568 Views)

Thank you Knight

0 Kudos
Message 18 of 20
(1,543 Views)

Hi Knight,

 

My next task is to communicate with a Keysight  E3649A power supply within the program you modified for me. I have already loaded the Keysight  E3649A driver into my program.

 

I get this error after after I run my program even though I am able to control my power supply and output a single voltage.

 

1. "Error -1300 occurred at HP66xxA Error Query;instrument reports the following:-222:  Data out of range-222:  Data out of range -222:  Data out of range-222:  Data out of range+0:  No error

 

Anyway my task is:

 

I need to control a 10vdc fish pump that we use to remove water out out of a fish tank, and refill it when the tank is low in water. There will a water level sensor to detect a certain water level and turn on the pump when the water is low. I need to figure a way to output from the power supply a -10vdc and a +10vdc or write a if else statement to output the differant voltage levels. By the way I am not able to output a negative output. This power supply has a dual output and not sure how to do this. When I run the vi it outputs the same voltage to output 1 and 2.  Any help would be appreciated. I have attached my vi for you to view when you get a chance.

 

Thank you again

 

The Orginal Iceman

 

0 Kudos
Message 19 of 20
(1,457 Views)

@orginal-iceman wrote:

 

My next task is to communicate with a Keysight  E3649A power supply within the program you modified for me. I have already loaded the Keysight  E3649A driver into my program.e Orginal Iceman


This seems a completely different problem, so you probably should start a new thread.

0 Kudos
Message 20 of 20
(1,437 Views)