LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL c++

Hello, I want to build a personalized library in Labview where the user can use our Blocks directly, like we did on Matlab using s_function where we have the function of initialization, output (execution) and the function terminate, so is there any one can help?

actually i'd try to use c++ code then generate DLL then import it to Labviw but i think it should be a specific structure or template that structured the event of execution some function executed once and other in a loop and other in the end.

0 Kudos
Message 1 of 4
(93 Views)

In LabVIEW, the wire determines execution order and once you create your subVIs ("blocks" is not really the right word) it is up to the programmer to use them correctly. If you want to include example code, some parts will be before, some inside, and some after a toplevel while loop.

 

Make sure to use typical connector panes and assigned connections (e.g. error in/out at the bottom, etc.) Just look at any established toolkit for guidance.

0 Kudos
Message 2 of 4
(79 Views)

Implementing your logic in C++ just for the sequential control of your functions is about as smart as trying to build a house by not only building your own bricks first but by manufacturing the sand and other ingredients for those bricks yourself too.

 

LabVIEW is dataflow driven, which is EXACTLY about sequence control. A node (or subVI) can only start executing when all its inputs are valid (properly generated by previous nodes). And the outputs of a node or subVI are only valid when it has fully finished executing. That lets you chain nodes if you need sequential execution, or not if they may execute in parallel, which they actually will do as far as the number of CPU cores allows on your machine.

Rolf Kalbermatter
My Blog
Message 3 of 4
(46 Views)

you can connect to a dll, but not import it.

you can make formula nodes if you want to get something more elaborate in.

0 Kudos
Message 4 of 4
(19 Views)