Jump to content

how do i run python script using labview


Recommended Posts

Hi ,

I want to run python script using labview or  open the commandline and then run the python script by calling python.exe 

is it possible to it.

Ravi

3672[/snapback]

The easiest thing to do is to get labpython. This allows you to put a window with a python script to execute right into your vi (it is a beefed-up formula node). Or you can explicitly push/pop variables to/from python and then run scripts individually from within labview.

Labpython will be useful for running external python scripts, but it is quite limiting because you cannot call labview from python itself. If you desire more robust labview scripting, check out LuaVIEW. Lua is a mean lean functional programming language, and with LuaVIEW you can call Lua scripts as well as call LabVIEW routines from said Lua script. I originally wanted a way to do python scripting from LabVIEW, but after seeing how limiting labpython is, I'm switching to LuaVIEW now. I've only done very simple things with it so far, but it's quite robust. I've also come to like the Lua programming language very much, and it makes use of First Class Functions such that functions are treated just like variables and other objects, which allows for some pretty powerful techniques.

Link to comment
The easiest thing to do is to get labpython.  This allows you to put a window with a python script to execute right into your vi (it is a beefed-up formula node).  Or you can explicitly push/pop variables to/from python and then run scripts individually from within labview.

Labpython will be useful for running external python scripts, but it is quite limiting because you cannot call labview from python itself.  If you desire more robust labview scripting, check out LuaVIEW.  Lua is a mean lean functional programming language, and with LuaVIEW you can call Lua scripts as well as call LabVIEW routines from said Lua script.  I originally wanted a way to do python scripting from LabVIEW, but after seeing how limiting labpython is, I'm switching to LuaVIEW now.  I've only done very simple things with it so far, but it's quite robust.  I've also come to like the Lua programming language very much, and it makes use of First Class Functions such that functions are treated just like variables and other objects, which allows for some pretty powerful techniques.

3683[/snapback]

Hi ,

Thanx for your help. I am very new to this luaview. do you have any example so that i can take a look at it and get started . I'll appreciate your help.

Thanx,

Ravi.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.