03-11-2025 11:37 AM
Hello
I am trying to interface a Simulink dll in a LabVIEW application using the Model interface toolkit (labview 2017, MIT v2017 32 bit)
On loading the dll, the NI-MIT toolkit is not able to get any signal path if there is only a single signal in that bus. However, if there are multiple signals in that bus, then everything works properly.
For example, the dll contains inport with following signals:
Bus1/Signal1
Bus1/Signal2
Bus2/Signal3
The NI-MIT toolkit shows both Bus1/Signal1 and Bus1/Signal2. But signal3 path shows only Bus2 (instead of Bus2/Signal3)
Has anyone encountered this issue?
03-11-2025 08:32 PM
I've never heard of the Model Interface Toolkit, and suspect that not very many of the experience LabVIEW developers on the Forum have used it. It looks like it may somehow be linked to Simulink, a Matlab product, but there are also LabVIEW toolkits that can be used to simulate a system.
However, looking at your specific problem, might the problem be a difficulty with mixing a 2-signal and 1-signal bus. What happens if you make both buses be 2-signal (or, alternatively, both be 1-signal)? You can always put the same signal twice into bus-2.
Can you attach some LabVIEW 2017 code, perhaps even an entire Project (do a "Send to:" of the Project Folder to "Compressed (zipped) Folder"), which will help us to understand more about your code?
Bob Schor
03-12-2025 03:05 AM - edited 03-12-2025 03:07 AM
Hello Bob.
You are right that it is a dll created from MATLAB/Simulink.
There is no problem if both the buses have 2 signals (or more). The issue arises only if any bus has a single signal. We are currently using the workaround that you suggested (adding dummy signals to the bus). But the client wants a proper solution.
It is not possible to share the complete code. I am attaching the vi which has the actual issue.
Drilling down into the subvis of the toolkit, I see that the root issue is occuring at NI_MIT.lvlib:Model Interface Toolkit.lvclass:Get Port Info by Index.vi
This vi has a Call Library Function Node to call NIVeriStand_MdlWrap.dll
This dll is supposed to output all the signal names. This is giving only the bus name in case of a single signal.
03-12-2025 07:17 AM
Thank you for providing more information. Others on this Forum have experience with such things as NI Veristand and NI MIT and can now probably provide some ideas for you to try.
Bob Schor