LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview is getting hang after running continuously for more than 3 days

Hi,

I'm using LabVIEW for a project where it needs to run for longer duration. But it is going to hang state if I run it for more than 3 days only. And I could see some color change in indicators. LabVIEW is receiving correct data. Also I need to close the application forcefully 

 

 how to get more information about the error.

 

Thank you,

Manasa.

0 Kudos
Message 1 of 10
(1,820 Views)

It all depends on how you have architected and implemented your code, without that it is hard to guess the root cause. If you could share the source code, fellow LabVIEW experts will be able to share inputs on possible causes.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 10
(1,808 Views)

Isn't 3 days the time it takes to round a millisecond timer? Do you use Tick Counts(ms)?

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 10
(1,753 Views)

@Yamaeda wrote:

Isn't 3 days the time it takes to round a millisecond timer? Do you use Tick Counts(ms)?


No that is 49 days (if I did not calculate incorrectly)

My guess is that your are doing array operations in an ineffective way with ever increasing data. Look at the task manager to see if cpu or memory increases.

But we can only guess if we see no code. There are many ways to debug and find "hangs" and if someone has a list then that COULD be helpful but you will get much better help if you show us the code or at least give us some details. For example, what do you mean by "hang", what do you mean by indicators changing colors etc. What works, what does not work etc.

 

Certified LabVIEW Architect
Message 4 of 10
(1,749 Views)

Yes, the millisecond timer is 49 days, or sometimes 25 if it's being coerced into an I32.

 

However, if I had to guess on this particular situation without seeing the code, I'd guess running out of references.  

 

https://lavag.org/topic/18730-error-2-memory-is-full-but-it-isnt/?do=findComment&comment=112650

 

If you're doing something that opens a reference and uses it but doesn't close it afterwards, then on the 1,048,576th iteration, it will fail.  

 

3 days is 259,200 seconds.  1,048,576 ÷ 259,200 = 4 and a bit.  If you have a loop running 4 times a second, or 4 loops running 1 time a second, or a loop running once a second creating 4 references, or anything else like that each creating a new reference each time, then you could be running out of references.

0 Kudos
Message 5 of 10
(1,712 Views)

We need to see your code otherwise we can only guess what you're doing wrong

 

My guess is: A memory leak.

 

Do you have any strings or arrays in your code that are continuously growing?

 

Are you closing your references when you are through and not just opening more?

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 10
(1,706 Views)

I have 'n' messages. In that some messages will get trigger if there is any value change and some will get trigger continuously, and some will be on request.

I have attached LabVIEW Gui for reference. In my case only pwrsrvcData4 (Refer Screenshot) message is receiving data after 3 days also but remaining all are not working. And in left corner i have start and stop buttons usually with that i can close my application but when issue occured im not able to close using buttons.

 

CPU and Memory usage is normal. Attached the snippets for that too.

 

0 Kudos
Message 7 of 10
(1,611 Views)

@SudhaManasa wrote:

I have 'n' messages. In that some messages will get trigger if there is any value change and some will get trigger continuously, and some will be on request.

I have attached LabVIEW Gui for reference. In my case only pwrsrvcData4 (Refer Screenshot) message is receiving data after 3 days also but remaining all are not working. And in left corner i have start and stop buttons usually with that i can close my application but when issue occured im not able to close using buttons.

 

CPU and Memory usage is normal. Attached the snippets for that too.

 


Unfortunately, we cannot know your architecture implementation with the images and cannot look at nooks and crannies to narrow down bugs that could lead to memory issues.

 

These images tell the controls/indicators you've in your application.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 8 of 10
(1,603 Views)

Sharing the code is difficult because it is big. I'm Not sure on which part of code should i send. Or is there anything which i can look into

0 Kudos
Message 9 of 10
(1,595 Views)

If you cannot share code: if you have DETT (Desktop Execution Trace Toolkit) you can see reference leaks:

https://www.ni.com/docs/en-US/bundle/labview-desktop-execution-trace-toolkit-api-ref/page/lvdetthelp...

 

Certified LabVIEW Architect
0 Kudos
Message 10 of 10
(1,578 Views)