LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Frozen screen during execution

I agree with Ben.
 
This code is a nightmare!
 
Duplicate code everywhere in deep stacks of stacked sequences, overlapping tunnels and wires.
Then you are building infinite arrays via local variables without ever resetting them. Every time you run the VI in the same session, your arrays will start at the size from the last run.
 
Use arrays instead of discrete code paths, replace the stacked sequences with autoindexing FOR loops containing exactly one instance of the code, and things will become more manageable.
 
Also, your "Prompt.vi" needs a small delay inside the loop. It does not need to spin millions of times/second. How fast can you possibly enter the texts? Give it 100ms!
 
Maybe once the code is cleaned up, debugging will be possible. 🙂
 
0 Kudos
Message 11 of 17
(1,546 Views)
Ok, i'll try to do it. Ben, what's Task Manager?
 
Thanks
0 Kudos
Message 12 of 17
(1,536 Views)

right click on your task bar (bottom of the screen) and cleck "Task Manager".

It is a utility that ships with Windows XP and allows you to monitor how much CPU is used memory etc.

It also (on another tab) lists all of your process and the amount of CPU being used by each task.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 13 of 17
(1,528 Views)
Ben, i´ve cheked the task manager and I´ve noticed that about 70% percent of CPU was being used during execution and when i was handling graph palette features, like zoom, this rate turned to 100%! At this point, usually, the aquisiton stops.
0 Kudos
Message 14 of 17
(1,511 Views)
More important would be to monitor memory.
 
As I said above, you are growing infinite arrays in shift registers, so the code constantly need to perform expensive memory allocations. Are you sure you're not runing out of memory?
0 Kudos
Message 15 of 17
(1,504 Views)


@altenbach wrote:
I agree with Ben.
 
This code is a nightmare!
 
Duplicate code everywhere in deep stacks of stacked sequences, overlapping tunnels and wires.
 
Maybe once the code is cleaned up, debugging will be possible. 🙂
 


This code is a structural nightmare, but it is almost pretty in how all the duplication is organized.  It must have taken a huge amount of work to organize all those wires so they overlap.  And tunnels on top of tunnels.  The author must have carpal tunnel syndrome from all that mouse clicking and wire moving!  And to duplicate a case structure 48 times and make minimal changes to each case?  It is a rather neat job of programming considering it must have been at least 20 times the work as if the loops were organized properly.  Smiley Wink
Message 16 of 17
(1,501 Views)
The task manager shows that the memory alocation is increasing reasonably fast. What should I do? I need to store all this data in so many arrays cause they're been plotted on a XY graph.  
0 Kudos
Message 17 of 17
(1,456 Views)