LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Identify time process in debug mode

Hello,

 

I need help finding the necessary tools to analyze/determine our processing times.

 

We've been developing our software for several years now, so it has a few lines of code and features.

 

In Release (and simulation), everything works fine. Processing time is around 50-100 ms, with NI cards (at 2 kHz), and a loop (EveryNCallback) is around 250 ms.

In Debug (# since 2020), everything seems extremely slow (> 500 ms)... inevitably resulting in crashes in EveryNCallback (error -200279). Normal !

 

Note:

For information, we implemented producer/consumer (ThreadSafeQueue), various timers ... managements in the past,

but I'm really not looking for answers related to that subject...

 

Unfortunately, we did not resolve the problem in time...
And now, in debug mode, it's a complete nightmare.


So I would simply identify any features in our code, that are time-consuming and/or called too frequently,

in order to improve them.

 

A long time ago, I used these kinds of tools in LabVIEW... and maybe even in LabWindows/CVI.

But I'm getting old and I've forgotten how to do it under LabWindows/CVI.

Could you help me?

 

Thanks in advance.


Certified LabWindows/CVI DEVELOPER (2004)
LabVIEW since 5.01 | LabWindows/CVI since 4.01
0 Kudos
Message 1 of 7
(194 Views)

Hi

 

I am using the following crude & simple method

 

start_t = Timer() ;

 

...some code

 

end_t = (Timer() - start_t ) * 1000.0 ;

SetCtrlAttribute(panel , PANEL_NUMERIC , ATTR_CTRL_VAL , end_t) ;//a numeric on the gui to display on going time

 

another thing can can help is to set the debuging level to "NO RUNTIME CHECKING"

this will speed up your debug but you will not have full featured debug mode

 

Good luck

0 Kudos
Message 2 of 7
(172 Views)

Hello,

 

Thanks, but I already use this method to verify the process during debugging and some monitoring.

 

Actually, I'm looking for a similar feature (in Tools menu) into LabVIEW.

You run the code, and it shows you which functions are called, how many times and how long they take.

 

Pims_0-1770191177258.png

This helped me in the past to optimize our first software, but it was under LabVIEW.

 

Now, we use LabWindows/CVI.

 


Certified LabWindows/CVI DEVELOPER (2004)
LabVIEW since 5.01 | LabWindows/CVI since 4.01
0 Kudos
Message 3 of 7
(167 Views)

Try under tools-> execution profile viewer . i think you need to install profiler toolkit for cvi

GabelDaniel_0-1770191804219.png

 

Message 4 of 7
(165 Views)

The Execution Profiler Toolkit is included in CVI Full edition at least from CVI2015; according to the documentation, in CVI2020 it is included in base version too. Depending on your choices it may not be installed, but you should be able to rerun the setup and install the toolkit.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 5 of 7
(152 Views)

Hello guys,

 

Thank you very much for this information, it seems to meet my expectations.

I will try using it soon.

 

N.B. : I am using LabWindows CVI 2020 f4, with its main toolkits.

 


Certified LabWindows/CVI DEVELOPER (2004)
LabVIEW since 5.01 | LabWindows/CVI since 4.01
0 Kudos
Message 6 of 7
(133 Views)

Hello,

also when in debug mode, do not set any watch on variables, it is excruciatingly slow...

0 Kudos
Message 7 of 7
(110 Views)