LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Darren's Occasional Nugget 10/26/2022

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:
1.png
In the resulting dialog, select Create a probe from an existing probe and click Next:
2.png

 

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.
3.png

 

Specify a name for your new custom probe and click Save.
4.png

 

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):
5.png

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!
6.png

 

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!

Message 1 of 7
(2,460 Views)

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.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 2 of 7
(2,226 Views)

@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

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 3 of 7
(2,217 Views)

Long before "history probes" my go to history probe for most scalar numerics was just a plain old chart. 🙂 

Message 4 of 7
(2,188 Views)

@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\_probesuser.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.

0 Kudos
Message 5 of 7
(2,114 Views)

Is it possible to have a probe that would be available for any data type (i.e. could a probe be malleable)?

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 6 of 7
(2,013 Views)

@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:

 

Malleable Probes - NI Community

0 Kudos
Message 7 of 7
(1,949 Views)