LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help Making Program Run Faster

Hi there,

  I am an electrical technologsit student working on our final project.  I am trying to figure out how to make LabView read our I/Os faster.  They seem to only be reading them about once every 2 seconds. I have attached a copy of our code.  Thanks.

Message 1 of 15
(3,823 Views)
For some reason, your attachment did not make it. 😞
Message 2 of 15
(3,820 Views)
I'd be happy to help, but there is no code attached.
-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




Message 3 of 15
(3,819 Views)
0 Kudos
Message 4 of 15
(3,756 Views)
I have added the code, in my previous post.  Thanks for the help in advance.
0 Kudos
Message 5 of 15
(3,755 Views)

This code is beyond repair, maybe you want to start from scratch.

 

  • Many of CPU burning loops that suck all power out of the CPU, some with literally tons of property nodes that write the same property over and over again, millions of times per second. A property only needs to be written when the value changes!
  • All UI loops need a wait.
  • Emergency stop will not work due to dataflow problems.
  • Almost endless sequences, many in duplicates.
  • Full of FOR loops with N=1. They can all be deleted without change in result.
  • All these small while loops in the sequences make no sense at all.
  • Duplicate indicator names (image: why are there two indicators with the same name: "Station ID"? This is very dangerous because you use a local variable. There is no way to tell the parent of the local by looking at the code if they have the same name!)
  • Race conditions! (Image: Why do you write to a terminal and then read from a local?? Most likely, the local gets read before the terminal is written, thus you have a race condition and potentially unpredictable results. Delete the local and just branch from the wire going to the terminal).
  • Your diagram is way too big (~30 monitor screens!!). With proper coding habits (state machine!), all this code should fit easily on one screen. try it!
  • ...
  • ...
  • ...

 

Message Edited by altenbach on 04-01-2009 05:41 PM
Message 6 of 15
(3,744 Views)
Thanks for the info.  I am still a newbie to LabView with only donig basic labs before and thought I would give this a go for our project.  I will definatly take your advice.
0 Kudos
Message 7 of 15
(3,738 Views)

Well, after Altenbach's description... I guess I'm glad I'm in the middle of a LabVIEW install and couldn't look at the code. 🙂

 

-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




0 Kudos
Message 8 of 15
(3,735 Views)

What LV version is the software in? I might just have a looki, I need a booster this morning......Smiley Very Happy

 

Shane.

0 Kudos
Message 9 of 15
(3,709 Views)

Intaris wrote:

What LV version is the software in?


8.6

0 Kudos
Message 10 of 15
(3,702 Views)