10-26-2022 03:27 PM
Many, many years ago I posted a nugget about some custom probes I wrote and published to ni.com called History Probes, which are a super useful debugging tool for browsing all the values that have passed through a wire during code execution. It took us long enough, but LabVIEW R&D started shipping History Probes as a feature in LabVIEW 2019.
The default history probes support Boolean, numeric, string, and path data types. But what if you want a history probe of another type? Like your own typedef enum? LabVIEW has a feature that lets you create your own custom probe, but many developers don't realize how easy the custom probe creation process really is. I'll walk you through the steps to create your own custom probe, which should take less than a minute, which is a great time investment given how much debugging time your new custom probe will likely save. First, right-click on a wire of the applicable data type and select Custom Probe > New.... In my case, I have an enum with the days of the week, and I want to create a new history probe for that enum type:
In the resulting dialog, select Create a probe from an existing probe and click Next:
Select the custom probe you want to use as a template for your new probe. In my case, I think the History - String probe will work just fine. Click Next.
Specify a name for your new custom probe and click Save.
Now, the diagram of the custom probe VI comes up. Modify this diagram to accomodate your new custom probe type. In my case, all I needed to do was add a Format Into String to convert the enum to a string (since I started with the string history probe as a template):
I also hid a couple of controls on the panel of the probe that applied to strings, but not enums. And with that (hopefully under 60 seconds?), I've got a functional history probe for my enum!
Keep this procedure in mind the next time you need a custom probe (history or otherwise) for one of your own data types, they're extremely easy to create and use!
10-27-2022 06:29 PM
Can you create custom probes specific to typedefs in a project, and have those custom probes as part of the project source and move around with that project? The benefits would be that I can create hundreds of custom probes, but only those relevant to my project are open to LabVIEW, all the others are not. Also, when sharing development with a team, the custom probes travelling with the project means they get instant access to them also.
10-27-2022 07:22 PM
@Thoric wrote:
Can you create custom probes specific to typedefs in a project, and have those custom probes as part of the project source and move around with that project? The benefits would be that I can create hundreds of custom probes, but only those relevant to my project are open to LabVIEW, all the others are not. Also, when sharing development with a team, the custom probes travelling with the project means they get instant access to them also.
If it were a class object, you can create a custom probe and assign it - https://www.ni.com/docs/en-US/bundle/labview/page/lvhowto/custom_probe_classes.html
10-27-2022 11:37 PM
Long before "history probes" my go to history probe for most scalar numerics was just a plain old chart. 🙂
10-28-2022 11:35 AM
@Thoric wrote:
Can you create custom probes specific to typedefs in a project, and have those custom probes as part of the project source and move around with that project? The benefits would be that I can create hundreds of custom probes, but only those relevant to my project are open to LabVIEW, all the others are not. Also, when sharing development with a team, the custom probes travelling with the project means they get instant access to them also.
Santhosh's reply is the best option right now... a custom probe can be defined for a class and move around with that class, but unfortunately, non-class custom probes must reside in vi.lib\_probes, user.lib\_probes, or [LabVIEW Data]\Probes. Another option would be for you to have a VI package that you distribute with your project, and it can install your project's typedef-specific probes to one of those locations.
10-30-2022 11:32 AM
Is it possible to have a probe that would be available for any data type (i.e. could a probe be malleable)?
10-31-2022 11:40 AM
@paul_cardinale wrote:
Is it possible to have a probe that would be available for any data type (i.e. could a probe be malleable)?
It is not currently possible. Jay posted this to the idea exchange a while back: