TLB – Top Level Baseline

Слайд 2

Top Level? A VI that can be considered the primary of

Top Level?

A VI that can be considered the primary of a

system
or major component of a system
Typically has front panel shown
but not a requirement
Controls flow of application and processing
Processing happens within executed states
Runs for lifetime of application or component
Слайд 3

Get Installed Install VI Package Manager (free community edition) www.jki.net Install

Get Installed

Install VI Package Manager (free community edition)
www.jki.net
Install package
http://lavag.org/topic/13003-tlb-top-level-baseline/
Restart LV
Refreshes tools

menu
Слайд 4

Get Developing Tools>>TLB – New Baseline Follow Interactive Dialog

Get Developing

Tools>>TLB – New Baseline
Follow Interactive Dialog

Слайд 5

Baseline Architecture Application INIT once and only once code Event Handler

Baseline Architecture

Application INIT
once and only once code

Event Handler Loop
user interaction response

Primary

Execution Loop
main flow of program

App Close
close references & shutdown

Слайд 6

Application INIT Sequence of cases primes the application stacked instead of

Application INIT

Sequence of cases
primes the application
stacked instead of flat for cleanliness
Not

‘all’ init. code goes here
Just once and only once stuff
Enqueues specific set of states to Primary Execution
Слайд 7

Event Handler Responsive to button pushes and value changes Pre-defined cases

Event Handler

Responsive to button pushes and value changes
Pre-defined cases handle window

close and shutdown
Source of queued messages to Primary Execution
Слайд 8

Primary Execution Pre-defined cases handle common functions Init Error 95% of

Primary Execution

Pre-defined cases handle common functions
Init
Error
95% of work happens here
‘Default’ case

handles state typos
Слайд 9

Application Close Handles display consideration if built into EXE No real

Application Close

Handles display consideration if built into EXE
No real processing should

happen here
Use ‘Exit’ in Primary Execution
Слайд 10

The SHIFTER Master state cluster ALL data associated with application NEVER

The SHIFTER

Master state cluster
ALL data associated with application
NEVER send into sub-VI
Easily

add elements through Typedef shortcut
Слайд 11

‘User Parameters’ Scalar inputs on the front panel numerics, strings, etc.

‘User Parameters’

Scalar inputs on the front panel
numerics, strings, etc.
Register for ‘value

change’ event dynamically
Prevents event structure bloat
All terminals in 1 state: Update User Param.
Enables all param to be accessible to entire program without need for local Var
Слайд 12

‘Display Data’ Scalars, plots etc Any thing that needs to get

‘Display Data’

Scalars, plots etc
Any thing that needs to get updated on

the panel
Store in shifter to provide data access to entire app
Instead of outputting directly to indicator
Call ‘Update Display’ state to refresh display
Слайд 13

Extra Handy Things Gracefully shuts down both loops Idle state defaults

Extra Handy Things

Gracefully shuts down both loops
Idle state defaults to 1s

delay
Caches current values of controls on startup in case of change while not running
Graceful error in case of typo
Interactive or headless execution
Your choice
Error handling allows Stop OR continue