05-05-2008 07:36 AM
Hi
I have an application like the example from Labview called "Menu selection with events" and want to force the event handler to enter a certain stage when the condition is right without having to manually use the menu selection from the front panel. This enables me to implement a command line application where the application is automatically configured and automatically press the RUN button in the user menu. The RUN button is event driven.
Is this possible?
Thanks!
Br,
Peter
05-05-2008 07:43 AM
05-05-2008 07:48 AM
It sounds from your Q that Ton's "Dynamic Event Registration" Nugget may be a good thread for you to read if you are asking how to dynamically fire an event.
Ben
05-05-2008 07:48 AM
05-05-2008 07:50 AM
Hi It would be too much to post my original code here and to explain this but the event handler in my program is a true copy of the example found in the the LV help section called "Menu selection with event" But anyway I have attached the example here.
at runtime the menu selection can be performed manually but I want to force the event handler to enter a e.g. About selection when a certain condition is correct.
Br
Peter
05-05-2008 08:09 AM
Hi again
This attached code would do the job as I want to, but I would have to duplicate the event case and having two about boxex in the same event.. And this was not the purpose.
The purpose is to have the originally code and virtually be able to press the About button from the code like this attached code does when selecting the condition from the front.
br,
Peter
05-05-2008 08:33 AM
05-05-2008 10:40 AM
05-06-2008 01:51 AM
Hi All
Unfortunately I only have LV7 at work so I can not see your example Mike
Sorry for the button / menu select confusion..
OK, let me explain. On a
This configuration has been running in my program for several years now. Now there has been a demand for make my tool command line based so my program can be called from a batch job like " C:\MyProgram.exe /param1 /param2 /param3 " a.s.o. But in this configuration I need to continue the execution automatically by selecting the menu and selecting a menu item called "RUN" which in this case example I refer to the "about box". This enables the user to do several automatic test runs in a row with different parameters without "touching" the tool at all. However my only obstacle now is to automatically force the event handler into one of the cases which will continue the program execution. As in the example I can define a new USER event and when I configure the event handler, some of my Items in the event data node for controlling the test cases inside the event handler disappears and I am forced to define a new event structure which takes care of my user defined event but this was not the purpose. the purpose is to define that the event handler enters the test case "RUN" / about box in the example defined by the user event outside the event handler as if the user had selected the menu item "RUN" / about box in the example code..
So my question: Is it possible to "fool" the event handler to enter a test case selected by a defined user event without manually select the menu bar and select the "RUN" or the about menu item in the example code so the execution can continue beyond the event handler and do some measurements automatically?
Hope this clarifies my problem..
Br,
Peter
05-06-2008 03:10 AM