LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

add event in event structure

How are events added to an evens tructure.. When I right click the event structure and say add event, the controls tab at the bottom left is not active. How can I add events?
Say I start with a blank new VI, and I place an even structure. Now how do I go ahead to add new value change events?
0 Kudos
Message 1 of 42
(4,116 Views)
smm,

the event structure is in first place designed to capture events from frontpanel objects. So if you don't have any controls on the frontpanel, you will not have anything to select.
If you have controls placed on the frontpanel, the control should be listed in the list in the lower part of the dialog and you should be able to select any available event for this control.
There might be another issue...
the event structure is not available in LV base package; nevertheless you can use VIs with it which use this structure. But you will never be able to modify the events caught by the structure.....


hope this helps,
Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 42
(4,110 Views)
As of now I don't have controls on the front panel because what I was trying to accomplish was place another VI in every event so it calls and iopes up the front panel of that VI.
What I have is 4 buttons. When I hit 1 button 1 code should run. If I hit the 2nd button another code should run. If I hit the 3rd button the 3rd code shoudl run and so on and so forth.
 
When I posted this query yesterday one of the LV users said you use event structures to do this.
 

Norbert B wrote:
There might be another issue...
the event structure is not available in LV base package; nevertheless you can use VIs with it which use this structure. But you will never be able to modify the events caught by the structure.....

What does this mena? Does this imply I cannot use event structures in LV 8.5. Is there a way around?
0 Kudos
Message 3 of 42
(4,108 Views)
LabVIEW is available in three different "setups" for every version. The three setups are:
Base Developement
Full Developement
Professional Developement

If you have access to the event structure via the palette, you have either full or professional.


Do you have experience in using "standard" case structures?
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 42
(4,103 Views)
Hi smm,

when you have 4 buttons on your FP they should be presented in the event structure - just create them before the event structure!
Next hint:
You should not call vis in the event structure that may take longer to run - your event structure will likely block the vi until that event is processed. Use some producer/consumer pattern to control process flow!

The event structure is only available (or: usable) to LV better than base package. What version (FDS, PDS?) do you use?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 42
(4,101 Views)


Norbert B wrote:
LabVIEW is available in three different "setups" for every version. The three setups are:
Base Developement
Full Developement
Professional Developement

If you have access to the event structure via the palette, you have either full or professional.


Do you have experience in using "standard" case structures?


We actually have the professional development setup. I do have access to the event structure via the palette from Programming <<Structures<< Event Structure.
 
And I do have experience using standard case structures.
0 Kudos
Message 6 of 42
(4,097 Views)


GerdW wrote:
when you have 4 buttons on your FP they should be presented in the event structure - just create them before the event structure!

This makes sense. I'm going to try it right away. I use the professional set up.


GerdW wrote:

You should not call vis in the event structure that may take longer to run - your event structure will likely block the vi until that event is processed. Use some producer/consumer pattern to control process flow!

I don't really follow this. What do you mean by the VI will be blocked by the event structure? Also I am not familiar with the producer/consumer pattern. I will have to read up first.

0 Kudos
Message 7 of 42
(4,095 Views)
Hi smm,

standard setting for the event structure is to block all remaining events (means: put them in a waiting queue, but don't process them) until the actual event has finished. The vi will not react to user input while processing the first event - the user will think it's crashedSmiley Wink

Thus you should not have any vis in your event structure that may take long to process...


Message Edited by GerdW on 03-13-2008 01:33 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 42
(4,093 Views)
 

You can think of the event structure as a very special case structure. Of course, there are differences. The most important:
You do not have any "case selector terminal" since the events define the next event case to execute.

Besides of the differences, the event structure also has cases which do not display at the same time. You have to define which event should "trigger" which case. This is done in the dialog you should get when you add an additional event. You have to select which events should fire the diagram contained in this eventcase. It shouldn't matter if you create the source of the event after or before the eventstructure itself, but you will only be able to select eventsources which already exists when adding the eventcase!

Another important note:
Event driven programming often leads to misunderstandings and/or misusage when starting to work with it. So there is a quite good KB you can find here which explains the caveats at using the event structure in LabVIEW.....

 



Message Edited by Norbert B on 03-13-2008 07:56 AM

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 9 of 42
(4,084 Views)

Do you think something like this will work without causing the problem GerdW was talking about in his previous posts?

Also how do I connect the buttons to the events?

0 Kudos
Message 10 of 42
(4,076 Views)