viSci Posted September 17, 2004 Report Share Posted September 17, 2004 I would like to collect some examples of Labview front ends for either scripting language. I would like to develop an interactive scriping vi that would allow me to load new scripts into a table or tree display and see a highlighted execution. (Hey maybe even breakpoints too.) I tried this a few months ago with LabPython and came close but could never get it to work correctly. Quote Link to comment
Michael Aivaliotis Posted September 18, 2004 Report Share Posted September 18, 2004 I know Bryan hangs out in the forums and has worked on TCL stuff perhaps you guys can exchange notes. http://forums.lavausergroup.org/index.php?...=findpost&p=804 http://forums.lavausergroup.org/index.php?...=findpost&p=802 Quote Link to comment
jeffwass Posted December 16, 2004 Report Share Posted December 16, 2004 Hi Michael, It is now three months since your post on labpython and luaview. Have you made any progress with either of these scripting extensions to LabVIEW? I would like to use python as a scripting language, but development on it seems to have slowed down. Also luaview seems fairly more advanced. Namely, I'd like to call LabVIEW vi's from the script, but AFAIK one can do that in luaview but not in labpython. Is this wrong? Also do you know about using python 2.3 instead of python 2.2 with labpython? Changing the path of the dll seems to work so far, but it could make things unstable later. I would like to collect some examples of Labview front ends for either scripting language. I would like to develop an interactive scriping vi that would allow me to load new scripts into a table or tree display and see a highlighted execution. (Hey maybe even breakpoints too.)I tried this a few months ago with LabPython and came close but could never get it to work correctly. 1807[/snapback] Quote Link to comment
Albert-Jan Brouwer Posted December 16, 2004 Report Share Posted December 16, 2004 Hi Michael,I would like to use python as a scripting language, but development on it seems to have slowed down. Also luaview seems fairly more advanced. Namely, I'd like to call LabVIEW vi's from the script, but AFAIK one can do that in luaview but not in labpython. Is this wrong? 3055[/snapback] Calling LabVIEW is the main problem with integrating a scripting language into LabVIEW. Since scripts tend to be used on the "outside" instead of the "inside" of an application there is little use for a scripting language that cannot call LabVIEW. LabVIEW is rather odd as compared to other languages. VI calls are not made by passing parameters, results, and a return address on the C stack. Consequently the standard calling mechanisms do not work as-is and some kind of adapter is required. This is why Lua was chosen as the scripting language for LabVIEW: it has sufficient hooks to allow its C calling to be captured and adapted. This allows for a mechanism that enables calls of LabVIEW code while running inside the LabVIEW process. Don't hold your breath for Python to be similarly co-opted. Its embedding and extension C API is rather more complex. For some further details of this issue see this page: http://www.citengineering.com/luaview/calling_labview.html Quote Link to comment
jeffwass Posted December 16, 2004 Report Share Posted December 16, 2004 Thanks alot for the explanation, and especially for that detailed link. I was looking a bit at LuaVIEW, but I didn't want to learn a whole new scripting language. But it does seem that LuaVIEW will do the trick, so I'm off to the library to get the Programming in Lua book. Have you experience using it? I've found the LuaVIEW examples a little confusing, I'll just have to go over them with a fine-toothed comb. Do you know if there is a LuaVIEW mailing list? On a somewhat different note, what exactly is "LabVIEW Scripting" as listed as the title one of the LAVA programming forums? Does that just refer to the act of dynamically calling VI's, and not really the traditional sense of scripting per se? Quote Link to comment
Albert-Jan Brouwer Posted December 16, 2004 Report Share Posted December 16, 2004 Have you experience using it? I've found the LuaVIEW examples a little confusing, I'll just have to go over them with a fine-toothed comb. The examples were meant to briefly demonstrate LuaVIEW-specific features. They're pretty useless as an introduction to the language. The book ( http://www.lua.org/pil/ ) on the other hand is great for that. The next LuaVIEW version will likely include a somewhat more extensive example that shows how to set up a server-side application glued together with Lua scripts. Do you know if there is a LuaVIEW mailing list? There is none as yet. There is however a Lua mailing list.On a somewhat different note, what exactly is "LabVIEW Scripting" as listed as the title one of the LAVA programming forums? Does that just refer to the act of dynamically calling VI's, and not really the traditional sense of scripting per se? From the LuaVIEW FAQ: The "LabVIEW scripting feature", which is still under development by NI, exposes the object embedding hierarchy of the LabVIEW development system, diagrams in particular, as property and invoke nodes. This allows LabVIEW to wire LabVIEW: the "scripting feature" is concerned with code generation, not scripting. Quote Link to comment
jeffwass Posted December 21, 2004 Report Share Posted December 21, 2004 The next LuaVIEW version will likely include a somewhat more extensive example that shows how to set up a server-side application glued together with Lua scripts. There is none as yet. There is however a Lua mailing list. I've picked up the Programming in Lua book from my uni library. Lua is a great little language and I really like what I've seen about it so far. I am currently in the process of getting into the details of both Lua and LuaVIEW. May I suggest including the two-button-dialog example (shown in the LuaVIEW visual overview)in the LuaVIEW examples code? That's the simplest example I've come across demonstrating how to call LabVIEW modules from the lua script, and I was surprised after seeing it in the overview that it wasn't included with the other examples. And I did run into some path problems trying to do it myself at first. Some of the other example scripts (eg the fractal script and calculator) get relatively complicated quickly, in terms of both the LabVIEW state machines and the Lua scripting commands. That dialog example, while limited, gives a quick and simple overview of the method of calling LabVIEW from the lua script. Do you know how many other people are using LuaVIEW? I'm surprised there are so few google hits on it, because it seems like it would be a very handy tool for many developers. Anyway, is this LAVA board a proper place to bring up any LuaVIEW-specific questions I'll most likely have in the near future? Quote Link to comment
Albert-Jan Brouwer Posted December 22, 2004 Report Share Posted December 22, 2004 May I suggest including the two-button-dialog example (shown in the LuaVIEW visual overview)in the LuaVIEW examples code? That's the simplest example I've come across demonstrating how to call LabVIEW modules from the lua script, and I was surprised after seeing it in the overview that it wasn't included with the other examples. Though that specific example is not included, there is luaview/examples/Do a script.vi which does some simple calls of LabVIEW-side functions, including dialog.one_button(). The two-button dialog binding is in fact also included. See luaview/functions/pop-up dialogs/dialog.two_button_lua.vi. Your experience does however suggest the need for adding some step-by-step binding instructions to the "Getting Started" section of the manual. Do you know how many other people are using LuaVIEW? I'm surprised there are so few google hits on it, because it seems like it would be a very handy tool for many developers. There is no built-in activation/licensing mechanism so we (CIT) do not have a means of actively tracking its use. As to its adoption, or lack thereof, it seems there is no barrier for people suitably primed: two of the early adopters I know of had created a LabVIEW-implemented scripting language before deciding to switch to Lua. It is my impression though that most of the LabVIEW community is not (yet) familiar with scripting.Anyway, is this LAVA board a proper place to bring up any LuaVIEW-specific questions I'll most likely have in the near future? If there are objections, it is easy enough to set up a mailing list. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.