ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

取消
显示结果 
搜索替代 
您的意思是: 

Creating .net assembly with malleable VIs

已解决!
转到解答

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 项奖励
1 条消息(共 4 条)
3,108 次查看

@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
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 项奖励
2 条消息(共 4 条)
3,054 次查看
解答
已被主题作者 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
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
3 条消息(共 4 条)
3,051 次查看

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 项奖励
4 条消息(共 4 条)
3,035 次查看