Skip to content

Commit cb64e46

Browse files
adding event sources section
1 parent 63c9888 commit cb64e46

File tree

5 files changed

+39
-6
lines changed

5 files changed

+39
-6
lines changed
Loading
Loading
Loading
Loading

www/en/modules/ROOT/pages/event-sources.adoc

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33

44
== User Interface
55

6-
The first source of events, you come across when starting with {lv} are the events generated by the UI when a user of your application use the mouse or the keybard.
6+
The first source of events you come across when starting with {lv} are the events generated by the UI when a user of your application use the mouse or the keybard.
77

8-
Example code: 01a - Event Sources - User Interface.vi
8+
The {es} is the way to detect the event and execute the appropriate caode.
9+
10+
NOTE: Before the introduction of the {es} (a long time ago), LabVIEW developpers had to periodically poll the controls to detect interactions with the {ui} 😓.
11+
12+
Example code: *01a - Event Sources - User Interface.vi*
913

1014
.Front Panel
1115
image::03-event-sources-ui-fp.png[]
@@ -15,24 +19,53 @@ image::04-event-sources-ui-dg.png[]
1519

1620
== User Events a.k.a Custom Events
1721

18-
1922
[quote,John Medland. MLUG October 2020]
2023
User Events, the worst named feature in {lv}
2124

2225
Behind this name, you'll find the way to create and generate events programmatically.
2326

2427
NOTE: This source of events is the corner stones of many event driven architectures. The https://www.dqmh.org[DQMH framework] is probably one of the most popular framework based on the {lv} user event feature.
2528

26-
Example code: 01b - Event Sources - Custom Events.vi
29+
Example code: *01b - Event Sources - Custom Events.vi*
2730

2831
.Front Panel
2932
image::05-event-sources-user-event-fp.png[]
3033

3134
.Diagram
3235
image::06-event-sources-user-event-dg.png[]
3336

34-
== Callback
37+
== Event Callback
38+
39+
This source of event doesn't involve the use of an {ev}.
40+
Once registred to an event the Callback VI is executed each time the event occurs.
41+
42+
NOTE: This kind of event breaks the usal data flow we are used to
43+
44+
// List examples of situation where event callback can be useful
45+
46+
Example code: *01c - Event Sources - Event Callback.vi*
47+
48+
.Front Panel
49+
image::07-event-sources-callback-fp.png[]
50+
51+
.Diagram
52+
image::08-event-sources-callback-dg.png[]
53+
54+
.Callback VI diagram
55+
image::09-event-sources-callback-vi.png[]
3556

3657
== Daqmx
3758

38-
IMPORTANT: This example requieres the NI Daqmx driver to be executed.
59+
This source of event is problably the less known.
60+
With it, you can handle acquistion event in the {es}.
61+
It makes straigtforward the use of the other sources of events in the loop that handle the acquistion.
62+
63+
IMPORTANT: This example requieres the NI Daqmx driver to be executed.
64+
65+
Example code: *01d - Event Sources - Daqmx Event.vi*
66+
67+
.Front Panel
68+
image::10-event-sources-daqmx-fp.png[]
69+
70+
.Diagram
71+
image::11-event-sources-daqmx-dg.png[]

0 commit comments

Comments
 (0)