LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

updating table cell takes appr. 160 ms. How do I make it faster?

Hi,
I am writing (test status) apprx. 60 lines (string) to table cell in my test. I tried little experiment and did not display my test status on window and I could reduce my test time by 10 sec. Any idea to update this information on screen faster? I have attached my function for ref.
Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 1 of 4
(3,632 Views)
Hi Sheetal,

I made a sample application here that updates a table cell using your function. When I checked the timing, it came out to be between 3-10ms, not the 160 ms you had experienced. The reason you may be having speed issues is if other applications are running at the same time, they could be taking up process time. Also, it is possible that the length of the string you are sending may affect the speed. How long is the string that you intend to send to the table? The string I used was approx. 45 chars per line, 60 lines total. That gives me a string of about 2700 chars.

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 2 of 4
(3,632 Views)
Thanks Jeremy.
I don't have any other application running during my test. I am using 1.2 MHz machine with 256 MB RAM, I don't know if this has anythign to do. about 12 lines are about 75 chars. Rest are about 40 chars.
Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 3 of 4
(3,632 Views)
I'm not sure from the context of your code snippet if you make this call multiple times with different cells, or if you're updating the same cell repeatedly. If it's the former, I would advise that you try to update multiple cells at the same time if possible (using SetTableCellRangeVals) which reduces the overhead of updating cells greatly.

If you're always updating the same cell, then my best advice is that you update it without displaying it each time. You can defer the display until you're done making repeated updates, at which time you should either call ProcessDrawEvents, or allow CVI to update the display when it leaves your callback function.

The way to update a table without displaying is by calling SetTableCellAttribute (...,ATTR_CTRL_
VAL,...) instead of SetTableCellVal. The thing to keep in mind when doing this is that it will only make a difference if the table is not the active control in the panel. So, if it is the active control, you'll have to programmatically make some other control active before updating it, and then make the table active again afterwards.

Luis
NI
0 Kudos
Message 4 of 4
(3,632 Views)