10-08-2009 04:20 PM
I want to set a 'Exit' button on the VI front panel so that when the VI is running, it shows a different text from the text after the VI quit.
Thanks,
Ryan
10-08-2009 04:29 PM
you can use an event structure for an exit button
and my question is are you sending text into a string indicator or are you wanting to change the test of the exit button?
if it is a string indecator just send a constant string into the indicator under the exit event.
if it is the exit button label you will have to use a property node.
10-08-2009 04:41 PM
Harold,
I will use the property node. I am using a LabVIEW base version, which does not have event structure function. Do you have other method?
I can differentiate the 'exit' status. Just before exit the program, I set the property node to 'quited'. But How do I differentiate between the open in edit mode and running.
Ryan
10-08-2009 04:47 PM
10-08-2009 04:53 PM
Hi Mark,
the event structure is not available in the base versions. It will be "visible" when code was generated in a "better" version, but will not be editable...
(See context help: "Installed with: Full Development System")
10-08-2009 05:02 PM
I think the solution can be as simple as this. You don't really need to do anything fancy to "detect" if a VI is running or not. On the VI block diagram, have the first thing you do be to call the property node to set the Button text to the run-mode text, and have the last thing you do be to set the Button text back to the offline text. Simple as that.
Use Error Cluster wires or Sequence Structures or any other dataflow paradigm to configure the execution order of the code in your VI.
10-08-2009 05:05 PM
10-08-2009 05:55 PM
I wonder why they would remove this basic feature from the base package.
I think that the answer is simple. $$$. To me, the event structure should be essential to any LabVIEW programmer...so I'm not sure why it isn't included. Was it ever included?
I find your title very deep. Here is my solution:
10-09-2009 08:02 AM
10-09-2009 08:17 AM - edited 10-09-2009 08:18 AM
Jarrod,
The diagram you attached is what I am doing now. The problem is, when you double click on the VI and loading it in the memory without running it, vs. you click the 'run' button at upper left corner, there is no difference in the boolean text of the 'Ok' button. Yes, we can always set the 'default' boolean text of the button as 'not running' so that it is different. However, I think there should be a better way of doing this.
I agree with other comments about the event function. Many examples uses event function which make me feel that the base version is not a complete version.
Thanks,
Ryan