LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Andreas_Pfichner

Eventstructure with common code option

Status: New

Hi,

 

my suggestion is to make it optional within the eventstructure to execute code on each event, before the event specific code will be executed, like follows:

Eventstructure_raw.JPG

Please see the following example for a better understanding of my suggestion:

Eventstructure_code_example.JPG

This option would make it possible to execute common code which is needed on every or almost every event, or to execute common code e.g. on any userevent. A filter option would be neede here to be able to filter events on which the common code should not be executed, e.g. to only use this option on userevents.

 

With best regards

 

AP

25 Comments
Manzolli
Active Participant

For the example I gave, fine. But this not apply to a general case because it increases coupling.

André Manzolli

Mechanical Engineer
Certified LabVIEW Developer - CLD
LabVIEW Champion
Curitiba - PR - Brazil
Intaris
Proven Zealot

I don't see this feature as increasing coupling.  Instead (of course with the usual caveat of "when used properly") it increases cohesion by placing all relevant code into a singly structure.  Again, most of my code has several event structures, often in parallel loops with plenty of user events pinging back and forth.  This feature would allow me to basically have all of my  relevant code for a particular interface within a single structure.

Manzolli
Active Participant

@Intaris: The suggestion made by X using XControls increases coupling, the proposed idea not. Sorry not being clear about that.

André Manzolli

Mechanical Engineer
Certified LabVIEW Developer - CLD
LabVIEW Champion
Curitiba - PR - Brazil
Intaris
Proven Zealot

Ah, right.  I was wondering.... Sorry for the confusion.  At least something I'm good at....

X.
Trusted Enthusiast
Trusted Enthusiast

Here is another missing productivity feature of the Event Structure:

 

Right Click on FP node find event structure cases