Author |
Topic |
|
codexplorer
USA
15 Posts |
Posted - 12/07/2015 : 5:22:57 PM
|
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
|
Can you try add a OACloseCommunication at the end? |
|
|
codexplorer
USA
15 Posts |
Posted - 12/08/2015 : 4:06:25 PM
|
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 |
|
|
codexplorer
USA
15 Posts |
Posted - 12/12/2015 : 2:13:20 PM
|
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. |
|
|
Penn
China
644 Posts |
|
codexplorer
USA
15 Posts |
Posted - 12/21/2015 : 9:56:35 PM
|
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 |
|
|
Penn
China
644 Posts |
Posted - 12/21/2015 : 10:23:32 PM
|
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 |
|
|
|
Topic |
|
|
|