08-03-2016 02:23 AM
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
Solved! Go to Solution.
08-03-2016 02:55 AM
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
08-03-2016 04:03 AM
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).
08-03-2016 04:26 AM
Dear all,
I had attached the vi.
Sam_Sharp: yes, the amount of memory and CPU utilisation grow over time.
Regards,
Vlad
08-03-2016 04:32 AM
08-03-2016 05:09 AM
Thoric,
My vi is attached at my previous post.
Thank you,
Vlad
08-03-2016 06:59 AM
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.
08-03-2016 07:17 AM
Ravens Fan,
Sorry, I have attached the zip file.
Regards,
Vlad
08-03-2016 12:46 PM
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.
08-03-2016 01:25 PM
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