From: Rolf K. <r.k...@hc...> - 2008-10-20 18:12:04
|
Hello Christian, > I tried to use rpy through labpyhton. But the enclosed > rpy_simple.vi allows just one execution. It's not possible to > rerun rpy a second time without a restart of LabView. It > seems that LabPython doesn't clean/close/disconnect correctly > after executing once. > > I have installed: > > LabPyton 1.2.2 (LabPython is part of OpenG lib for LabView) > numpy 1.2.0-win32 ActivePython 2.5.2.2-win32x86 (in order to > get rpy using Mark Hammond's py > extensions) > rpy-1.0.3-R-2.7.0-win32-py2.5.exe > Python 2.5.2 > R 2.7.0 > LabView 2.5 I'm not sure about the exact interactions here and why this happens but am currently not working with Python nor do I have time to look into LabPython. Workaround is to not close the Python session but instead just open it once in the beginning and then keep it open, optionally setting a new expression, and then executing that expression repeatedly using the same session. And you are right LabPython does not close completely from the python kernel once it connects. It does however clean all resources it allocated but that might be not enough in case of external modules that might expect some special throw out of memory after use. LabVIEW restarting shouldn't really be necessary as it should be enough to close all LabVIEW VIs making use of LabPython. If that is not enough the issue is even more obscure than I would expect. Rolf Kalbermatter |