Connect Sensor Data to 3D Models
Overview
For more than 20 years, NI LabVIEW software has made it easy for engineers and scientists to create user interfaces and displays using 2D charts and graphs. LabVIEW 8.6 introduces a new concept for data visualization: 3D sensor mapping. You can now easily incorporate CAD models into the LabVIEW environment to better show how acquired data corresponds to the device under test.
Table of Contents
Visualize DAQ Channel Data on 3D Models
With the LabVIEW 3D Sensor Mapping Express VI, you can import a user-defined CAD model (VRML or STL file) into LabVIEW, assign actual data acquisition channels or simulated sensors, and display that model on the LabVIEW front panel. This new feature is ideal for visualizing data in high-channel-count applications where distinguishing between many channels on a graph is difficult. Being able to distinguish the output of individual sensors on a model also makes troubleshooting erroneous sensors easier, thus increasing test efficiency. Finally, by using the same model in production design, and test, different development teams can better communicate expected results with actual data.

Figure 1. LabVIEW 3D Sensor Mapping Express VI
Using the 3D Sensor Mapping Express VI
Navigate to the 3D Sensor Mapping Express VI in the Functions Palette at Functions>>Graphics & Sound>>3D Picture Control>>Helpers>>Sensor Mapping.

Figure 2. Helpers Palette with Sensor Mapping Express VI
When you place the Express VI on the block diagram, the configuration window appears. Load your model using the Model Path file dialog at the top, and your model appears in a large 3D picture control. The LabVIEW 3D Sensor Mapping Express VI supports standard VRML and STL model file types, which are export options in most CAD programs including SolidWorks, AutoCAD, and Pro/E.

Figure 3. Load your model with the Model Path file dialog.
Load any DAQmx Task you have previously created with the drop-down menu to the right of the 3D picture. All available channels from the task appear in the Channels List dialog box below. Left-click and drag those channels from the Channels List dialog box and release your mouse on the location where you want to place that sensor. You can move the sensor later by either left-clicking on the sensor and dragging it to a new location or by left-clicking on its name in the Channels List dialog box and dragging it to the new location on the model.

Figure 4. Map DAQmx Task channels to your model.
You can add free sensors, or simulated sensors, to your model if you wish to simulate channels. Place them on the model by right-clicking on the desired location. If you are using free sensors with a DAQmx Task, you need to append those channels to the end of the output array from your DAQmx Read VI on the block diagram. You can do this by creating an array of numeric controls and using the Insert Into Array function on the Functions>>Programming>>Array palette.

Figure 5. Use the Insert Into Array function to combine real and simulated sensor data.
Once you have placed your sensors, you can edit the maximum and minimum values as well as any color preferences on the Color Ramp control. When you are finished configuring the Express VI, press the “OK” button. LabVIEW then takes a few seconds to make any necessary calculations.

Figure 6. Edit data range and color options with the Color Ramp control.
Input your NI-DAQmx data, simulated data, or combination of the two into the “Data” input, and wire the output to the 3D Picture Control, which you can find on the Controls>>Graphs>>3D Picture Control palette. Prior to running your application, you must right-click on the 3D Picture Control and select a method of interaction from the Camera Controller menu.

Figure 7. Right-click on the 3D Picture Control to set your Camera Controller style.
Summary
Using the LabVIEW 3D Sensor Mapping Express VI makes what was once a time-consuming task very simple. You can now easily import a CAD model, apply sensors to it, and visualize your data while your application executes. This new feature is another example of how LabVIEW makes it easy to create dynamic user interfaces for powerful applications.
Learn More about LabVIEW 8.6
To learn more about new LabVIEW 8.6 features, visit the LabVIEW 8.6 portal at ni.com.
To try new features, launch LabVIEW online.
Related Resources
LabVIEW Help for Sensor Mapping Express VI
Manuals: LaVIEW 8.6 Upgrade Notes
Reader Comments | Submit a comment »
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/).
