From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

A vi I run crashes after a while, with no error message

I have designed a vi that runs in a for loop. It takes data from the BNC-2110 (using the AI One Scan vi), and then calls a vi to adjust the measurements to a temperature. After this it displays an output on a plot (per input channel). After this program runs for a while (not always the same amount of time), LabView will close and a Windows (2000), application error box will pop-up. The box will simply state that an error has occured and an error log is being recorded.

Any help is appreciated, thanks.

Tyrone
0 Kudos
Message 1 of 5
(2,464 Views)
Tyrone,

This will be difficult to answer without viewing the code.

I suspect; however; that you have a memory overflow problem, either at the hardware level, or in DMA. This would be a result of incorrect use of config and download VIs for the hardware.

Be sure that you don't have memory leaks, and that you are properly configuring the hardware. If you can't find the problem, then post the code here, and someone will surely be able to help.

Good luck
0 Kudos
Message 2 of 5
(2,464 Views)
Here is a copy of the vi that I am using. It may take up to twenty minutes for the error to occur. I think that everything is in order (on the programming end). It is a short program and if anybody can find the problem, I would be very happy.

Thanks

Tyrone
Download All
0 Kudos
Message 3 of 5
(2,464 Views)
Hi Tyrone,

As already mentioned, you have a memory leak (of sorts).
AI Sample Channel is not intended to be used in a loop as you have.
If you take a look inside it you will see the VI it calls has a "iteration" input. The iteration input (when used) only configures the channel on the first call (when iteration = 0). In your code this is not wired so new I/O references are created on each iteration! After a while your system will run out of memory and crash (you know this!).

DO NOT just jump in there and wire up the iteration count to the connector pane. This VI is used elsewhere. Start by doing a "Save As" to a special name before you make chganges. Then go back into your code and replace the NI version with the version that you have modified.

Let us know i
f this does not fix the problem.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 5
(2,464 Views)
Thanks for your help, it has move my problem solving efforts in a different direction. However, even with this new direction, I am sill having the same problem. I am posting a new question with my redesigned VI that does not use the Sample channel VI to see if I can get any more help.

Thanks again,

Tyrone

PS, I guess I'll leave a copy here as well
0 Kudos
Message 5 of 5
(2,464 Views)