LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW2012 has long execution time to write string than LabVIEW2011 on XP SP3

in for loop, each execution will output string and display it on front panel by value property.

But after upgrade to LabVIEW 2012, the execution time doubled on Chinese XP OS, I really want to know this difference between LabVIEW 2011 & LabVIEW 2012, pls advice.


"I think therefore I am"
0 Kudos
Message 1 of 35
(3,771 Views)

How big are the strings?

Why are you writing to a value property instead of the terminal?

How do you measure the speed?

 

Can you show us some simplified code that shows the problem?

0 Kudos
Message 2 of 35
(3,753 Views)

 

How big are the strings?

 Eli: some step output large size string that is about 165kB, and the size of string from all steps is 614kB;

Why are you writing to a value property instead of the terminal?

 Eli: as you can see in below figure, I also need set the scrollposistion;

How do you measure the speed?

 Eli: in parallel with the for loop, I have another while loop to record the execution time till the for loop finished;

 

Can you show us some simplified code that shows the problem?

 Eli: refer below pic.

 

issue.png

 

thx!


"I think therefore I am"
0 Kudos
Message 3 of 35
(3,743 Views)

the picture does not show.

 

How can you measure execution time from a parallel loop. That does not make any sense.

0 Kudos
Message 4 of 35
(3,731 Views)

 

Put it in .zip file this time.

I have tried to write string to terminal directly instead of value property, no improvement.

 

 


"I think therefore I am"
0 Kudos
Message 5 of 35
(3,726 Views)

This is no way to measure the execution time. Your parallel while loop spins as fast as the computer allows, consuming all CPU it can get in the process, and starving everything else. Your code is highly flawed!

 

In addition, get date/time in seconds is also a relatively expensive function, not to mention all these local variables! Your benchmark is completely meaningless! All it does is slow down your regular code, nothing else. How do you know in what order things start? Where is the "start time" initilized (where is the terminal?!)

 

A proper benchmark uses a three-frame flat sequence with to high resolution relative seconds timers, on in each outer frame and the code to be benchmarked in the inner frame. (here is an example). The difference between the two timers is the exection time of the inner code in seconds. Make sure to only have wires in the benchmarking code. All controls and indicators belong outside the sequence. Also make sure that no other code can run in parallel to the sequence.

 

Use this and you'll be surprise how fast your code actually runs.

 

Then you should also disabele debugging.

 

Please attach your actual code (including the subVI) so we can see what else you are doing wrong.

0 Kudos
Message 6 of 35
(3,704 Views)

This is no way to measure the execution time. Your parallel while loop spins as fast as the computer allows, consuming all CPU it can get in the process, and starving everything else. Your code is highly flawed!

 

Eli: actually I add 10milliseconds delay inside both for and while loop. 

 

In addition, get date/time in seconds is also a relatively expensive function, not to mention all these local variables! Your benchmark is completely meaningless! All it does is slow down your regular code, nothing else. How do you know in what order things start? Where is the "start time" initilized (where is the terminal?!)

 

Eli: I am using the states machine, and set the "start time" during the program initialization, then calculate "test time"in next case (running block). 

 1.png

 

 

A proper benchmark uses a three-frame flat sequence with to high resolution relative seconds timers, on in each outer frame and the code to be benchmarked in the inner frame. (here is an example). The difference between the two timers is the exection time of the inner code in seconds. Make sure to only have wires in the benchmarking code. All controls and indicators belong outside the sequence. Also make sure that no other code can run in parallel to the sequence.

 

Use this and you'll be surprise how fast your code actually runs.

 

Then you should also disabele debugging.

 

Please attach your actual code (including the subVI) so we can see what else you are doing wrong.

 

Eli: if possible, give me your mail address, then I can sent more actual code to you separately. 


"I think therefore I am"
0 Kudos
Message 7 of 35
(3,693 Views)

 

to avoid this problem came to nothing, resend it here.


"I think therefore I am"
0 Kudos
Message 8 of 35
(3,642 Views)

@ELI2011 wrote:

 

to avoid this problem came to nothing, resend it here.


What does this mean?

0 Kudos
Message 9 of 35
(3,634 Views)

I still want to know the reason why LabVIEW 2012 has this difference from LabVIEW 2011, that if write large size string to front panel indicator in for loop, it has long execution time.

I have three way to bypass this issue:

a. remove commands which will cause large size string output;

b. change OS language to English from Chinese;

c. move to Win 7 OS PC;

but the different is there...


"I think therefore I am"
0 Kudos
Message 10 of 35
(3,629 Views)