Escolar Documentos
Profissional Documentos
Cultura Documentos
com/labviewzone
c
jession Focus
Improve application performance
for UI-intensive applications
Modularize code making it easier to
read
O
þverview
¢
Effective User Interfaces
K
Elements of Interactive Interfaces
Developing Interactive Interfaces with
Polling
While loop checks the value of controls
Code executes based on the control value
Drawbacks of polling
± Processor intensive
Code must process the control value each loop
Application can appear unresponsive or sluggish
± Can miss user actions
Reaction of the code is dependent on data flow
±
User Interfaces with Polling
Demonstration
Ö
UI Development with Event-driven
Programming
Increases application responsiveness
Easier to read and manager your code
]
Event-driven Programming
Demonstration
s
What is an Event?
An event is an action that triggers a change in state
± User initiated
button press
mouse click
± þj initiated
timeout
± joftware initiated
message from another program
variable reaches a specific value
What is an Event Handler?
Mhe LabVIEW Event jtructure
O
Configuring an Event Demonstration
¢
Parts of an Event jtructure
Event jelector Label ± identifies
currently shown event case
K
Parts of an Event jtructure
Event Filter Node - allows you to change or discard event data
for a Filter event before the event is completely processed
Configuring an Event
Right-click
±
Event jpecifiers
Available Events
Ö
Mypes of Events
]
Notify and Filter Events
Notify Events
Notifies LabVIEW that a user action has
already occurred; available only in the Event
Data Node
Filter Events
Validates or changes the event data before
the user interface can process it preventing
the change from affecting the VI; available
in the Event Filter Node and Event Data
Node
s
Additional Events
Right-click Menus
± Registers events based on right-click menu
activation or selection
± Works with user-defined right-click menus or the
default application menu
Drag and Drop
± Drag and drop data between controls and indicators
± Useful alternative to copy and paste
O
Additional Events Demonstration
O
LabVIEW Event jtructure Review
OO
Use Memplates for the Event jtructure
User Interface Event Handler
Producer/Consumer (Events)
jtate Machine
Parallel Loop VI Architecture
Queued Message Handler
Producer/Consumer (Data)
O¢
Event-driven Programming Mips
Make sure Event jtructures are always in loops to
handle events
Put Latched Booleans inside of the event case handling it
Programmatic changes Dþ NþM generate events
An event-handling loop is not a state machine
Use a jtop event when in a loop
Never place an event structure inside of another event
structure
OK
þther Resources
O
Courses
New User Experienced User Advanced User
LabVIEW Basics I LabVIEW Intermediate I LabVIEW Advanced I
LabVIEW Basics II LabVIEW Intermediate II
jkills learned: jkills learned: jkills learned:
LabVIEW environment navigation Modular application development Large application design
Basics application creation using jtructured design and Advanced development
LabVIEW development practices techniques
Basics of data acquisition and Inter-application communication Implementing multideveloper
instrument control and connectivity techniques projects
Certifications
Certified LV Associate Certified LabVIEW Certified LabVIEW
Developer Exam Developer Exam Architect Exam
jkills tested: jkills tested: jkills tested:
LabVIEW environment knowledge LabVIEW application development Làm ch ng dng LabVIEW
expertise
O±
Connect with the LabVIEW Community
OÖ
Questions?
Mhank You