取消
显示结果 
搜索替代 
您的意思是: 

LabVIEW does not exit in executable

I have installed an application (built using LV 2009) on a couple of Laptops running Windows XP.  If the application stays open for a couple of days and I then I exit the program I can see in the Windows Task Manager my application saying "not responding", and I have to manually click on the End Task button.

 

My Top Level VI uses the JKI State Machine (2010), which uses the Exit Macro to close the Front Panel to the Top Level VI, then it's reference and then exits the while loop.  When this didn't work I tried the following outside the JKI State Machine While Loop (ie. the last VI to be executed).

1) MGI "Exit if Runtime.vi" which also closes the Front Panel of the Top Level VI and then calls the QUIT primitive and when this didn't work

2) I tried my own VI which closes all VI's Front Panels in Memory and then does the same as the MGI VI, but this didn't help either.

 

The application exits fine if I play with it for a while and open/close a few interfaces.  Would a slow memory leak cause it to not shut-down properly?

 

 

Chris

0 项奖励
1 条消息(共 19 条)
6,642 次查看

Just a wild guess and I am no super user but

Is your application using serial or DAQ resources?

 

 

0 项奖励
2 条消息(共 19 条)
6,598 次查看

Just a wild guess and I am no super user but

Is your application using serial or DAQ resources?

 

 

0 项奖励
3 条消息(共 19 条)
6,597 次查看

No - I'm afraid it's all plain simple LabVIEW - no DAQ, no Serial.

 

I do interface to two USB Brother Printers, but I talk to them through their own API use Properties and Methods, and I'm VERY careful to close all references in this interface.

 

Chris.

0 项奖励
4 条消息(共 19 条)
6,575 次查看

You can make a try of first stopping the while loop and then at the end use the Exit macro to Exit the application.This might be due to your PC performance also.

 

眨眼表情

-----

The best solution is the one you find it by yourself
0 项奖励
5 条消息(共 19 条)
6,560 次查看

Yeah unfortunately that's what I've done 难过表情 -  The last VI executed is the LabVIEW Exit (Quit) function.

As you said maybe it is taking the laptop a long time to close down LabVIEW, but how long should one wait? I waited a couple of minutes, and it still was NOT Responding in the Task Manager.

 

Chris

0 项奖励
6 条消息(共 19 条)
6,552 次查看

Check for the time delays inside the while loop. Keep a delay of 250 or 500ms if your application is Ok with that. When you use very less time delay it will occupy a lot in the system memory that you can see in the task manager>Performance. and memory usage.

 

眨眼表情

-----

The best solution is the one you find it by yourself
0 项奖励
7 条消息(共 19 条)
6,547 次查看

I don't quite follow what you're saying, but it doesn't really matter anyway since I don't use a time delay in my While Loop - it uses the JKI State Machine - see the image and the Timeout is set to -1.  You can also see my Exit VI on the right-hand side.

 

I'm going to monitor the Memory useage of the VI for a day and see if that's increasing - but I that probably doesn't really help me with this exit problem?

 

Chris

0 项奖励
8 条消息(共 19 条)
6,543 次查看

Ya you have given time out as -1 in the event case and have no time delay. I don't know how JKI state machine executes but generally when you use a while loop without a time delay it will occupy a very large memory in the system. So you can remove the -1 timeout and use 250 ms or 500ms and create an event to stop the code. To see the memory usage of while loop just run a while loop with and without time delayyou can see the difference.

 

眨眼表情

-----

The best solution is the one you find it by yourself
0 项奖励
9 条消息(共 19 条)
6,536 次查看

Here is a screen shot where you can see the memory usage of while loop.

 

Memory usage without delay.JPG

 

 

 

Memory usage with delay.JPG

 

 

 

眨眼表情

-----

The best solution is the one you find it by yourself
0 项奖励
10 条消息(共 19 条)
6,525 次查看