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 or interface 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 interface or a custom probe that is not a member VI of the class or interface. The changes are noted where appropriate below. A custom probe that is a member VI of a 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.
Right-click a wire and select Custom Probe»New from the shortcut menu to display the Create New Probe dialog box.
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.
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.
Click the Next button.
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.
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 or interface, follow the instructions above. If you are creating a member probe for a LabVIEW class or interface, you can save the custom probe in the subdirectory where you save the other member VIs of the class or interface to ensure that the class or interface items remain together for easy distribution.
Select Create a new probe to create a new probe.
Click the Next button.
Enter the filename, window title and shortcut menu name, and directory where you want to save the probe.
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.
(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 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.
(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.
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 or interface data type, the Create New Probe dialog box does not make the new probe a member of the LabVIEW class or interface by default. If you want the probe to be a member probe of the class or interface, you should add the member probe to the class or interface.
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 or interface and then move the LabVIEW class or interface to a different machine or you reinstall LabVIEW on the current machine, the default probe that users of the class or interface 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/Interface Properties dialog box to set the custom probe as the initial default probe for the class or interface. Now when you distribute the class or interface to a new machine, the default probe the user of the class or interface 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.