Converting simulink to vi

Hi All,
I'm now working my final assignment at my college using LabVIEW 8.2.1 (Simulation Module Addon attached) and PCI-6221.
The idea is to convert the anaerobic digestion (AD) model in simulink into LabVIEW. I'm doing this by converting the variable and formula on Simulink one by one to VI. Now I have the exact model of AD with the same variable, formula, and parameter (no error).
The problem is while I run that model, the output yield is completely different from the simulink model.
I will attach the simulink model and the VI I've been working for.
Thanks in Advance,
Septian
NB: the simulink model, run from the BO.m
Attachments:
AD.zip ‏220 KB
Simulink AD.zip ‏18 KB

hi Michelle,
thanks for your attention. I'm already did the check and re-check routine about the formula, the result is totally different. I should be attached the graph result when running the model using the simulink and labview so you can compare them. i'll try to send it later.
I got another problem michelle, if you dont mind please help me. Still on that anaerobic digestion model, i'm now trying to create the VI model using the simulation translator (with a lot of data type fixing using index array and build array, is it normal?). I'll attach the result using simulation translator.
when the compiler says ok, i can't run the simulation. the error message send this:
Error−2318
The dimensions of the parameter vectors of this function do not match.
After a while, the system always crash and needed to close everytime I run this model. The main system's VI is AD.
The time is running out for me, anybody help me on this problem.
Thanks In Advance,
Asep
Attachments:
AD-With Translator1.zip ‏1354 KB

Similar Messages

  • Problem in converting a simulink model in LabVIEW 2010

    hello,
    I have developed a Simulink model in MATLAB which I want to convert into equivalent LabVIEW VI's. The simulink model is as attached. The problem here is:-
    LabVIEW is not able to convert all the mechanical blocks named Ankle revolute joint, Body , joint actuator and joint sensor into  equivalent LabVIEW VI.
    Is it possible to convert those blocks into equivalent LabVIEW VI's?
    PS:- I am using LabVIEW 2010.
    Attachments:
    AAFO.PNG ‏19 KB

    Hi Susheel,
    RFC module interface parameters (import, export , tables) can only refer to data dictionary types. Hence if you currently have one of the parameters referring to a type defined in your function group main include or in a type pool, you need to create a SE11 data dictionary structure/ table type for that and then change the data type reference.
    Cheers,
    Aditya

  • May I have software to convert 40 LV5.1 VI's to LV8.5.1?

    First, we are updating our lab hardware and software. A popular DAQ program was written in LabVIEW 5.1 and runs on an aging PC. We are worried about the survivability of the system, and we would like to update the software to run with a CompactRIO on a new laptop with XP Pro x32 operating system. I read somewhere that the software for converting VI's from LabVIEW 5.1 to LabVIEW 8.5.1 is available, and I need to use it, as it is too much to ask someone else to convert the approximately forty VI's in the attached library from 5.1 to 8.5.1 for me. The library is 13MB, too large to attach to this posting, so I am not able to request someone to kindly convert it for me. Could someone please tell me whether and how it is possible to acquire this conversion software?
    Second,  we are considering translating our LV software to Simulink. Simulink has a data acquisition toolbox, but I am not sure whether it is compatible with the CompactRIO. Could an expert tell me what properties of LV 8.5.1 would make it better than Simulink for DAQ and control with a cRIO9013 Controller, an NI9401 DIO module, and a AI/AO c-Series module ? And what are the features of Simulink for talking to the CompactRIO?

    The software you need for the conversion is any version of LabVIEW earlier than 8.5. Contact your local NI Sales Engineer.
    You should probably contact Mathworks about Simulink.

  • Using Simulink data in labview

    Hello everyone !
    I have made an algorithm in labview and the simulink model data needs to be manipulated in this algorithm. The output of this algorithm is to be fed back in simulink model. I am able to map labview front panel controls with simulink model but i cannot use its data in block diagram window. How do i do it ?

    Here you have three options:
    1. Create a DLL from your model and use the Model Interface Toolkit (http://sine.ni.com/nips/cds/view/p/lang/en/nid/211815) to load the model into LabVIEW;
    2. Convert your model into a LabVIEW Control Design and Simulation (http://www.ni.com/white-paper/11281/en/) SubSystem and use the Control and Simulation Loop to run the model;
    3. Use some sort of communication between LabVIEW and Simulink (like OPC server) to communicate between simulations. This last option, although possible, it requires some sort of synchronization between products to avoid the loop to run too fast.
    Hopefully this helps,
    Barp - Control and Simulation Group - LabVIEW R&D - National Instruments

  • Simulink to LabVIEW automatic conversion

    I used the Tools>>Control Design and Simulation>>Simulation Model Converter to convert a Simulink file (.mdl) to a .vi (multiple files). The problem is that the converted files have a lot of errors and therefore  are not executable. The most frequent error is "You have two terminals of different types. the type of the source is cluster of 2 elements. The type of the sink is 1-D array of double [64 bit real (15 digit precision)] " How to I resolve this error? Is there a difference between Bus Creator/Bus Selector and Bundle/Unbundle in Simulink and LabVIEW respectively? I attach a sample VI. Thanks.
    Attachments:
    Water Pump.vi ‏13 KB

    Hello AAR,
    I cannot speak as much to the exact functionality of the Bus Creater/Bus Selector, but I will see if I can describe the bundle/unbundle to help clear up any confusion.
    The Bundle function creates a cluster in LabVIEW which can be a group of like or unlike data.  This cluster can be passed around the diagram and then the Unbundle or Unbundle by Name functions can be used to pass out a particular value in the cluster.
    I am not sure what your original model was doing, but it is easy to see why the VI you attached is broken.  You can resolve the broken wires in some different ways, and it depends on your intention with your original model.
    The attached file builds several scalars and an array into a 1-D array.  This array is then Bundled with a second array.  The cluster output of this bundle function is then being passed to an indicator called Water and a Global Variable called Inlet_water.  The datatype of both Water and Inlet_water is an array of doubles.  In LabVIEW the cluster datatype and array datatype or not interchangable.  I am not sure how these arrays are used in the rest of the model, but here is where your options come in.
    You could replace the Bundle with a Build Array(concatenate the inputs to make one 1-D array rather than a 2-D array).  Then, wherever you need access to specific elements of the array you can use the Index Array function.  For this modification you will need to know the index of the element you are interested in when using the Index Array.  Either that or convert your global variable and indicator to be clusters.  I think the first modification would probably be the simpler modification, but again it is dependent on how you intend to use the data in the rest of your model.
    I hope this helps, please post back if you have further questions about this.
    Regards,
    Angela M
    Product Support Engineer

  • Why does the "Simulation Model Converter" create a 1-D array when a subsystem is converted

    Hi,
    I want to convert a complex Simulink Simulation with many subsystems into LabVIEW VI. One Problem I have is the one in the subject. I attached a simple example Simulink file and the result of the "Simulation Model Converter" where my problem occurs. 
    In this example I have two equal block diagrams, with the differnce, that the one below uses a subsystem (that only contains a gain). But why is the data inside the sub system a 1D array? Is that necessary? If I change the array by hand into a normal constant, the simulation still works. Is there a way to prevent this wrong conversion.
    Thank you
    Attachments:
    Simulink Example.JPG ‏55 KB
    Example.vi ‏60 KB
    Subsystem.vi ‏243 KB

    Hello Talvi,
    I am guessing that you do not have Simulink installed on the computer where you are doing the conversion.  If you do the conversion on a computer where Simulink is installed, you will get better results.  This is mentioned in the help topic: Using the Simulation Model Converter.  If you are still having trouble, can you please let us know which versions of the software involved you are using?
    Regards,
    Angela M
    Product Support Engineer
    Message Edited by Angela M on 11-19-2008 04:36 PM

  • Simulink and Labview

    Hi all,
    could I use the SimMechanics(Simulink) to create a mechanical model and after that create a DLL with the SIT(Simulation Interface Toolkit) to use it in Labview?
    Thank you.
    Ziman 

    Hello!
    Yes, you can have SimMechanics and build a DLL and then use it in LabVIEW using the Simulation Interface Toolkit.
    However there are a few things to consider since it seems like it works quite differently compared to ordinary Matlab/Simulink
    Quote:
    “SimMechanics model differs significantly from other Simulink models in how it represents a machine. An ordinary Simulink model represents the mathematics of a machine's motion, i.e., the algebraic and differential equations that predict the machine's future state from its present state. The mathematical model enables Simulink to simulate the machine. By contrast, a SimMechanics model represents the structure of a machine, the geometric and kinematics’ relationships of its component bodies. SimMechanics converts this structural representation to an internal, equivalent mathematical model. This saves you from having to develop the mathematical model yourself."
    I am not sure whether the mathematical models are present for the user for optimizations purposes.
    Regards,
    Jimmie Adolph
    Systems Engineer Manager, National Instruments Northern Region
    Bring Me The Horizon - Sempiternal

  • Simulink to labview

    Hi , 
    I want to convert my simulink model to a VI
    I have attached the .mdl file
    Please help me in the conversion
    I am not able to find the substitute for a clock function which is acting as an input as u[1]...it is a unit step signal , increasing linearly with time

    If you want to just call your model from LabVIEW you can try the Model Interface Toolkit. If you just want a clock signal as you've described it, it looks like you just need a loop running at 1 second per iteration and an indicator coming from its iteration terminal. Another option is using the tick count VIs if you want the actual time elapsed instead of just a count. I've coded both in the example below. Is this what you were looking for?
    Miles G.
    National Instruments
    Applications Engineer
    Attachments:
    Forum Clock.png ‏23 KB

  • ABS from MATLAB (simulink) to Labview (.vi file)

    Hello
    My Antiskid Control System project requires me to plot the graphs of wheel speed and vehicle speed. The original model is from Matlab simulink file-absbrake(this is an example of control)
    I tried to convert the whole system into labview representation. I donot want to use SIT or RT or any other Labview tools. I wanted to convert from Simulink model into Labview element-by-element. Can anyone help me...plss
    my due date for submission is 15march...so please help me

    abs.vi is the file that i attempted to 'convert' from matlab into labview
    Attachments:
    abs.vi ‏97 KB
    absbrake.vi ‏32 KB
    absdata.vi ‏1 KB

  • Simulation model converter: cannont communicate with MATLAB

    Hi,
    I am trying to convert a Simulink model (.mdl) to a VI labVIEW model by using tha Simulation Model Converter.
    The Simulink model contains some parameters (Matlab variables) initialised through a .m script.
    The conversion fails and the following error is reported:
    ERROR: LabVIEW could not communicate with MATLAB.An installation of MATLAB is required  to use initialization scripts.
    I am using MATLAB 2009b and LabVIEW 2010 SP1.
    Is it a bug or is there some configuration that I am missing?

    Hello Tommpogg,
    My name is David and I am an Applications Engineer at National Instruments UK.
    There versions of MATLAB and LabVIEW that you are using should create no problems as they are compatible with each other. Do you have the error code for the error that occurs? This should speed up the trouble shooting process. Also what is the reason for you converting the Simulink model to LabVIEW? Have you considered using the LabVIEW Simulation Interface toolkit which is designed to create a LabVIEW User-Interface for Simulink models? I have included a link to this for you to have a look at:
    http://zone.ni.com/devzone/cda/tut/p/id/3583
    I hope this helps and am more than willing to try and help further if you reply with some more details.
    Regards
    David B
    Applications Engineer
    National Instruments UK

  • Converting matlab .mdl model to .dll in veristand

    Hi,
    I'm new to veristand, i have 2 questions
    1)how to get started with veristand basics? i saw some demos but i really need a document explaining procedure of some model. If anything pls tell me.
    2) I have created a model in simulink and i'm using 2010b version and 2011 veristand evaluation version. I'm not able to convert .mdl to .dll using real time worshop.

    Hi,
    I finally created a .dll file from .mdl simulink model. I configured in veristand and tried to deploy in veristand but i'm getting the following errors. So how do i get rid of this error.
    Attachments:
    error.jpg ‏53 KB

  • Simulink Compile with SimWise4D Block

    Hello,
    I'm trying to use MIT to convert the following model so that I can use LabVIEW as the UI for it:
    I configured everything as usual. However, the problem I get is not getting an error, but generating C-code with dll file.  I tried it several times and made sure that Veristand TLC is chosen. 
    I suspect the block of SimWise4D which links Simulink to their Software. However, I can't comprehend why dll not generated while C-Code is generated successfully.
    Here is a sequence of screenshots of my configuration:
    Your help is always appreciated.
    Waleed El-Badry MSc.,MCPD, ISTQB Certified Tester
    Assistant Lecturer
    Mechatronics Department
    Faculty of Engineering
    Misr University for Science & Technology

    Thank Nestor again for your response,
    After testing blocks separately, I got assured that SimWise4D block is the one responsible for not generating the dll file (although no generation errors is created).
    I modified the block diagram to be like this:
    I compiled the file as stated earlier and have been told that model is compiled successfully (although dll file was not generated). Here is the diagnostic dump with observed error:
    C:\PROGRA~1\MATLAB\R2014a\sys\perl\win32\bin\perl C:\PROGRA~1\MATLAB\R2014a\rtw\c\tools\mkvc_lnk.pl SimWiseTest.lnk SimWiseTest.obj NIVeriStand_main.obj SimWiseTest_data.obj rtGetInf.obj rtGetNaN.obj rt_logging.obj rt_matrx.obj rt_nonfinite.obj rt_printf.obj rt_sim.obj SimWiseTest.res swPlant.obj
    link /RELEASE /INCREMENTAL:NO /NOLOGO -entry:_DllMainCRTStartup@12 -dll kernel32.lib advapi32.lib wsock32.lib @SimWiseTest.lnk /dll -outimWiseTest.dll
    LINK : fatal error LNK1181: cannot open input file 'swPlant.obj'
    *** Created DLL D:\Veristand Test\SimWiseTest\SimWiseTest_niVeriStand_rtw\SimWi​seTest.dll
    I don't know if this problem could be tackled. I can attach the file , but as I mentioned, it requires SimWise4D to be installed.
    Your help is appreciated.
    Waleed El-Badry MSc.,MCPD, ISTQB Certified Tester
    Assistant Lecturer
    Mechatronics Department
    Faculty of Engineering
    Misr University for Science & Technology

  • Need to a voltage converter to run US-bought 110v HP Printers in 220v Pakistan any recommendations?

    I Purchased Three Printers 
    1. 
    HP LaserJet Enterprise 500 MFP M525dn(CF116A)
    2.
    HP Color LaserJet Enterprise CP4025n Printer(CC489A)
    3.
    HP LaserJet P2055d Printer (CE457A) -
     All of them three operates on 110v USA.  but i need them to use in 220V . Can anyone recommend me any good Voltage converter ?
    This question was solved.
    View Solution.

    Hi,
    Before go out to buy a converter/transformer  (you need over 2KW for all 3 of them), please check the switches at the back, they may have switches to switch from 110V to 220V. I don't know your market, my suggestion: talk with an electrician who knows the real world much better.
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • ALL MY DESKTOP APPS CONVERTED TO PDF FILES.

    After sending an urgent email attachment in Adobe PDF to Government Offcom, all my Desktop applications in windows 7 64 bit have been converted to PDF files and cannot be opened.   The attachment used was sent to me by my Secretary remotely using an old MAC.
    I can return my laptop to normal operation by un installing my Adobe Reader 11 app, but the problem returns when I re Download Adobe Reader
    11 again.     After discussing this with Adobe Technical in London they advised me to raise this issue with your Adjudicators in this Forum. 
    Please assist asap as this is very urgent right now for several genuine reasons.
    Many thanks.   Derek Horder.

    See if anything in here helps: https://helpx.adobe.com/acrobat/kb/application-file-icons-change-acrobat.html

  • Which is best app to convert voice memos to text?

    There must be a way to import iPhone 5s voice memos, some 20 minutes long into editable text. Recommendations would be appreciated.

    SORRY! WHAT I MEANT TO ASK WAS "I WANT TO EXPORT  YOUTUBE & FACEBOOK VIDEOS TO ITUNES. WHAT IS THE BEST APP. TO USE TO CONVERT THESE VIDEOS INTO A FORMAT THAT IS ACCEPTABLE TO ITUNES. WHAT IS THE BEST FORMAT TO USE. THANK YOU

Maybe you are looking for

  • Want help on N91 os update

    I m using my N91 as modem to connect to internet. How can I update new os?? Can I save to laptop HDD, then update?? Plz help me if anyone knows..

  • White frame around the pictures

    Hi, Can somebody tell me how I could avoid the white frames arounds my objects when I put them on a colored base ? Thank you and all my excuses for my rather poor english writting ! Remo from switzerland

  • Deactivation option missing from CS3

    I'm trying to move an installation from one PC to another. It's a single-user licence (I think), it has a serial number and has been activated over the net. So I need (again I think) to Deactivate it on PC #1 before I can activate it on PC #2. The on

  • Screen Exit: Add CAUFVD-KOSTL field to CN21 transaction

    HI, i have this requirement, i need the CAUFVD-KOSTL field in the program SAPLCOKO dynpro 2111. In found some exits related to CN21, but i don´t know if  some exit can be use for my task. Did someone have a similar requirement? Or  maybe i need to do

  • I want to change my email address, how to proceed ?

    hi all, i need to change my email adress after a mistake in registering icloud, how can i do ?