From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView is crashing

Solved!
Go to solution

Looks like a simple program.

Try to move the "ULx Create Channel (AI-Temperature).vi" out side the loop, avoiding calling this VI over and over.

 

 

George Zou
0 Kudos
Message 11 of 14
(654 Views)

You are creating two new virtual channels (i.e. new tasks!) every five seconds. You should create the virtual channel once before the loop, then read inside the loop. 

 

(Guessing. Not familiar with the MCDAQ drivers)

0 Kudos
Message 12 of 14
(652 Views)
Solution
Accepted by topic author bjjmetal-craft

Hi Brian,

  • "it started at 114,216kb, 30 minutes in it was at 116,096kb, 60 min in it was at 102,588kb." Thanks. It's not a memory leak then.
  • I fully agree with the comments made by RTSLVU, zou and altenbach. The main issue seems to be the fact that the ULx virtual channels are created inside the while loop. Normally data acquisition channels should be created once before the while loop, then inside the loop any number of measurements can be taken for any amount of time, then when the loop finishes (e.g. when the VI is stopped), the channels should be closed or destroyed. In your VI new channels are being created repeatedly, but never closed or destroyed. This is leading to a resource leak (a "resource" being an entity such as handles or memory that the OS - Windows - allocates).
  • The screenshot below shows how you should move the "ULx Create Virtual Channel" VIs outside of the while loop.

2.png

 

  • "Bake time doesn’t seem to matter on weather is crashes or not. We can be running a 1 hour or 4 hour cycle and it will make it sometimes or sometimes it will crash. I am not sure what the difference would be." That's interesting. Does the VI always run successfully after a computer restart? Restarting the OS will clear any resources that might have been hogged by LabVIEW.
  • The following tutorial should help you get started with LabVIEW: Getting Started with LabVIEW (ni.com) . The program you attached is extremely simple. I think you'll be able to improve it yourself after following the tutorial (improving it by, for example, connecting the error wire (a.k.a. error cluster) between the different VIs, as was suggested by RTSLVU).
0 Kudos
Message 13 of 14
(628 Views)

Thank you to all who replied. I made the change on last Thursday to move the channel creation to outside the while loop and it hasn't crashed since. I look forward to the tutorials on learning LabVIEW. Thanks again.

Message 14 of 14
(583 Views)