LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trace which VI's have been executed

Is there a way to track how many vi's are executed when running the program without using the unit test framework? For example, if a user presses a button, LabView can trace the sequences/vi's that is executed and present results (the number of vi's executed) when the user stops the program.

0 Kudos
Message 1 of 4
(2,136 Views)

The easist way is to run the Desktop Execution Trace Toolkit.

A cumbersome way is to create a VI that logs its caller's info, and call the logger in every VI in your codebase.

0 Kudos
Message 2 of 4
(2,124 Views)

I probably have to do it the cumbersome way. What would be the best way to log the caller info?

0 Kudos
Message 3 of 4
(2,102 Views)

Here's a quick-and-dirty way. Save this as a VI, and drop it on the block diagram of VIs you want to log. For faster performance, replace the Write to Spreadsheet File with a text file write, put the file refnum in the shift register, put a case structure inside the for-loop for Init, Log and Close. For more information (if the VIs are in a project), open a reference to the caller and use property nodes. This will be slower.

 

Example_VI_BD.png

0 Kudos
Message 4 of 4
(2,086 Views)