LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Challenging one

 
Dear All,
 
First i am Wishing you a Very happy New Year. Herewith i am attaching the VI. This VI is occupying my total system time while execution. I need to collect around 400 texts from the user and store it in the file for future use. I need in tab format only-refer vi(users condition).
The text for each one should 5 char. I am using the subvis for each text box.
Plz anybody optimize this code for better and fast execution. loop delay is 1000 ms, but i need it in 200ms.
 
Expecting the Optimized code,
 
regs
Karthikraja
 
0 Kudos
Message 1 of 20
(4,794 Views)
Karthikraja,
 
Program zip file is missing subvi's so it is impossible to determine what the program is doing.  Please either zip those up also or create a distribution kit so we can look at what is going on...
0 Kudos
Message 2 of 20
(4,761 Views)
Please post the subVIs also. If you Save with Options.. >> Development Distribution, the subVIs will be included.

It appears that you are doing basically the same thing 40 times (hard to tell for sure without the subVIs). If so, a simple for loop would be much less coding. In general using control references is much slower than direct wiring. On the front panel some of the controls overlap. That slows display updates.

The Wait until next ms Multiple is set to 1000. If you need 200 ms, why is this set longer?

If the user is entering data a delay of 100-200 ms is appropriate.

Post the subVIs and tell us more clearly what the code does and someon will probably be able to help.

Lynn
Message 3 of 20
(4,760 Views)
Hi Karthikraja,
 
Try to set the delay in the while loop to a smaller value. Now it is 1000ms. So each loop will take 1000ms or more.
0 Kudos
Message 4 of 20
(4,755 Views)
Hello !

You didn't attached subVIs to you application so I couldn't run it to see what it does. So I opened the diagram to read it...

Waow... Man...

First rule of LabVIEW is : you do not exceed 1024*768 for the diagram !
Second rule of LabVIEW is : you DO NOT exceed 1024*768 for a diagram !!!
Third rule of LabVIEW is... YOU DO NOT EXCEED 1024*768 FOR A DIAGRAM !!!!!!!!!!

Really, you code is absolutly not readable... Before asking for help, try to respect some rules when you code I recommend the LabVIEW Development GuideLines (http://www.ni.com/pdf/manuals/321393c.pdf).
I might sound pedentic, (I hope not too much) but really you can't possibly ask people so spend time to optimize a code if it respect no rules.






We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 5 of 20
(4,753 Views)
 

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 6 of 20
(4,717 Views)
 

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 7 of 20
(4,716 Views)
Listen to what Lynn (johnsold) is saying! 🙂
 
Please steate what you are trying to to in some simple terms. I'm pretty sure your code is not the way to do it.
 
It is also very bad form to have multiple controls with the same name. This makes debugging almost impossible. (You have for example 39 different string controls named LED 14!)
 
Most likely you can get away with one set of controls and keep all data e.g. in a 2D array in a shift register. Then you can move the approriate slice to the FP for modification depending on the tab state.
 
Simplify!

Message Edited by altenbach on 01-05-2006 11:53 AM

Message 8 of 20
(4,710 Views)

Dear All,

Really sorry, herewith i attached the sub vis.

i dont know how to simplyfy this , In h/w interface, user can select the modes by pressing the switches. There are 5 main modes. Each main mode has 8 sub mode. If user select the main mode 1 and sub mode 5 ( by selecting the h/w Switch interfaced with DIO lines), the corresponding 24 led names, 24 switch names and ROT,POTname ...etc has sent to LCD for display. If user changes the mode, the name of all controls of that particular mode will also sent to lcd for display.

So i need to collect the 24 led names, 24 switch names, 2 rot switch name. 4 pot name and sub mode name from the user for 40 modes(5 main mode * 8 sub mode). The name is restricted to 5 char.

I need to cluster all the names for each mode, and finally cluster  the cluster of each mode and store into one file. Irrespective of loop time, my cpu time is fully allocated for LV only. For 200 ms, the CPU time for LV is 93, and For 1000ms , the CPU time for LV is 85.

Kindly help me

regs

Karthikraha

 

0 Kudos
Message 9 of 20
(4,666 Views)

Hi all,

I am waiting for the suggestion from you. I attached the sub vi in my previous reply.

Expecting the Sol,

Regs

Karthik

0 Kudos
Message 10 of 20
(4,613 Views)