|
From: Rolf K. <r.k...@hc...> - 2008-03-12 18:45:21
|
Hi, >I have tried with "System Exec.vi" option in labview, able to calling pythonnet >but unable to send commands and arguments to run python script (i.e. Import >pythonscript name) I do not know pythonnet and can not give you any advice in what might be wrong that it does not work. You asked on the LapPython list. There are probably dozen possible venues to call some Python script from LaVIEW. LabPython gives you two distinct ways to do that as explained in my earlier answer. >(Basically this python script calls some other DLL and print some message, to >run the script using Python net in my application .To run my script in python >net using following commands: import pythonscript name) The import command will usually require the Python kernel to load an external module in form of a python script or a compiled DLL. Python looks in specific places for such external modules that can and will usually vary on the actual Python binary distribution your access method uses. There is a global variable in Python that you can use to add your own custom locations to this search paths. > I heard we can call pythonscripts from LabPython also. If u know please tell me. > If you have samples".VI " please send to me. If you want clarification from my > side please let me know. You will have to download the LabPython OpenG package Version 1.2.2 from sourceforge and install it using the VIPM that you can download from http://jkisoft.com/vipm/. That package contains a few simple examples that are installed in examples/labpython inside your LabVIEW directory, for how to call your own Python script in LabVIEW through LabPython. As I'm not currently using LabPython actively I can't send you any other examples than what comes with the package. Sincerely Rolf Kalbermatter CIT Engineering Netherlands Kanaalweg 25-33 Tel: +31 10 442 1701 2903 LR Capelle a/d IJssel Fax: +31 10 442 1712 Netherlands http://www.citengineering.com |