LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CPU Optimisation

Clicking on close program and have to wait 20 second??? I don't like it.

Create a structure that fire event or Queue. This will improve the user feel when use the application.

Benoit

0 Kudos
Message 11 of 14
(520 Views)

"wait until ms multiple" Is a wonderful method to ensure all of those loops wake up at the same time and fight over which one gets the CPU (he says sarcastically).

 

The only time that function should be used is if each instance has a different value each of which are a multiple of different prime numbers.

 

Spoiler
It works for the cicadas Smiley Wink

 

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 12 of 14
(502 Views)

Heh.   I've gotten several quizzical looks during informal code reviews when people see my msec wait constants set for values like 201, 257, 993, etc.   I don't generally go to the trouble of making them *formally* prime, I just arbitrarily offset a little bit from one of the nice round numbers that people might normally be inclined to use.

 

I also used to do some special stuff with loops that used a combo of "ms multiple" waits and regular waits to set various loops up at the same interval but different phasing for wake times.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 13 of 14
(493 Views)

@Kevin_Price wrote:

Heh.   I've gotten several quizzical looks during informal code reviews when people see my msec wait constants set for values like 201, 257, 993, etc.   I don't generally go to the trouble of making them *formally* prime, I just arbitrarily offset a little bit from one of the nice round numbers that people might normally be inclined to use.

 

I also used to do some special stuff with loops that used a combo of "ms multiple" waits and regular waits to set various loops up at the same interval but different phasing for wake times.

 

 

-Kevin P


Nice!

 

Back when we only had one CPU and 40MHz clock rates... it made big difference.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 14 of 14
(490 Views)