02-26-2016 11:20 AM
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.
02-26-2016 11:31 AM
@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!
02-26-2016 02:26 PM
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
02-26-2016 02:35 PM
02-26-2016 02:55 PM
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
02-26-2016 03:38 PM
This should give you some ideas. Modify as needed.
02-26-2016 03:51 PM
Thank you Knight
02-27-2016 12:04 AM
Thank you Knight
03-01-2016 02:26 PM - edited 03-01-2016 02:27 PM
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
03-01-2016 02:57 PM
@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.