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: 

Close Origin instance from tasks manager

HI,

maybe I crazy 🙂 but I have a problem with closing Origin file while program is still running in Labview.

I try close Origin file manually but run dialog message "Program cannot close because another program use" but I stopped communication with Origin.

In short...

In one while loop I create new Origin instance, sending data to Origin file, stored, draw graph and after than a try close, but while loop isn't stop. This instance now remove in tasks manager in windows but still in.

 

I hope I explained this correctly.

 

Thanks all

Norbert

0 Kudos
Message 1 of 5
(3,304 Views)

Good afternoon Norbert, 

 

If I understand you correctly, your while loop never finishes running and the code never executes the Close Origin command. Do you have a stop control for the while loop? If so, when you push that, the while loop should stop and the Close Origin should execute. If you do not have a stop control, please add one and see if that fixes the issue. If you do have a stop control, please post back with more information about what happens when you push the stop button on your front panel. Thanks!

 

Cheers, 

 

~kgarrett

 

District Sales Engineer
0 Kudos
Message 2 of 5
(3,283 Views)

Hi Kgarrett,

I have create very a simple examples of what I thought.

In attachment file OA1.vi is problem when I started aplication and I need close Origin instance IN while loop.This while loop is never stopped (if I click on stop button). Origin task try to close but in task manager in windows is still there (I create zombie 🙂 ).

In OA2.vi I block of Exit I create behind while loop. This VI is working correctly when I click on stop buton. Origin task is not stil in task manager, but I have to press stop button 😞

 

I need in while loop if I call submodel for origin (SAVE and EXIT) then save and correctly close Origin program, but if I open task manager in windows there is no task (zombie).

 

Sorry for my english 🙂 and thanks

Norbert

Download All
0 Kudos
Message 3 of 5
(3,268 Views)

hi Norbert, 

 

It looks like you did not attach the sub-vis you created (OA_Connect to Origin.vi, OA_Save.vi, and OA_Exit.vi), so I can not run the VI. However, it makes sense that having the exit command outside of the loop would give you better, zombie-free behavior; you should be establishing the connection, writing/saving data as long as the loop runs, and only AFTER you are done writing/saving data should you close the reference. I am not sure I understand what else you want to happen-do you need both the save and exit commands in the loop, and if so, why? Thanks!

 

~kgarrett

 

District Sales Engineer
0 Kudos
Message 4 of 5
(3,259 Views)

Hi Kgarrett,

files with examples are very simple. I try find another example but I used code from my project. In attachment is PDF file with my problem.

I try explain:

My program is running three tests independently. That means I have one While loop controlled by EXIT button. Inside loop there are 3 CASE structures in parallel, each one controlled by separate/independent button.

Running While loop, start and stop each of the case independently and besides measuring action, the data save and export to origin template OA file is done.

 

After e.g. 1st case is finished I need to close open corresponding OA instance correctly.

This seems to be a problem, because after closing Origin, its instance is in the list of active processes in Task manager, still, see picture3. So as you start and stop new measurements, new OA instances are added up in task manager processes list… which is unwanted…

 

The instances (origin tasks in task manager) are closed correctly only after pushing EXIT button which leaves the main While loop and terminates the whole program in LV !!

 

How to do this without leaving the main loop and stopping the program ?

Consider, we need to have e.g. 2 tests running 7-10 days uninterruptedly, while in the mean time, third test we start several times a day, so we need to fix the issue of “accumulating” number of open origin instances.

 

Please, take a look in pictures in attachment, illustrating it.

Best regards,

Norbert

0 Kudos
Message 5 of 5
(3,247 Views)