08-20-2015 12:37 PM
Hello. I would like to know how I could create a "Run" button on a Vi so that the operator wouldn't have to go to menu bar to start Vi, if this is possible. Thank you
Solved! Go to Solution.
08-20-2015 12:39 PM - edited 08-20-2015 12:40 PM
The VI properties, in the Execution options, has a Run When Opened option. This will probably do what you want.
Otherwise, you will need to click the Run button to start the VI unless it is called by reference, or you build an executable.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
08-20-2015 12:40 PM - edited 08-20-2015 12:40 PM
Use a state machine and make sure the VI is set to run when opened. Start in an idle state. A VI used by an end user should never be in edit mode or stopped.
08-20-2015 03:15 PM
Simply build an executable. Your Operator is probably not running on a machine with LabVIEW, but rather just wants a Program, right? That's an Executable. When you double-click it, it opens and runs. If you want even more "hands-off" behavior, make it part of the PC's Startup code, so when the PC is rebooted, the code automatically runs.
Is this what you mean?
Bob Schor
08-20-2015 03:32 PM
@Bob_Schor wrote:
Simply build an executable. Your Operator is probably not running on a machine with LabVIEW, but rather just wants a Program, right? That's an Executable. When you double-click it, it opens and runs. If you want even more "hands-off" behavior, make it part of the PC's Startup code, so when the PC is rebooted, the code automatically runs.
Is this what you mean?
Bob Schor
Simply build an executable. Your Operator is probably not running on a machine with LabVIEW, but rather just wants a Program, right? So, to make sure I understand you, this will run on a PC that doesn't have LV installed? Sorry to sound silly but I really don't know the answer to that and I think I am mis-understanding you.
08-20-2015 03:43 PM
LabVIEW is a programming language and we coders use the development system to create our code and run it. But just like any other language you can build an executable that can be distributed to any other computers that don't have the development system. LabVIEW requires a run-time engine on the distributed system and whatever drivers you may have used in you code (DAQmx, VISA, etc). You can build an installer too. That takes the executable, packages in the run-time engine and any required driver packages and makes an MSI like package you can easily distribute. Search LabVIEW Build Application for more details...
08-20-2015 03:44 PM
The ability to create an executable comes with the Application Builder. The Application Builder can be purchased as an Add-on or is included with LabVIEW Professional. This is the best way to give your customer the finished application. If you are delivering a product, it's a must because you're not going to install your LabVIEW environment on your customer's computer.
If you are developing on a computer that will always have LabVIEW on it (like a classroom student licenced LabVIEW, or a lab with a test setup), it's more cost effective to use the LabVIEW Development environment.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
08-20-2015 03:44 PM
You need the LabVIEW RunTime Engine for the particular version of LabVIEW (e.g. LVRTE2014) installed. I'm assuming that you are not doing lots of device I/O -- if you are, you'll also need Device Drivers. When you build an Executable, you can also build an Installer (I've never had to do this, myself, so I don't know all the details) that will handle the Installation for you.
In my case, we have one PC that collects the data and is connected to hardware. It has LabVIEW installed, with all the necessary drivers. I build an executable on this machine, and when we collect data, we simply double-click on the Executable's shortcut. Other than I, noone runs LabVIEW directly on this machine.
The data that is collected needs to be analyzed, and we have separate programs for that. I have all of those executables stored on a Share that everyone can see, along with the installer for the LabVIEW RTE (which they only need to run once, unless I upgrade the code to a new version of LabVIEW). All they need to do is to create a shortcut to the executable on the share, or pull down their own copy, and double-click.
Bob Schor
08-20-2015 03:46 PM - edited 08-20-2015 03:47 PM
deleted, info given already by prev posts.
08-20-2015 04:00 PM
@James.M wrote:
The VI properties, in the Execution options, has a Run When Opened option. This will probably do what you want.
Otherwise, you will need to click the Run button to start the VI unless it is called by reference, or you build an executable.
This is what I originally wanted. However, I didn't know about building the executable. Really all of these responses qualify as a "solution". Thank you very much everyone.