LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Number of cycles?

Hi Guys

I'm want to know, how can I compute the cycles of my VI program. indeed I want to know how many cycles takes to when inputs triggered on "VI 1" to arrived input on "VI 2"?
in Visual Studio and Standard text programing I can use "Code Analyzer" like "Intel® Architecture Code Analyzer" but in labVIEW how can I calculate this?Untitled.jpg

 

0 Kudos
Message 1 of 29
(3,367 Views)

Are you talking about analyzing your LabVIEW code?  What kind of analysis do you want to do?  Did you install the LabVIEW VI Analyzer Toolkit?  What information about your code concerns you?  What do you mean by "Cycles" in your diagram?  [I didn't understand what the Diagram was illustrating -- at first, I thought you were interested in the harmonic analysis of your signal ...].

 

Bob Schor

0 Kudos
Message 2 of 29
(3,355 Views)

VI Analyzer checks for style/best practices.  He's looking to understand how many cycles will take place prior to that event running.

 

Though, that's not something you could realistically profile  from a non-running VI (or text based code, honestly).  You can, at best, compute a theoretical minimum.  If the OS finds other priorities, those will adding more cycles to that theoretical computation.

 

Ultimately, what are you trying to do here?  Worrying about specific cycles on a Windows system seems strange.  Are you failing to meet benchmarking and you're hoping to find a place to optimize your code?  Or are you just curious? 

0 Kudos
Message 3 of 29
(3,335 Views)

Dear  

About Cycles, Clock in CPU, I want know how many Cycles(Clock) took to done my VI 1 Function and when ready to trigger send VI 2?

0 Kudos
Message 4 of 29
(3,304 Views)

Dear natasftw

I want to optimise my process , indeed in native languge with reverse engineering tools (like IDA or olydbg) I can calcute my runing time and clocking but in labview something is strange and this code does not run directly on CPU!

0 Kudos
Message 5 of 29
(3,302 Views)

@Zourvan wrote: but in labview something is strange and this code does not run directly on CPU!

Yes it does.  It's just that there is a compiler in between the code and the machine language that you do not understand.  And it includes A LOT of optimizations.  So the best we can really do is add benchmarking code (typically Flat Sequence Structure and High Resolution ms Counters to get the time difference), run it a lot, and take whatever statistical analysis you want.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 29
(3,291 Views)

It seems you basically want to measure the execution time of "VI 1". Wires are just graphical dependencies and their length or arrangement are irrelevant for speed. You cannot calculate the performance, this is something you need to actually measure.

 

Did you write VI 1 yourself? What does it do? What's in it? What is the current performance and what performance are you trying to achieve? Are you even sure that VI1 is the overall bottleneck.

 

If you are worried about performance, feel free to post the VI in question and we could possibly point out some mistakes. Also have a look at our 2016 talk for some ideas. Poorly written code can be orders of magnitude slower than optimized code of identical functionality.

 

 

 

 

0 Kudos
Message 7 of 29
(3,282 Views)

 A basic approach that I can think of is to put this VI in while loop and add a counter.

Secondary approach would be calculate time difference (t-t0, t0 is the time you take at the starting of program) divided by frequency of operation.

0 Kudos
Message 8 of 29
(3,278 Views)

@Aziroazide wrote:

 A basic approach that I can think of is to put this VI in while loop and add a counter.

Secondary approach would be calculate time difference (t-t0, t0 is the time you take at the starting of program) divided by frequency of operation.


No.

0 Kudos
Message 9 of 29
(3,276 Views)

Dear

Thank you for your response, it's possible provide for me a sample?! it's new method to understand!

0 Kudos
Message 10 of 29
(3,228 Views)