06-10-2015 10:46 AM
Hi,
I am just starting to use Labview interface with Simulink using Model Interface Toolkit (MIT). I am trying to import an integrater model from simulink. The model is very simple. An input port connected to an output port through an integrator model (1/s). Here are the steps I used:
1. Build the model in Simulink.
2. Add the NI input-output ports to the model and place the NIVeriStandSignal Probe in the model.
3. Generate the dll using NiVeriStand.tlc as the target file option.
4. Import that dll into Labview using Load Model.vi. Follow the steps given in the example file for importing the input/ output ports info along with the timing info.
5. Then use a numeric control to input value to the integrator dll and pass the output from dll to a waveform chart.
But when I run the labview VI, the output in the chart is always zero. What could be the possible reason? Please let me know if I am making any mistake in the process?
I have used Fixed time step with ode4 (Runge-Kutta) as the solver options in Simulink during dll generation. I am using Labview 2014 and Matlab R2014a.
I have found the issue to occur only when I use any transfer functions or Plecs circuit with inductors or capacitors in my Simulink model. But when I use simulink model with only constant or maths functions like add, subtract etc, this process works and gives me the correct result in Labview.
Any help would be appreciated.
Thanks.
06-12-2015 11:51 AM
Hello Sachin_Madhu,
Can you build example programs with a solver included? Does the model work in The MathWorks, Inc. Simulink® Software without tying into LabVIEW? It is important that when you built the model you followed the four steps listed in this help file:
http://zone.ni.com/reference/en-XX/help/374160A-01/vsmithelp/mit_convert_model_to_dll/
MATLAB®, Simulink®, and Real-Time Workshop® are registered trademarks of The MathWorks, Inc. Other product and company names listed are trademarks and trade names of their respective companies.