I Find Your Lack of LabVIEW Programming Speed Disturbing
I Find Your Lack of LabVIEW Programming Speed Disturbing
This presentation has lots of LabVIEW demos. Sit closer to the front if you can’t tell the difference between these:
Darren Nattinger
Principal Engineer, CLA
LabVIEW R&D
ni.com
Before we get started...
Download a copy of this presentation here:
bit.ly/labviewspeed
Before we get started...
Shout out to NI Discussion Forums users!
Thanks for helping me with my “binary search” coding challenge last year!
https://forums.ni.com/t5/BreakPoint/Mini-Coding-Challenge-Binary-Search-sort-of/td-p/3861555
Presentation Outline
ni.com
This presentation will NOT be:
How to improve the runtime performance of your code
I’m showing you how to write code faster (not write faster code)
ni.com
Editing
Making changes to a LabVIEW document
VI, Project, Typedef, Library, Class, etc.
Adding/removing/modifying/configuring things
Three arenas in the LabVIEW environment where you make edits
Where do you make edits?
Tree
Project Explorer, Libraries, Classes
Mouse actions in a hierarchy, primarily 1D movement with left and right-clicks
Dialog
VI Properties, Class Properties
Mouse actions on a finite list of objects in a 2D space
Canvas
VI Block Diagram and VI Front Panel
Concerted mouse and keyboard actions in an arbitrary 2D space
There’s not much we can do to make Tree and Dialog interactions more efficient.
Canvas, on the other hand...
Canvas Edits - Demo
(there are summary slides after the demo)
ni.com
Demo Summary
Super Quick Drop – click to drop!
QD object shortcuts – Installed by default in LabVIEW 2016 and later
Press Ctrl-Space, then...
Ctrl-B – Set property/invoke node class
Ctrl-Shift-B – Set property/invoke node property/method
Including dotted properties in LabVIEW 2019
Ctrl-W – wire multiple objects together
Ctrl-Shift-W will also clean up the wired code
Ctrl-I – insert an object on one or more wires
Ctrl-Shift-I – smart insert a single object on multiple wires
Ctrl-R – remove selected object(s) and rewire pass-through types
Ctrl-P – replace one or more selected objects
Ctrl-D – create controls/indicators (type ‘req’ for creation of required inputs only)
2019 Editing Enhancements - Demo
ni.com
Demo Summary
Clean Up Front Panel (Ctrl-U) in LabVIEW 2019
Ctrl-Click to swap conpane connections (then Ctrl-U to update panel again)
Create options at the top of all terminal and wire right-clicks in LabVIEW 2019
Instant access to constant/control/indicator for any data type on your diagram
Might take some getting used to
Give it some time (like you did with Auto Tool, Quick Drop, etc.)
Give it more time
Escape hatch for curmudgeons: PopupMenus.ElevateCreation=FALSE
Istockphoto.com
Debugging
ni.com
Debugging
Most common debugging tools are Probes and Breakpoints
There are more efficient editing gestures to deal with probes and breakpoints
Debugging - Demo
ni.com
Demo Summary
Shift-Right-Click to bring up Tools Palette
Shift-Tab to switch back to Auto Tool
Edit > Remove Breakpoints from Hierarchy
Ctrl-Shift-W to manage windows
New debugging features in LabVIEW 2019
History Probes
Partial Execution Highlighting
Know your Tool Box!
ni.com
There’s a lot to know about LabVIEW
Every release includes new:
VIs
Functions
Language Enhancements
Editor Enhancements
Read the Upgrade Notes when you install the latest version
2012 – Conditional Tunnels 2013 - #Bookmarks 2014 – Replace Case Selector 2015 – Remove Space
ni.com
Demo Summary
Read the Upgrade Notes
Sets and Maps in LabVIEW 2019
New types for managing collections of data
New Utility VIs in LabVIEW 2019
Remove Duplicates from 1D Array.vim
1D String Array to Delimited String.vi
Delimited String to 1D String Array.vi
Random Number (Range) VI
I64, U64, DBL
Create Directory Recursive.vi
Create File and Containing Folders.vi
Wait for Configured Network.vi
Synchronize Data Flow.vim
Learn More about Sets and Maps tomorrow!
bit.ly/labviewspeed
StarWars.com
Use Quick Drop. Read the Upgrade Notes. Use more efficient programming techniques.
ni.com