LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiline string color property is too slow, why is console so much quicker?

Solved!
Go to solution

I have a *vi that I am trying to use to format a multi-line string indicator with colors.  The idea is that the data represents network traffic and must be formatted as shown in columns.  I realize that there is an upper limit on the horizontal size of the string control of around 2000 characters.  The standard console can be 9999 character wide.  Second issue is that when I use a property node the iterations take forever to process since I am not able to concurrently apply the formatting to the string as I right them to the string window.  I realize that I am using white space as filler and that this is causing a delay but in general this is taking way too long to format.  Is there anyway to speed this up and go more than 2000 characters wide?  If not is there a simple way to invoke the windows console in Labview and use the format parameter show in the attached *.cpp file?

 

I have attached the vi along with a sample Dev C++ project showing how fast the console is in comparison when apply colors to large amounts of text data. 



Download All
0 Kudos
Message 1 of 6
(2,934 Views)

Ouch! This looks like a literal translation of text code whcih is not al all optimized for dataflow. All these local variables cause extra data copies. Your code constantly needs to switch to the UI thread.

Two ideas:

  1. Defer panel updates while doing all the coloring.
  2. Use shift registers instead of local variables.

Why is your 3D picture set to scale with the panel? How big is your monitor? 😮

Message Edited by altenbach on 10-30-2007 08:23 AM

Message 2 of 6
(2,928 Views)
How do you defer panel updating?   Do you mean turn off the "Update while typing?" property node? 
 
Just to prove a point I created a sample piece of code that just generates 3000 Hex numbers using a shift register and then goes through and formats it.  This also takes forever.
 
Did you see the second question about the windows console?


0 Kudos
Message 3 of 6
(2,904 Views)
This uses the defer panel updates and dramtically increase the speed of your test VI
Message 4 of 6
(2,900 Views)
I can copy your property node and it works.  How do I create it from scratch?  Thanks!


0 Kudos
Message 5 of 6
(2,890 Views)
Solution
Accepted by topic author ShotSimon


@ShotSimon wrote:
I can copy your property node and it works.  How do I create it from scratch?  Thanks!

Drop a generic property node and select the correct class as follows.

Now select the defer property.

Message Edited by altenbach on 10-30-2007 11:19 AM

Message 6 of 6
(2,880 Views)