LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

User defined algorithms

Iam working on a project right now where the user should have the option to define his own algorithms. A kind of formula node with the option to import code would be a good solution.

 

I played around with all the different nodes (Matlab, Xmath, etc.) and it seems to be impossible to import something here at run time. The formula parsing vi's are OK for small amounts of data but are much too slow compared to normal LabView code. The calculations will be done with 7200 Dbl values so performance is critical (Test: A simple formula with formula parsing vi's took 700ms to calculate and normal labview code took 15 ms).

 

At the moment I see only the option to program my own formula syntax interpreter. But this would be a lot of work.

So are there any solutions for this problem?

 

Best regards,

 

Daniel Edenhauser 

0 Kudos
Message 1 of 6
(3,703 Views)

Is Python an option?  It's certainly possible if you can use this.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 2 of 6
(3,678 Views)

jcarmody wrote:

Is Python an option?  It's certainly possible if you can use this.


 

Wow, I have never seen this before. I new it was possible to import ActiveX controls for C++ and Java,

but this is the first time I've seen someone import Python.


Thanks a lot, I will use this all the time.

Cory K
0 Kudos
Message 3 of 6
(3,663 Views)

Thanks for your answer jcarmody i will try the VI's and let you know how it works for me. I also play around with LabView scripting to solve the problem. 

0 Kudos
Message 4 of 6
(3,636 Views)

sdfasdfsd, I believe that you'll have problems with scripting if you need to build an executable.

 

Cory K, doesn't that make you glad that you frequent these forums?  I pity those poor developers that never come here.  I started writing a set of drivers using LabPython to access SQLite databases; I made it pretty far along until someone here told me that I can use the DB Toolkit...

 

 

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 5 of 6
(3,626 Views)

The python VI's are great. Thank you very much for your help. Performance is OK for me.

Personally I think LabView needs a formula or script node that can be defined at run-time.

 

0 Kudos
Message 6 of 6
(3,579 Views)