Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Creating Custom Probes

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Create a probe when you want to have more control over how LabVIEW probes the data that flow through a wire. When you create a new probe, the data type of the probe matches the data type of the wire you right-click. Refer to the caveats and recommendations before you begin creating custom probes.

Complete the following steps to create a custom probe.

Note  If you are creating a custom probe for a LabVIEW class data type, some of the steps listed below may vary depending upon whether you are creating a custom probe that is a member VI of the class or a custom probe that is not a member VI of the class. The changes are noted where appropriate below. A custom probe that is a member VI of the class is a member probe and has the ability to access the private data of the class directly. Member probes can display any aspect of the private class data. A non-member custom probe may only display information accessible via the public interface of the class.
  1. Right-click a wire and select Custom Probe»New from the shortcut menu to display the Create New Probe dialog box.
  2. Select whether to create a new probe or to create a probe based on an existing probe.
    • Select Create a probe from an existing probe to create a probe based on an existing probe. Existing probes can be the probes LabVIEW supplies or other probes you created using the Create New Probe dialog box.
      1. Click the Next button and select an existing probe on which you want to base the new probe. LabVIEW displays all supplied probes in the labview\vi.lib\_probes directory and any custom probes available.
      2. Click the Next button.
      3. Enter the filename, window title and shortcut menu name, and directory where you want to save the probe. If you do not specify a directory, LabVIEW stores custom probes in the Probes subdirectory of the default data directory. If you want a custom probe to be the default probe for a particular data type, save the probe in the labview\user.lib\_probes\default directory. Do not save probes as existing files in the labview\vi.lib\_probes directory because LabVIEW overwrites the existing files when you uninstall or reinstall.
      4. Click the Save button. LabVIEW opens a probe that matches the existing probe you selected.
    Note  If you are creating a non-member probe for a LabVIEW class, follow the instructions above. If you are creating a member probe for a LabVIEW class, you can save the custom probe in the subdirectory where you save the other member VIs of the class to ensure that the class items remain together for easy distribution.
    • Select Create a new probe to create a new probe.
      1. Click the Next button.
      2. Enter the filename, window title and shortcut menu name, and directory where you want to save the probe.
      3. Click the Save button. LabVIEW opens a probe that contains a control that is the data type of the wire you right-clicked and a Boolean indicator that acts like a conditional breakpoint. The probe also contains the To Probe String function and a string indicator you can use to configure the value LabVIEW displays in the Value column of the Probe Watch Window. Do not delete the control or indicators or change the connector pane because doing so breaks the probe.
      4. (Optional) Wire any data type to the data value input of the To Probe String function to see the data as a string in the Value column of the Probe Watch Window. The function breaks down the data and converts it into a string that the Value String indicator can display in the Value column. The To Probe String function also compresses and trims the data to fit the available space. Use this function to extract relevant information from complex data types.
        Note Note  LabVIEW automatically wires the control to the To Probe String function. You can remove the To Probe String function to specify the string you want LabVIEW to display in the Value column.
      5. (Optional) Specify the string you want LabVIEW to display in the Value column of the Probe Watch Window by wiring that string to the Value String indicator, as shown in the following block diagram.

        The previous figure shows a custom probe of a wire that contains numeric data. You can use a Case Structure to tell LabVIEW to display Greater than five or Less than five rather than the default, which is to display the data that passes through the wire.
      6. When you finish customizing the probe, save and close it. If you want to edit that probe, you must open it from the directory where you saved it.
Note  If you are creating a probe for a LabVIEW class data type, the Create New Probe dialog box does not make the new probe a member of the LabVIEW class by default. If you want the probe to be a member probe of the class, you should add the member probe to the class.

To use the probe you created, right-click the wire again and select Probe from the shortcut menu. After you create a probe, that probe becomes the default probe for that data type, and LabVIEW loads that probe when you right-click the wire and select Probe from the shortcut menu. To change the default probe for a data type, right-click a wire of that data type, select Custom Probe from the shortcut menu, and select a supplied, custom, or generic probe from the shortcut menu.

Note  If you create a probe for a LabVIEW class and then move the LabVIEW class to a different machine or you reinstall LabVIEW on the current machine, the default probe that users of the class can use is the generic probe. A custom probe is not the default probe for any data type until you use it on the machine. However, if you create a member probe you can use the Class Properties dialog box to set the custom probe as the initial default probe for the class. Now when you distribute the class to a new machine, the default probe the user of the class can use is the custom probe rather than the generic probe.

To edit an existing probe, open the probe VI or use the Create New Probe dialog box to create a new probe based on the existing probe.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit