LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI run slowly after a specific time

Solved!
Go to solution

Hi, 

I have a VI which reads data via UART port from an arduino Mega board.
I have a problem and I don't know how to deal with it: when I run first time the VI its works very good, but if i leave it to run minimised (e.g one hour) and after I try to see the VI and make some setups (maximize the window) its get very hard to deal with it, some times its frozen and some time its moving slowly. Anybody have a clue of this problem?

 

System configuration:

OS: W10 64 bit (8GB ram and i7 processor)

LabVIEW 2015 64 bit

PS: if is needed I can post my VI, but i see this problem with other VIs too.

 

Thank you in advance,

Vlad

 

0 Kudos
Message 1 of 17
(4,030 Views)

Vlad,

 

are you using USB for the interface? I assume that your USB is going to power save mode after some time, esp. when the using application is minimized.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 17
(4,011 Views)

You need to post your VI - I think it could be a memory leak in your VI. If you look in task manager, does the amount of memory grow over time while your VI is running? Reading data from a serial port for hours is fine - as long as you are sensible about what you do with the data (e.g. continuously building an array/string will fill your memory).


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 3 of 17
(3,997 Views)

Dear all,

 

I had attached the vi. 

Sam_Sharp: yes, the amount of memory and CPU utilisation  grow over time.

 

Regards,

Vlad

0 Kudos
Message 4 of 17
(3,990 Views)

This is likely to be a software implementation issue, as Sam points out. We can't really help you until you post your code.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 5 of 17
(3,988 Views)

 Thoric,

My vi is attached at my previous post.

Thank you,

Vlad

0 Kudos
Message 6 of 17
(3,968 Views)

Please attach your program as a regular zip file and not as .7z.  It makes it much harder to help if you are requiring a person to download a third party piece of software for them to be able to view it.

0 Kudos
Message 7 of 17
(3,943 Views)

Ravens Fan,

Sorry, I have attached the zip file.

 

Regards,

Vlad

0 Kudos
Message 8 of 17
(3,935 Views)

I see one spot that could be causing you problems, but I can't tell because some subVI's are missing such as the Build Graphs.vi.

It looks like you are taking individual points and building them up to display into 4 graphs.  I guess you have shift registers in there to allow the build up of data.  That would be the problem.  If you are growing data endlessly in those 1-D arrays of cluster, you are filling up memory, and things will slow down as LabVIEW searches for larger blocks of memory and moves that data around to store those arrays.  Arrays have to be stored in contiguous memory.

 

There are several other architectural problems.  It seems like way too many local variables.  The stacked sequence structure.  Getting element of an array by converting to a cluster then unbundling is a Rube Goldberg.  That is why the Index Array function exists.  Also a feedback node on an error wire which serves no purpose.

 

But from what I can see without being able to look into the missing subVI's, your building of arrays for the graph is where your problem lies.

0 Kudos
Message 9 of 17
(3,881 Views)

Hi RavensFan

Thank you for your remarks, I have already fix some of them.
I reached the missed subvi. In time I try to work arout with the build graphs problem.

 

Thank you,

Vlad

0 Kudos
Message 10 of 17
(3,872 Views)