From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating .net assembly with malleable VIs

Solved!
Go to solution

Experimentation has shown that if you create a .net assembly with a malleable vi, only the implemented solution is available in the resulting assembly. Can anyone confirm that this is the expected behavior?

 

The behavior I was hoping for from the resulting assembly was to have the resulting function support multiple data types (such as scalar and array).

0 Kudos
Message 1 of 4
(2,514 Views)

@raceybe wrote:

Experimentation has shown that if you create a .net assembly with a malleable vi, only the implemented solution is available in the resulting assembly. Can anyone confirm that this is the expected behavior?

 

The behavior I was hoping for from the resulting assembly was to have the resulting function support multiple data types (such as scalar and array).


I'm not surprised! Mallable VIs make their magic happen by basically recreating the VI on the fly according to the datatype wired to it. This is definitely an edit time feature. Once you hit the run button the whole code is recompiled into machine executable instructions according to the datatypes wired to the mallable VI at edit time. The same happens when you build an application, DLL or .Net assembly and accordingly only the code for the specific datatype at compile time is generated.

 

Someone would have to add support for generic datatypes to the .Net implemenation in LabVIEW, device a runtime rather than an edit time adaptive datatype too and make this all work together. Without knowing all the details of LabVIEW interna I still expect such a project to be a major investment that is unlikely to happen in the current LabVIEW version. It may be on the roadmap for NextGen LabVIEW (LabVIEW NXG) but that has to tackle a lot of other things first to be fully feature comparable to current Gen LabVIEW.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 4
(2,460 Views)
Solution
Accepted by topic author CanadaGuy

@raceybe wrote:

Experimentation has shown that if you create a .net assembly with a malleable vi, only the implemented solution is available in the resulting assembly. Can anyone confirm that this is the expected behavior?

 

The behavior I was hoping for from the resulting assembly was to have the resulting function support multiple data types (such as scalar and array).


I'm not surprised! Rather, I would be extremely surprised if it worked like you hoped for! Mallable VIs make their magic happen by basically recreating the VI on the fly according to the datatype wired to it. This is definitely an edit time feature. Once you hit the run button the whole code is recompiled into machine executable instructions according to the datatypes wired to the mallable VI at edit time. The same happens when you build an application, DLL or .Net assembly and accordingly only the code for the specific datatype at compile time is generated.

 

Someone would have to add support for generic datatypes to the .Net implemenation in LabVIEW, device a runtime rather than an edit time adaptive datatype too and make this all work together. Without knowing all the details of LabVIEW interna I still expect such a project to be a major investment that is unlikely to happen in the current LabVIEW version. It may be on the roadmap for NextGen LabVIEW (LabVIEW NXG) but that has to tackle a lot of other things first to be fully feature comparable to current Gen LabVIEW.

Rolf Kalbermatter
My Blog
Message 3 of 4
(2,457 Views)

Okay, I guess that wasn't clear to me that it was an edit or compile time behavior, but I guess it makes sense.

0 Kudos
Message 4 of 4
(2,441 Views)