Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

22
Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/ labviewzone

Transcript of Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

Page 1: Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

Tips and Tricks to Speed LabVIEW DevelopmentUseful Nuggets to Save You Time

ni.com/labviewzone

Page 2: Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

Background of Dan Shangraw, P.E.

• Graduated with a Bachelor of Science in Mechanical Engineering from Western Michigan University

• Licensed Professional Engineer State of Michigan

• Certified LabVIEW Developer

• 10 Years of Experience Developing Custom LabVIEW applications

• Owner of Automated Software Technology LLC.

Page 3: Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

Automated Software Technology

• Licensed Engineering Company that develops custom test, measurement, and control systems specializing in LabVIEW software design.

• Specialize in short term project from a few hours to 1 month.

• Part of the National Instruments Alliance Program

• Located in Lansing, MI

Page 4: Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

4

Agenda

• 15 Tips and Tricks for NI LabVIEW Development

– Beginner: Simple tricks to save time – Intermediate: LabVIEW tips you probably didn’t know about– Advanced: Useful nuggets to put you ahead of the game

Page 5: Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

5

Automatically Select the Right Tool

• Avoid manually switching among many tools

1/ 15

Operate Value ToolPosition/Size/Select ToolEdit Text ToolConnect Wire Tool

Auto Tool

Page 6: Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

6

Switch Terminal Wires Easily2/ 15

Hold Down Ctrl and Left-Click on Input Terminal

Note: This works only for functions with two inputs when bothinputs have already been wired.

Demo

Page 7: Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

7

Easily Scroll Through Structures3/ 15

Ctrl + Mouse Scroll Wheel

• You can use Ctrl + Mouse Scroll to scroll through:– Case Structures– Event Structures– Stacked Sequence Structures– Diagram Disable Structures

Page 8: Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

8

Quickly Find the Right Palette4/ 15

• Right-click on a block diagram object for a palette shortcut

Page 9: Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

9

Easily Navigate Arrays5/ 15

• Right-click on an array and select Visible Items >> Horizontal Scrollbar• To view last element, select Advanced >> Show Last Element• Both horizontal and vertical scrollbars available (depending on view)

Page 10: Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

10

Removing Many Breakpoints6/ 15

• Select Edit >> Remove Breakpoints from Hierarchy

Page 11: Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

11

Easily Add Enumeration Items7/ 15

• Press Ctrl while over Enum to use the Edit Text Tool• Use Shift + Enter to repeatedly add items

Shift + Enter

Page 12: Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

12

Quickly Open a VI Reference(next to current file on disk)

8/ 15

• LabVIEW automatically searches in current directory• Right-click on VI and select Call Setup to call it dynamically

Good

Better

Best

Page 13: Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

13

Automatically Create Control References9/ 15

• Simply drag a control into a Control Refnum• Automatically creates a class-specific, type-specific

reference

Demo

Page 14: Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

14

Drag and Drop to Save Time10/ 15

• Drag an image into your Front Panel icon• Select a file and drag into a path constant• Take a URL from Internet Explorer and drag into a string constant• Drag items from disk or Project Explorer into a LabVIEW block diagram

Page 15: Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

15

Quickly Browse Properties and Methods11/ 15

• View >> Class Browser• Drag a property or method

directly into your VI• Shortcut: Ctrl + Shift + B

Demo

Page 16: Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

16

Perform Advanced File I/O Tasks12/ 15

• New File I/O VIs in LabVIEW 8.20

Check If File or Folder Exists

Recursive File List

Compare Two Paths

Get File Extension

MD5 Checksum File

Generate Temporary File Path

Page 17: Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

17

Implement a For Loop Progress Bar13/ 15

• Place Progress Bar VI inside for loop• Opens automatically after a specified amount of time• Download sample code from: (http://forums.ni.com/ni/board/message?

board.id=170&message.id=192115)

Page 18: Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

18

Automatically Analyze Your VIs14/ 15

• Tools >> VI Analyzer >> Analyze VIs– Check performance, style, UI, documentation, and more– Save VI Analyzer settings for later use

Demo

Page 19: Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

19

Change the Windows File Dialog(to contain recently used folders in LabVIEW)

15/ 15

• Add LabVIEW.ini token “MRUFolders = TRUE”

• Maintain easy access to the last 5 directories used in LabVIEW

Page 20: Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

20

Other Resources

• ni.com/info - Use info code “nugget” to download presentation

• Weekly LabVIEW Nuggets (click here)

• LabVIEW Style Guide (click here)

• LAVA: Favorite Tips and Shortcuts

Page 21: Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

21

Certified LabVIEW Architect Exam

Skills tested:• LabVIEW application development

mastery

Certified LabVIEW Developer Exam

Skills tested:• LabVIEW application development

expertise

Certifications

Certified LV Associate Developer Exam

Skills tested:• LabVIEW environment knowledge

Skills learned:• Modular application development• Structured design and

development practices• Interapplication communication

and connectivity techniques

New User

LabVIEW Basics I

LabVIEW Basics II

Experienced User

LabVIEW Intermediate I

LabVIEW Intermediate II

Advanced User

LabVIEW Advanced I

Skills learned:• LabVIEW environment navigation• Basics of application creation

using LabVIEW• Basics of data acquisition and

instrument control

Skills learned:• Large application design• Advanced development

techniques• Multideveloper project

implementation

Courses

Page 22: Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.

Thank you for attending!