LabVIEW Tools for Mac OS X Tiger
Overview
National Instruments, the developer of the LabVIEW graphical development environment is a market leader in instrumentation applications for the Macintosh. NI first introduced LabVIEW on the Macintosh in 1986 and has continued to support loyal LabVIEW Mac users with the latest technology for their test and measurement applications. Today LabVIEW and more than 40 data acquisition and instrument control devices are supported on Mac OS X.
This document offers a tutorial on how to use the LabVIEW tools for three features in the latest version of Mac OS X (Spotlight, Dashboard, and Automator). To download the LabVIEW Tools for Tiger visit ni.com/mac.
Note: This tutorial assumes you have NI LabVIEW 7.1, NI-DAQmx Base for Mac OS X, and the LabVIEW Tools for Tiger installed.
Table of Contents
Spotlight
Spotlight is a revolutionary tool for finding information and files on your machine. Spotlight indexes metadata for file types supported with a Spotlight plugin. National Instruments has created a LabVIEW Spotlight plugin that adds some LabVIEW information to metadata that Spotlight can search. The plugin exposes VI Descriptions from VIs, CTLs, VITs, TypeDefs as well as a listing of VIs in LLBs and their respective VI Descriptions. Complete these steps to learn how a LabVIEW developer can use Spotlight and the LabVIEW plugin to easily find VIs and acquisition data.1. Download and install the Spotlight plugin from ni.com/mac or apple.com/downloads.
2. In order to add VIs and LLBs to the Spotlight index, you need to compile them. The easiest way to do this vor all VIs and LLBs is mass compile using the Options>>Advanced>>Mass Compile... option from the menu. Note: A mass compile may take 5 minutes or more to complete.
3. Using Spotlight
- a. To take a look at this functionality, lets perform a Spotlight search from the menu bar.
b. Search for thermocouple in the Spotlight menubar add in and click Show All to open the Spotlight search. Right off the bat you will notice that we received more matches that just VIs. You can open any of these files by selecting and clicking on them.

Figure 1. Using Spotlight from the Desktop to Find LabVIEW Files
d. Click the additional information icon to the right of Cont Acq Thermocouple Samples-Int Clk .vi to view the VI description. This VI is an example of performing a hardware-timed temperature measurement using a thermocouple.

Figure 2. View VI descriptions using Spotlight
e. Minimize the additional information by clicking the icon again and repeat the last step for Cont Acq Thermocouple Samples-SW Timed.vi. This VI is an example of performing a software-timed temperature measurement using a thermocouple.
f. Launch the Cont. Acq Thermocouple Samples – Int Clk example. It may take a minute or so because it includes over 600 VIs (DAQmx Base driver).

Figure 3. Launch VIs from Spotlight
- a. Leave Cont Acq Thermocouple Samples – Int Clk.vi open.
b. Spotlight is dynamic and automatically updates its search results data as you enter a query and even as the metadata is updated.
c. Using the Spotlight application widwon, show the description of Cont Acq Thermocouple Samples – Int Clk.vi.
d. Orient the Spotlight application and LabVIEW application so you can see both concurrently.
e. Open the VI description from within LabVIEW using the File>>VI Properties>>Documentation menu options.

Figure 4. Modify VI Description
f. Add a new line to the description, such as "Developer - Joe LabVIEW”
g. Save the VI and notice the Spotlight search and VI description update automatically.

Figure 5. Spotlight automatically updates metadata
- a. Have you ever lost a VI? How about in an LLB. With Spotlight we can actually look at the contents of an LLB all frm within Spotlight.
b. As an example, assume you misplaced a VI I created to record a wave file.
c. Go back to Spotlight and search Record Wave File.

Figure 6. LabVIEW plugin includes metadata for VI names inside LLBs
d. Click Show All.
e. Show the details on the sound.llb by clicking the additional information icon.
f. The additional information includes a listing of the VIs included within the LLB. There is a VI named Record Wave File.vi in sound.llb.

Figure 7. Spotlight searches for VI names inside LLBs
Dashboard
1. Download and install the VI Viewer widget from ni.com/mac or apple.com/downloads.
2. Enable the LabVIEW Web Server using the Tools>>Options>>Web Server:Configuration menu option.
3. Make a note of the IP address of your machine .
4. Open a VI which will run continuously until stopped.
5. "Fly in" your dashboard on the machine where the VI is running, or on any other networked machine where it is installed, and flip to the backside of the VI Viewer widget.
6. Fill in the settings for the widget
- a. Server is the machine the VI is published on
b. Port is the port the LabVIEW Web Server is publishing the information on.
c. Update Rate is the frequency we check for a new front panel image.

Figure 9. VI Viewer widget configuration

Figure 10. VI Viewer widget displaying a VIs front panel
8. You can also resize the VI Viewer and add multiple instances of the widget for multiple VIs.
This widget is actually going out and pulling the picture of the VI published by the LabVIEW Web Server at the specified interval. Widgets should be designed to be small, have a limited function, and require very little processing power and this is the case with the VI Viewer.. Viewing these static front panel images is a great example of keeping things small and not processor intensive while still viewing important information. Additionally, because we are simply pulling pulling static images from the LabVIEW Web Server we can use this widget to view VIs on any platform on any machine (barring firewalls and any other network impediment).
The VI Viewer allows quick and easy viewing of the status of any test.
Automator
Automator is an excellent tool for automating repetitive tasks. It is not hard to imagine running the same test everyday, opening running and closing a VI, or archiving and sending reports on tests.
These and many more repetitive tasks can be automated with the new LabVIEW Automator Actions. National Instruments created these actions using the existing AppleScript functionality built into LabVIEW many years ago.
1. Download and install the LabVIEW Automator Actions from ni.com/mac or apple.com/downloads.
2. Open Automator. Notice immediately, that there is a LabVIEW application in the Automator Library.

Figure 11. Automator Environment
3. Clicking on the LabVIEW application reveals 6 new LabVIEW Automator actions including Opening, Running, and Closing a VI. These actions can be combined into powerful workflows to accomplish many day-to-day time consuming tasks.
4. Creating a Simple Workflow
- a. Place a Open VI action down by dragging and dropping the action. Configure it to open any VI you choose by selecting it in the VI to Open file path and deselecting the Use VI Name from Previous Step checkbox. Selecting a VI which acquires and saves data to file or generates an HTML report will best illustrate the power of Automator.
b. Place a Run VI action after the Open VI action. Do not change any controls. Notice that the action is configured to use the name of the VI passed from the previous action.
c. Place a Close VI action at the end of the workflow.
d. Run the workflow. Notice that your data/report is now available.

Figure 12. Simple Automator Workflow using LabVIEW Actions
One of the more advanced features of Automator, which we will not cover here, is to save your workflows as PlugIns that can be used in places such as Finder. With a few easy configuration steps you can save a workflow and as a Plugin, then access it from Finder or even schedule its execution with iCal.
Download the LabVIEW Tools for Mac OS X Tiger
Mac OS X Tiger provides some exciting and revolutionary technology and National Instruments LabVIEW provides tools to help you make the most of those technologies.
To download the LabVIEW Tools for Tiger visit ni.com/mac.
Reader Comments | Submit a comment »
AWESOME!
- Stephen Flora, Fermilab. sflora@fnal.gov - Jun 14, 2006
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).

