The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Automation Server/COM and LabVIEW
 Releasing Origin link from LabVIEW
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

codexplorer

USA
15 Posts

Posted - 12/07/2015 :  5:22:57 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. 9.1 and Service Release 1 (Select Help-->About Origin):
Operating System: Windows 7 Pro 64 bits

After sending data to Origin from LabVIEW, I close the Origin.IOApplication reference using the ActiveX palette's Close Reference function. Unfortunately, even if I quit LabVIEW, I still can't quit Origin, which complains that "Origin cannot be closed because it is being controlled by another application".
I usually have to resort to killing Origin from the Task Manager.
There's got to be a better solution.

lkb0221

China
497 Posts

Posted - 12/08/2015 :  2:15:26 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Can you try add a OACloseCommunication at the end?
Go to Top of Page

codexplorer

USA
15 Posts

Posted - 12/08/2015 :  4:06:25 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by lkb0221

Can you try add a OACloseCommunication at the end?



OACloseCommunication simply closes the reference, which, as I said, doesn't solve the problem.

I was actually planning to post that I had done something that appears to solve the problem.
What I do is use the IOApplication Method "EndSession" (even though the OA_ConnectToOrigin VI I use doesn't call the BeginSession method) before I close the reference.
I wished the doc was clearer (and complete)...

Edited by - codexplorer on 12/12/2015 2:00:54 PM
Go to Top of Page

codexplorer

USA
15 Posts

Posted - 12/12/2015 :  2:13:20 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by codexplorer


I was actually planning to post that I had done something that appears to solve the problem.




Well, that doesn't happen to work all (most of) the time...
It is fine for me to force quit Origin, but it isn't the cleanest way to do.
Any feedback from OriginLab would be welcome.
Go to Top of Page

Penn

China
644 Posts

Posted - 12/21/2015 :  9:47:46 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi codexplorer,

You are using Origin 9.1, right? I will suggest you to use the OriginApp Sub-VIs instead of using OriginAppClassics Sub-VIs (this is old), as you can find the reference in this page.

http://originlab.com/doc/LabVIEW/Custom-VIs

To quit Origin, the OA Exit can be use.

http://originlab.com/doc/LabVIEW/Custom-VIs/OA-Exit

Penn
Go to Top of Page

codexplorer

USA
15 Posts

Posted - 12/21/2015 :  9:56:35 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by Penn

Hi codexplorer,

You are using Origin 9.1, right?


Yes

quote:
I will suggest you to use the OriginApp Sub-VIs instead of using OriginAppClassics Sub-VIs (this is old), as you can find the reference in this page.


I AM using the OriginApp Sub-Vis. I was just responding to a suggestion to use one of the Classics subVIs.
quote:

To quit Origin, the OA Exit can be use.

http://originlab.com/doc/LabVIEW/Custom-VIs/OA-Exit


I do not want to QUIT Origin, I want to release Origin. In other words, usually Origin is open and running when my LabVIEW program starts interacting with it, and when done with LabVIEW, I (or the user) want to work some more in Origin.
And then only, close Origin.

This is that last step which fails, and by then LabVIEW is closed and not involved at all.

Edited by - codexplorer on 12/21/2015 9:58:24 PM
Go to Top of Page

Penn

China
644 Posts

Posted - 12/21/2015 :  10:23:32 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

I have tried to reproduce the problem by running Origin's existing examples, but failed. What I did was to open Origin's built-in vi, "Matrix Access.vi", then run it and Origin started and everything was done. Then I closed LabVIEW, then Origin, but did not see the issue you mentioned. It is better that you can provide a simple example to reproduce it.

Penn
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000