Mapping Data Using the Sensor Mapping Express VI
- Updated2025-03-11
- 4 minute(s) read
Mapping Data Using the Sensor Mapping Express VI
Map real-world data onto a 3D model using free sensors and DAQmx channels. Use the Sensor Mapping Express VI to wire an array of data values that represent sensors you configure in the Configure Sensors dialog box. You can configure sensors to represent DAQmx channels or create free sensors to represent data you wire to the Express VI. Refer to the NI-DAQmx Help for more information about using DAQmx channels.
Complete the following steps to use the Sensor Mapping Express VI to map real-world data onto a 3D model.
- Add the Sensor Mapping Express VI to the block diagram.
- Click the
Load Model
button in the
Configure Sensors
dialog box to display a file dialog box.
- Navigate to the 3D model you want to load.
- Click the OK button to select the model and close the file dialog box. LabVIEW displays the path to the 3D model in the Model Path field.
Note LabVIEW supports the Virtual Reality Modeling Language (VRML) and stereolithography (STL) file formats for 3D models. - (Optional) Select a DAQmx task from the
DAQmx Task Name
pull-down menu. LabVIEW populates the
Channels List
with the channels for the DAQmx task.
Note The DAQmx Task Name option does not appear unless you install NI-DAQmx. - Drag the channels from the list onto the 3D model to add sensors. When you create sensors from a DAQ channel, the sensor represents the channel name, not the channel data. You also can right-click anywhere on the model to add free sensors. The sensors you add to the 3D model affect the color of the 3D model at the sensor point according to the data value the sensor represents.
- (Optional) Change the draw style of the 3D model by configuring the Draw Style option. Use this option to ensure accurate placement of the sensors by viewing the points, lines, and vertices of the model.
- (Optional) Resize the sensors on the model by increasing or decreasing the Sensor Size option. Use this option to ensure accurate placement of the sensors.
- Right-click the Color Ramp control and use the shortcut menu items to customize the appearance, size, colors, and number of colors. You also can configure the minimum and maximum value ranges for incoming data using the control. Highlight the color map minimum or maximum value, type a new value and press the <Enter> key to change the value range. After you set the value range, click the top and bottom out-of-range colors to configure the colors to indicate if a value is outside of the value range you set.
- Click the OK button to save the configuration and close the dialog box.
-
Create an array of data values
and wire the array to the
Sensor Values
input of the Express VI. The array positions correspond with the order of the sensors you configure in the
Configure Sensors
dialog box.
Note If the array you wire contains fewer values than the amount of sensors you add to the model, LabVIEW maps the extra sensors to the top out-of-range color. - Add a 3D picture control to the front panel window.
- On the block diagram, wire the Scene Ref Out output of the Sensor Mapping Express VI to the 3D picture control terminal.
- Right-click the 3D picture control terminal and select Create»Invoke Node»AutoFocus to create an Invoke Node. Add the node to the right of the 3D picture control terminal. The AutoFocus method ensures the camera automatically positions itself according to the 3D model.
- Wire all error in and error out terminals on the block diagram.
- Run the VI. LabVIEW displays the 3D model with the sensor data in the 3D picture control.
In the Configure Sensors dialog box, you can hold down the <Shift> key while clicking and dragging the model to zoom in and out. Press the <Ctrl> key while clicking and dragging the model to pan the display. (macOS) <Command-Shift>-click. (Linux) <Alt-Shift>-click.
To delete sensors, select a sensor in the Channels List and click the Delete Sensor button to remove the sensor from the model and the Channels List. If the sensor is a DAQmx channel, LabVIEW removes the sensor from the model but not from the Channels List.