Interfacing Simulink model with LabVIEW

3 views (last 30 days)
Richi
Richi on 6 Mar 2018
Edited: Richi on 6 Mar 2018
Good morning, I have been trying to integrate my simple respiratory model (linear dependency on airway resistance and lung compliance) created in Simulink into my LabVIEW control algorithm. After Googling, I have found the following methods: 1. Using the Model Interface Tool (MIT) 2. Using the Controls and Simulation Toolkit to convert a Simulation Model into LABVIEW
However I have encountered troubles even during the first steps. While building the model in Simulink I got a self explanatory error: "Algebraic loops are not supported in generated code..". I have tried to fix this by inserting a delay block/ memory block etc into the model. However, as the algebraic loop is essential for proper functionality of my model any of these interventions caused unexpected behaviour in a form of oscilations - overall the output is unusable. Tutorials I have followed and tested:
  1. * https://forums.ni.com/t5/LabVIEW/Connecting-Simulink-Circuit-to-LABview-Controller/td-p/3313296
  2. * http://zone.ni.com/reference/en-XX/help/374160A-01/vsmithelp/mit_convert_model_to_dll/
  3. * https://zone.ni.com/reference/en-XX/help/371894G-01/lvsim/sim_simtrans/ and any similar I could find online.
Questions:
  1. Is there a way I have not found for keeping the functionality of my model while removing the algebraic loop?
  2. Is there an easier way of interfacing Simulink model with LabVIEW? I have found resources from 2011 doing exactly what I would need: http://www.ni.com/white-paper/3057/en/However this approach is not supported any more and a new methods require Simulink model to be build.
Software used:
  • Windows 10 64-bit
  • LabVIEW 2017
  • Matlab and Simulink 2017b
Simple model: input1 - timeseries of muscle contraction. Constant1 airway resistance, Constatn2 compliance

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!