cancelar
Mostrando resultados para 
Pesquisar então 
Você quer dizer: 

Color Transparency Strobe is bogging down my computer's CPU

Resolvido!
Ir para a solução

Good Afternoon,

 

 

I recently programmed an interactive floorplan that generates a transparent flashing color on top of an imported png file. The flashing indicator looks great and is exactly what I need but I have come across a few problems. I referenced the "colour and transparent boolean" thread to help me with this program.

 

When I run the program the CPU usage on my computer goes up to around 97 percent. After messing around with the loop timing and some of the color gradient options, I can get the CPU usage down to around 40-50% but the end result doesn't look nearly as good as before. Also, I plan to have multiple rooms flashing simultaneously in the future and just a single room indicator is causing this problem.

 

It is my goal to have the program run while using up at the most 15-20% of the CPU. Is this possible?

 

Does anyone have any suggestions for helping the program run without hogging all the CPU?

 

 

I will post my program because I know that helps 🙂

 

 

(Also, if anyone has any suggestions to get the flashing rect and the circle graphic on the same floorplan, that would be much appreciated)

 

Thanks much,

 

 

Cal

Baixar tudo
0 Kudos
Mensagem 1 de 12
5.369Exibições

You should convert to U8 before the loop. There is no need to do the inner calculations in I32 with coercions.

Message Edited by altenbach on 08-19-2009 08:48 AM
0 Kudos
Mensagem 2 de 12
5.362Exibições

Can you please be more specific?

 

Should I convert my iteration block output to U8 to help get rid of all the coercion points? Would it be benefitial to convert the constants inside the for statement into U8 as well? When I did all this, there was little to no change in the CPU usage.

 

 

 

Thanks for the help,

 

 

Cal

0 Kudos
Mensagem 3 de 12
5.345Exibições

CINC.Cal wrote:

It is my goal to have the program run while using up at the most 15-20% of the CPU. Is this possible?


Try something like this...

Mensagem 4 de 12
5.344Exibições
Solução
Aceita por CINC.Cal

CINC.Cal wrote:

...suggestions to get the flashing rect and the circle graphic on the same floorplan...


Here's a very quick draft.

Mensagem 5 de 12
5.331Exibições

Oh dang......That works very well.....you rock.

 

 

 

I'm going to spend some time figuring out what you did 🙂

 

 

 

Thanks!

 

 

-Cal

Mensagem 6 de 12
5.330Exibições

Hello Cal,

I altered the program so the strobe and circle is shown in the same picture indicator.

I put the picture indicator into a Diagram Disable Structure, to compare the CPU- load when the picture is calculated & updated or only calculated. You can see the difference in CPU- load yourself, this will be unavoidable. You can try to use the Fill Rectangle VI to speed up things.

If you want to flash several regions then this would only affect the calculation, but not updating the indicator, since the picture is replaced in a whole every loop iteration.

 

Greets, Dave

Greets, Dave
Mensagem 7 de 12
5.326Exibições

Dave, Cal has LabVIEW 8.5 and won't be able to open your LabVIEW 2009 VI.

Mensagem 8 de 12
5.302Exibições

Ups,

sorry for that. Although I think you don't need it anymore, cause of Altenbach's very good suggestion ... here it is Smiley muito feliz

 

greets, Dave

 

P.S. @altenbach: do you check every posted VI on its version? Or do you have something automatic?

Greets, Dave
Mensagem 9 de 12
5.260Exibições

daveTW wrote:

P.S. @altenbach: do you check every posted VI on its version? Or do you have something automatic?


Nothing automatic. I typically look at the unsaved changes in VI properties to see what the original version was.

 

Mensagem 10 de 12
5.248Exibições