07-12-2017 01:21 PM
I'm trying to profile the timing of a certain VI and getting very confusing results.
The VI is supposed to do something fairly basic: turn on the output of a lock-in amplifier, sweep through some frequencies on that lock-in, plot the results, and turn the lock-in off again. I'm attaching screenshots of the front panel and back panel.
This VI sweeps more slowly than a program supplied by the lock-in manufacturers and I'm trying to figure out why, so I decided to use the profiling tool.
This is the confusing part: the VI takes over a minute to run, but the profiler says the run time is under a second, including subVIs. Am I completely misunderstanding what the profile readout means? Any help is appreciated!
Solved! Go to Solution.
07-12-2017 01:40 PM
I'm pretty sure the value you see in the Profile is "CPU time used" not "execution time".
Basically that means your program is sitting idle waiting for something external the vast majority of the time.
As such, either your program is spending a lot of time idling and waiting for some sort of communication from the hardware, or it's using external DLLs to do processing which I don't think that tracks.
07-12-2017 01:47 PM
Ah, that makes sense. Do you know if there's a simple way to profile the hardware communication time? If that's the major time-sink, I want to figure out how to improve it.
07-12-2017 01:51 PM
Open up your SubVIs and use this method around different parts of the code to see what has the longest wait times.
07-12-2017 03:21 PM
Thank you!