user events.tips,tricks and sundry chris roebuck ni days 2013
DESCRIPTION
NI Days 2013 User Events Tips Tricks & Sundry Presentation By Chris RoebuckTRANSCRIPT
![Page 1: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/1.jpg)
NI Days 2013
User Events: tips, tricks and sundry
Chris Roebuck
![Page 2: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/2.jpg)
Hello & Welcome
• Chris Roebuck (aka croebuck)
![Page 3: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/3.jpg)
As a courtesy to others…….
Leave your smartphone switched ON
Please Tweet your friendsPlease Update your LinkedIn statusPlease Post on your Facebook wall
Make your friends jealous you’re here learning cool new stuff and they’re not !!!
![Page 4: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/4.jpg)
Lets give some credit….• “User events, tips, tricks and sundry “
– Presented by Jack Dunaway at the 2013 European CLA Summit held in Paris
• “Everything You wanted to know about events (but were afraid to ask)”– Presented by Norm Kirchner at NI Week 2013
![Page 5: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/5.jpg)
Show of hands…….
![Page 6: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/6.jpg)
I don’t need no stinkin’ events !
![Page 7: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/7.jpg)
History Lesson
Before 6i the only real option was to “poll” the control values
Remember doing this ?
![Page 8: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/8.jpg)
History Lesson 6.1
LabVIEW 6.1 quietly introduced the Event Structure and gaveus some limited access to static VI Server events
![Page 9: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/9.jpg)
History Lesson 7 Express
Brought us “dynamic” event registration
![Page 10: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/10.jpg)
History Lesson 8.0History Lesson 8.2
Brought us .net events & event callbacks
![Page 11: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/11.jpg)
and now 2013
…and now we’ve got some new primitives and features likePriority events and the ability to flush the event queue
![Page 12: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/12.jpg)
Syntax – Static Events (VI Server)
Statically bind an event “handler” structure to a VI Server event at edit time using the event configuration dialog
![Page 13: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/13.jpg)
Syntax – Dynamic Events (VI Server)
Dynamically bind an event “handler” structure to a VI Server event at run time
![Page 14: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/14.jpg)
Syntax – Dynamic / User / Custom Events“The Palette”
Publisher
Subscriber
![Page 15: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/15.jpg)
Semantics
![Page 16: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/16.jpg)
Demo’s & Myth Busting
![Page 17: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/17.jpg)
Myth #1: Events are slow
![Page 18: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/18.jpg)
Myth #2 : Events Can’t Handle Big Data
![Page 19: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/19.jpg)
Myth #3 : Events Are Dangerous
![Page 20: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/20.jpg)
Events For Messaging
Message 1
Message 2
Message 3
MSG Producer
MSG Consume
r
Publisher SubscriberSubscriber Producer Consumer
![Page 21: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/21.jpg)
Events For Messaging
How do we do that ?
![Page 22: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/22.jpg)
…..but what about objects?
![Page 23: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/23.jpg)
Private & Public Events API
And fire it !!!
Obtain a reference to
the event
![Page 24: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/24.jpg)
Summary
• Scalable (Actor Oriented Design ?)• Loosely Coupled (Reusable) Components • Testability• Easy to create an API (Private & Public Events)
![Page 25: User events.tips,tricks and sundry chris roebuck ni days 2013](https://reader033.vdocuments.site/reader033/viewer/2022061114/545c3671b1af9f280a8b46c6/html5/thumbnails/25.jpg)
Take Home Point
User Events are a lightweight, easy-to-use native feature with some really cool functionality.
SSBV use them a a primary way of performing intra-process communications.
They just got a whole lot better in LabVIEW 2013 so if you’ve dismissed them, take another look