LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

graphic performance

Hi,

I would like to get a better performance when I draw data points to the chart. I have a main application, and this calls another subvi (Ctrl_graficOxigen_SBR1.vi). This subvi updates the Oxygen graphic with a data point and its timestamp through the global reference of the graphic Oxygen that is located in another subvi (graficOxigen_SBR1.vi). This chart in graficOxigen_SBR1 has a history length of 86400 data points that is because I acquire data each 1 second during a day (24hours) and I want to represent the trend of these 24hours in the chart, for this reason I need a history length of 86400 (24hours*3600seconds=86400 hours). Is it the correct way to do it? Is there another one better?

Also, I note that LV 7 has problems to manage large history length and CPU performance decreases and the memory usage and CPU usage increase. How can I solve it too?

Thanks, very much.

Toni.

PS: I use LV 7 Express
Download All
0 Kudos
Message 1 of 5
(4,461 Views)

Hei Toni,

first it seems you use the "defer panel update" in the wrong way: set to true, make operations, then to false. btw, this is usefull only if you have a lot of graphical operations in between.

second, i see you make profusion use of global variables. look at this nugget form tst:

http://forums.ni.com/ni/board/message?board.id=170&message.id=243235#M243235

three, you should use the main subvi in reentrant execution, otherwise it will reupdate all info about the graph all the time.

Why not avoid this alltogether (panel update, global variable, reentrant exec), and simply use Graphicoxygen as your main vi. make changes in there!

somehow i could not find yet where do you input real data to it, except via this crtlgraphicoxygen, but this is just demo data.

easier as i said, update the graph in a while loop with some wait inside, in your main vi.

Did i understood correctly what you are trying to do?

 

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 2 of 5
(4,444 Views)
0 Kudos
Message 3 of 5
(4,417 Views)
Hi Gabi1,

Yes, I agree with you and tst, I don't like to use global variables but there are times that it is impossible not to use these. For example, If I have two VIs and I need to comunicate them each other, is there any better mecanism similar to global variables and more efficient? How can I do the same as using global variables but in another way more efficient? I don't want to use sempahores, queues, ocurrence and notifiers because these mecanisms aren't what I want, I want something like global variable but more efficient.

Thanks,

Toni.
0 Kudos
Message 4 of 5
(4,379 Views)
Hi,

I have thought on using queues instead of global variables, then I put objects to the queue and I get them from it when I need but.... how can I build a queue of objects of different types?

Thanks in advance,

Toni.
0 Kudos
Message 5 of 5
(4,373 Views)