LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

about user event

I have a basic question about  a user event (UE).
I got to know UE needs at least two "while structure" (for main event structure and generate UE).
Even In this case, is there still some advantage such as reduction of CPU time and guarantee the interaction of block diagram?
Cast a glance at two while structures, what is different thing with normal while structure?
 
it seems to exist the limitation of using event.
What else in using Labivew?

메시지가 09-09-2005 05:39 AM에 labmaster에 의해 편집되었음

0 Kudos
Message 1 of 2
(2,447 Views)

First of all, yes event structures are not only in the "base" version of LV. But given the number of other things that NI excludes from that package I can't imagine anyone doing any sort of serious work with it. I've always seen the base version as a very high-priced demo package...

Second, if you structured a real program like that example, there would not be much reason for using events. However, most real applications would typically only have just the one loop to handle the event. The event would be triggered in either other VIs (by passing the event reference to them as a parameter) or in other events in the same VI. The attached shows one such possibility... With this you type characters into the input string until you press the return key. The code detects this character and generates the user event to transfer the data to the output display. Replace the output string indicator with a VI that sends a command string to an instrument, and you can see why you might want to do this.

Third, never forget to incorporate error handling in event structures, other wise you can be left in a situation where you can't exit the event loop because an error prevents you from generating the event required to exit.

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 2
(2,441 Views)