Jump to content

Labview RT Scripting


Recommended Posts

Hi;

Anyone aware of any script intepreter(C/C++...) or processor that can run under labview Rt ?

The problem with the current intepreters like Ch, Lua, Python, UnderC are the dependency problems

with other libraries like Kernel32.dll and so forth...as such fail to work on RT.

I got UnderC to work under labview, but failed under RT because of kernel32.dll...

Even adding the file to the project, it still fails; in anycase, I wouldn't want to load another memory manager on the RT

I am looking for something that comes as a DLL with header files...

I have a control application that runs loads and runs very large text script for control...

I also have a very simple language (intepreter) that understand the scripts.

It was initialy kept very simple but now, we would like to extend the language, add loops,

local variables in the scripts and inline evaluation of operations.

for example

m1=move_stage(position=100)

m2=read_stage_position()

m3=m1-m2

if(m3>5)

log_msg(position error)

blah blah blah...

else

log_msg(position correct)

blah2 blah2 blah2...

end

Ofcourse what is not obvious from the above example is that only the if statement is processed by the external

intepreter while the rest of the lines are processed by our build in intepreter. The idea is to farmed out the loops,

branching, and mathematical processing to the intepreter such that I can remake the application by changing the script.

My labview functions are already scriptable...

Needless to say this a bit more complicated that it appears because I have to cache the results from each call in a stack

...

Walters

Link to comment

QUOTE(wallyabcd @ Jul 27 2007, 03:30 AM)

Hi;

Anyone aware of any script intepreter(C/C++...) or processor that can run under labview Rt ?

The problem with the current intepreters like Ch, Lua, Python, UnderC are the dependency problems

with other libraries like Kernel32.dll and so forth...as such fail to work on RT.

I got UnderC to work under labview, but failed under RT because of kernel32.dll...

Even adding the file to the project, it still fails; in anycase, I wouldn't want to load another memory manager on the RT

I am looking for something that comes as a DLL with header files...

I have a control application that runs loads and runs very large text script for control...

I also have a very simple language (intepreter) that understand the scripts.

It was initialy kept very simple but now, we would like to extend the language, add loops,

local variables in the scripts and inline evaluation of operations.

for example

m1=move_stage(position=100)

m2=read_stage_position()

m3=m1-m2

if(m3>5)

log_msg(position error)

blah blah blah...

else

log_msg(position correct)

blah2 blah2 blah2...

end

Ofcourse what is not obvious from the above example is that only the if statement is processed by the external

intepreter while the rest of the lines are processed by our build in intepreter. The idea is to farmed out the loops,

branching, and mathematical processing to the intepreter such that I can remake the application by changing the script.

My labview functions are already scriptable...

Needless to say this a bit more complicated that it appears because I have to cache the results from each call in a stack

...

Walters

Hi Walters,

Take a look at http://www.kshif.com/calcexpress/' target="_blank">CalcExpress, a commercial product which seems to have very advanced capabilities for writing scripts under LabVIEW.

Neville.

Link to comment

QUOTE

The problem with the current intepreters like Ch, Lua, Python, UnderC are the dependency problems

with other libraries like Kernel32.dll and so forth...as such fail to work on RT.

What kind of test do you performed with LUA interpreter?

LUA is opensource so there is no problem to adapt (recompile) for our platform, i try with succes to recompile for Linux running on RISC 32 Bit processor.ù

The problem may be LuaVIEW because it is a compiled version of LUA + C code to interface it with LabVIEW functions.

Right now i haven't any RT system for testing luaview so i would like to know your test result.

I also ask for this on LuaVIEW mailing list.

Ciao,

Alessandro.

Link to comment

Hi Alexandro;

True, Lua can be adapted...

However I was looking for an off the shelf solution that would allow me to run it on labview RT.

Testing the DLL's that come with it with the RT DLL compatibility program fails...

http://digital.ni.com/public.nsf/allkb/0BF...6256EDB00015230

This means remaking lua as a DLL and removing all the windows depencies.

Just even to see if it will work, I attempted to call some of the DLL included in lua from the development environment targeted to an RT system, and it didn't work. I then tried to deploy and it wouldn't...

The main aim of me embeddeding lua was to make it easy to sequence a complex instrument control, and allow the control programs to be modified without

touching the base code. I can not justify the effort needed to read the relevant documentation in order to modify it; so I have done a very primitive & limited labview implementation for now. It's not fully satisfactory but it will have to do as I know that long term, we need something more and I am trying to avoid reinventing the wheel here.

It even mentions on Lua's website the need to support RT on a future version...

My needs are essentiall a DLL or two with exported functions that can be call from labview to either intepret a line of script or a block and return the results to labview. UnderC came the closes, but just won't embedd because of the depenendcies of the windows memory manager.

Unfortunately calexpress doesn't quite do it on RT either.

Thanks

Walters

QUOTE(Ale914 @ Jul 31 2007, 03:14 PM)

What kind of test do you performed with LUA interpreter?

LUA is opensource so there is no problem to adapt (recompile) for our platform, i try with succes to recompile for Linux running on RISC 32 Bit processor.ù

The problem may be LuaVIEW because it is a compiled version of LUA + C code to interface it with LabVIEW functions.

Right now i haven't any RT system for testing luaview so i would like to know your test result.

I also ask for this on LuaVIEW mailing list.

Ciao,

Alessandro.

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
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.