Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/31/2010 in all areas

  1. Hello there, first post here, so perhaps I should start with introducing myself. I've used LabView for about 10 years. For work to hack together some quick automated test routines for instrument control and data acquisition. Outside work I use it like a kind of hobby program language, mainly just messing around with it to see how it works and what it can do. For many reasons (read the NI ads...) it has become one of my favourite program languages, next to Matlab. I never released any code to the public. I never had formal training, and I thinks this shows in my code. What I'm releasing here is something I worked out in the last few weeks as a hobby project, it's now at a point where I think it could actually become useful. I'm looking for comments and criticisms on the code and the general question if this is useful and should be completed. What I tried to achieve is to add a script language to Labview. It should be a simple language, text-based, capable to interact with arbitrary front-panel objects, easy to add to an existing vi and working in the absence of the development environment. In difference to the MathScript or formula nodes it should be able to interact with anything on the front panel and not being limited to controls hardwired to the node. The script should be exchangeable at run-time, even when an executable has been built. Basically, it should be able to do everything a person can do with the front-panel. My approach was to use the GOLD parsing system ( http://www.devincook.com/goldparser/ ) to create a language similar to Matlab, the Intel x86 Assembly Engine by Ege Madra ( http://www.devincook.com/goldparser/engine/assembly-x86/index.htm ) to parse the user created scripts, and the attached Labview code to make it work. Somehow. It's not finished by far. What is working so far: - basic math and logic operations - comparisons - variables (doubles, strings, 1D and 2D arrays) - flow control (for loop, while loop, repeat until, if-elseif-else) - reading and setting values on the front panel. The attached zip file contains all vi's necessary to run what I have so far, inclusive dependencies (OpenG vi's and the Tree Control Toolkit by Norman J. Kirchner). A demo application is TestLoop.vi, there are three scripts in the script-folder that work with this application. Flaws I'm aware of are that it's slow, verging on sluggish (I've used a recursive interpreter design pattern, and recursions are a weakness with Labview, eh?); that I changed it so often to get to this point that I would need to do a serious cleanup of the code; that there is no documentation and of course, IT'S NOT FINISHED. Anyway, please take a look, and as said above, any sort of feedback is welcome. Ciao, Joachim
    1 point
×
×
  • Create New...

Important Information

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