Math Interface Toolkit in Matlab: Can I interact with a VI as a parallel process

I'm curious if it's possible to create a Matlab MEX file using the LabVIEW Math Interface Toolkit (MIT) that can be called in matlab and accessed while running?
I'd like it to effectively work just like any other object in matlab.  I'd like to be able to query the object while it's running, dump values out of a buffer, and even hook events if possible.
As it currently stands, the VI to MEX setup seems to just allow me to call a VI, run it, and then drop out.  I want to be able to continuously acquire and access the data as it's coming in and interact with it from matlab (i.e. fully integrate the VI into my matlab code as a separate object).
Is this possible in some form or am I stuck with dedicating the matlab interface to the VI whenever I want to call it?
Thanks

Hi GusLott,
You are correct that when you call a VI the command line will not continue until the output is obtained.  This makes sense since in LabVIEW that is how a VI operates (a subVI does not ouput until all outputs are obtained).  I believe this is also how commands in MATLAB work as well (correct me if I am wrong).  On the otherhand this is not a disadvantage in labVIEW since you can run VIs in parallel.  If you can create some way to run parallel threads in MATLAB then you will be able to do two (or more) MEX calls at once. 
As far as object oriented programming goes, there is a labVIEW OOP, but I do not think it has been tested in conjuction with the Math Interface Toolkit.
Brian K.

Similar Messages

  • How do i pass a daqmx task from labview to matlab using the math interface toolkit?

    I want to use DAQMX functions from Matlab using the Math Interface Toolkit (MIT). How can I have a labview function output (return) the DAQMX task to matlab via the MIT?
    I want to do this so I can start a DAQMX task in Labview from a matlab function and return control to matlab without losing the task.

    Hi Mark,
    (I already posted this answer in your other thread, but let's keep THIS thread alive - it makes more sense here in the LabVIEW forum than in Instrument Control forum.)
    Since the DAQmx Task is not a native data type that can be passed directly to MATLAB from LAbVIEW, try flattening the DAQmx Task to a string before passing to MATLAB. However, I doubt that you can access the task from within MATLAB, but feel free to give it a try.
    Good luck!
    - Philip Courtois, Thinkbot Solutions

  • Math interface toolkit install

    Hi,
    Please is there any chance to download somewhere a trial of the math interface toolkit?
    I want to use my VIs on matlab as a GUI, and I guess this is the tool to make it works...
    Thanks, Pierre

    I installed evaluation version of Math interface toolkit to convert VI into Mex functions.
    but the toolkit only allows me to make LNX functions, there is not Mex function tab.
    I installed the evaluation version...and in the tools menu it says "math interface toolkit for xmath"  which I think is not the toolkit i'm looking for.
     I downloaded it from the link :
    http://zone.ni.com/devzone/cda/tut/p/id/2716 
    I tried both links on the above page i.e  NI LabVIEW Math Interface Toolkit (MIT)  and NI LabVIEW Math Interface Toolkit. but both install it for xmath and only make LNX function.
    where I can get the right toolkit?

  • Math interface toolkit problems

    I am writing some programs for a customer who uses Matlab, so I intend to use the Math interface toolkit. I have version 1.0.2 of the toolkit, and Labview 8.5.
    As an evaluation exercise, I have converted some simple vis and sent them to him, along with their dlls:
    (1) A vi that uses the sound file and output functions to do a simple beep sound.
     This seems to run on his Matlab machine, but does nothing. No errors, nothing.
    (2) A vi that just multiplies 2 numbers.
     This returns the error "One or more output arguments not assigned during call to "LVMultiply"".
     There is only one output, and it is assigned.
    My questions:
    (1) Anyone have any ideas?!
    (2) When I build a Matlab function, I get a message telling me that the target computer should have the Math Interface Toolkit run-time installed. I can find no information about this in the toolkit help file or on ni.com.

    Hi
    I have very little experience with the Math Interface Toolkit but have
    found some information that may be useful. I does look like issue
    addressed in the above knowledge base article may not be what is
    causing your issue. This forum thread contains more information that may be useful.
    The KB Why Does the MEX-File I Created with the Math Interface Toolkit Appear to Hang The MathWorks, Inc. M... may help you solve the issue with your first VI. I will continue to look into this and post any more info here. Let me know how it goes.

  • How to get input and output using math interface toolkit

    Hi,
    I am fairly new to labview and i am trying to convert my labview code
    into matlab mex files using math interface toolkit. I cant see any
    input or output terminals when i try to convert the code to mex files
    even though my vi has plenty of inputs and outputs that should be
    available during conversion.
    just to cross  check i made another vi in which i inputted an
    array of data to an fft and outputted it to an array again. i tried to
    convert this code to mex files but was still not able to see any input
    or output terminals, which makes me believe that i must be doing
    something wrong at the very basic level and inspite of trying really
    hard for some days now i have not been able to figure out that might be.
    So please help.
    I am attaching the basic vi that i created along with the link that i followed for converting labview code to mex files.
    http://zone.ni.com/devzone/conceptd.nsf/webmain/EEFA8F98491D04C586256E490002F100
    I am using labview 7.1
    Thanks
    Attachments:
    test.vi ‏17 KB

    Yes, you've made a very basic mistake. You have front panel controls and indicators but none of them are connected to the VI's connector pane. right click on the VI's icon and select "Show Connector". You use the wiring tool to select a connection there and then select a control or indicator. Use the on-line help and look up the topic "connector panes". There are some sub-topics on how to assign, confirm, delete, etc.

  • Errors when Math Interface Toolkit creates dll

    Dear NI experts.
    When I want to use Labview Math Interface Toolkit  to create a simplest DLL, I got errors(see attachment), I can not get the dll file.
    My vi is just like y=x+1.
    My operating system is : WinXP sp2
    Labview : Professional Development System, Labview 8
    Math Interface Toolkit : don't know the version, just download from NI on 30 June 2006.
    Looking forward of reply soon.
    Many thanks
    Attachments:
    mit errors.jpg ‏20 KB

    Hi Z
    Please make sure that you have version 1.0.2 of the math interface tool kit as version 1 is not fully compatible with LabVIEW 8 you can check what version you have if you got to start>>control panel>> Add Remove programs >>National Instruments>>change look for Math Interface Toolkit XX.
    Here is a link to check what version of the tool kit you need for different versions of LabVIEW
    http://www.ni.com/support/labview/lvtool.htm#math
    I have added a link witch deals with some of errors that might occur while using math scrip it also has some useful additional links at the bottom of the page
    Error When Calling a MEX File Created With the Math Interface Toolkithttp://digital.ni.com/public.nsf/websearch/55708A4​952BDD4A386256E85005720B4
    I hope this helps
    Tim
    Applications Engineer | National Instruments | UK & Ireland

  • Problems using math interface toolkit

    Hi! I'm trying to use the Labview Math Interface Toolkit to make a *.dll and a *.m file that will allow me to control a camera (via a PCI-1411 card) in either IDL or Matlab. When I used my *.m file in Matlab, I'm given this error message in Labview: IMAQ Vision: (Hex 0xBFF604A5) file not found. When I run the vi, everything works fine. Any suggestions on what I should change? Thank you.
    Attachments:
    Get_Pic.m ‏1 KB
    Snap_and_Save_to_File_MODIFIED_ICON.vi ‏91 KB

    Hello.
    The Math Interface Toolkit, as you know, simply turns the VI into a DLL, and then calls the LabVIEW DLL.
    This error that you are seeing is because the path that you are feeding the VI is not working. If you run this VI in the development environment and give it a valid path, then you will see the same error. Ensure that you are feeding a valid path to the VI (C:\Image)and you should see the error go away.
    Regards,
    Colin C.
    Applications Engineering
    Colin Christofferson
    Community Web Marketing
    Blog

  • Math interface toolkit

    I installed evaluation version of Math interface toolkit to convert VI into Mex functions.
    but the toolkit only allows me to make LNX functions, there is not Mex function tab.
    I installed the evaluation version...and in the tools menu it says "math interface toolkit for xmath"  which I think is not the toolkit i'm looking for.
     I downloaded it from the link :
    http://zone.ni.com/devzone/cda/tut/p/id/2716 
    I tried both links on the above page i.e  NI LabVIEW Math Interface Toolkit (MIT)  and NI LabVIEW Math Interface Toolkit. but both install it for xmath and only make LNX function.
    where I can get the right toolkit?

    What part did you not understand?
    Posting the same question, multiple times is just impolite and does not get it answered quicker. You posted this thread 10 minutes after you posted the first question. The majority of the people here are volunteers who take a break from work to help. By marking this post as a duplicate, I made it so people would not waste time responding to both of your posts. Let's keep it to your original. Have a little patience.

  • Could not use the math interface toolkit

    I have labview 8.0....and i am unable to use the math interface kit it provided....please help..

    swap,
    You are correct that the Math Interface Tookit 1.0 is not compatable with LabVIEW 8.0, which probably exlains why you are seeing an error.  You may have already seen this knowledgebase.  As suggested in the knowledgebase, you can get version 1.0.2 by visiting the Upgrade Advisor.  You can also contact your local NI sales representative.
    Chris M

  • Can't interact with any open windows, can't interact with flash content

    I've already tried reinstalling, resetting and deleting my profile, nothing's changed.
    I can't close any Firefox window by pressing "x", or by pressing Alt+F4, I can only close it through the task manager or task bar. Minimising or going into windowed mode is also impossible.
    If a new window opens itself (e.g. A download) I can't interact with it at all - It's visible on top of the main window, but nothing I do affects it.
    I also can't interact with flash content (like pausing a youtube video)
    There is absolutely no feedback when I try. The icon doesn't change.
    I recently reset firefox, there are no add-ons, themes etc. installed, the problem persists.
    I am running Windows 7 64bit, everything else (including other browsers) appears to be working fine and a virus scan (Avast! free version) turned up nothing.
    I'd really appreciate any help!

    Hello,
    '''Try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
    ''(If you're not using it, switch to the Default theme.)''
    * You can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''
    Thank you.

  • After soak test update, I get error messages repeatedly. The majority are "unfortunately, messaging has stopped", but you can replace messaging with "android os", or any other process, as it happens with more than just messaging. I have had numerous peopl

    After soak test update, I get error messages repeatedly. The majority are "unfortunately, messaging has stopped", but you can replace messaging with "android os", or any other process, as it happens with more than just messaging. I have had numerous people call and ask why I didn't reply to their texts...and I look, but have not received any new texts. YES, I have restarted phone. I have cleared data as well as cache on all apps. I have downloaded the vzw messaging app, which seems silly, since it happens with several different processes and apps, but all to no avail. I am missing texts from my employer, from my family. This did happen, but rarely, before this "soak test". It is now Kitkat version 19.6.3.obake_verizon.en.US. THIS is when I started having problems...like 50 times a day kind of problems! I have seen hundreds of posts all over the internet over the past 3 days. Does no one know how to fix this??? Shouldn't there be a way to revert phone to a pre-update state? and no, hard reset did NOT work!!!! I have been with verizon for well over 15 years, but I have not upgraded my lines and will not in July either. This is ridiculous. It's not like my games aren't working, it is my messaging and "android os"...my lifeline at work!

    kristinaf333,
    Oh no, I am sorry to hear your messages are not working since the software update. I greatlly appreciate doing all that troubleshooting to try and get the messaging application back in business. I know how much I rely on my messages so I can understand the urgency to get this resolved. Have you had a resolution ticket opened since you started experiencing issues with your messages? Does this happen with all contacts or just some? Please provide additional information to ensure we get to the bottom of this for you.
    KarenC_VZW
    Follow us on Twitter @VZWSupport

  • Compactdaq and math interface toolkit

    Hi i have a problem with compactdaq, i have a
    simulink model and i want it to interact with labview using the
    compactdaq to real controlling a process.I send you an example of the
    matlab model to be more specific: in this model i want to match the
    out1 parameter with the analog out of the compact to give voltage to an
    actuator and the ln1 parameter with the analog input of compact to
    acquire data. In labview i should change parameters like Constant or
    the Gain in Subsystem and display data. I would like to know if it's
    possible do something like this and how.Thanks a lot
    Attachments:
    ControlloP.zip ‏6 KB

    Hi Freddino,
    I post the answer received by Andrew Stillwell about your problem.
    For future reference, a jpg of that system would be a lot easier to work with - MatLab isn't readily available around here
    So I'm looking at this:
    It looks like you are just reading in a value (In1) and feeding it back to an AO (Out1) after doing some gain and addition.  Yes it is possble to do this for cDAQ - you just need an AO and AI module.  For a feedback loop like this it would probably make most sense to use single point reads and writes. You could start with the PID Control-Single Channel.vi example.
    Hope this helps,
    Andrew Stillwell
    NIC
    Message Edited by Branch Support - NIC on 02-12-2007 02:32 PM
    feedback.JPG (34 kb)
    AE Manager
    NI Italy

  • How can I interact with a Database?

    I've got a project I'm working on in my Java class, and I can't find out how to make the program interact with a database. I was wondering if anybody here could help me out at all? My partners and I have already gotten most of the program figured out (but not programmed), and this is giving us a little bit of trouble. Our books don't have this information, and our teacher told us to check here, so here I am. Any help would be appreciated. Thanks.

    You need to get a jdbc driver for your database. Your vendor should provide you with one. If not then you can try looking for free implementations of that particular database.
    This jdbc driver is used by your program to execute sql statements in the database itself, removing the need for you to handle all the nitty gritty stuff. Kind of like ODBC.
    Like the earlier post pointed out, the tutorials is a good place to look at code samples
    I've got a project I'm working on in my Java class,
    and I can't find out how to make the program interact
    with a database. I was wondering if anybody here
    could help me out at all? My partners and I have
    already gotten most of the program figured out (but
    not programmed), and this is giving us a little bit of
    trouble. Our books don't have this information, and
    our teacher told us to check here, so here I am. Any
    help would be appreciated. Thanks.

  • Can you INTERACT with script without mouse on click?

    Hi everyone,
    I got this script
    has a dropdown list inside
    I can run it in win 7 and interact with by keyboard without mouse
    but why I can't do same thing in the MAC?
    var
      mySelected = Number( app.extractLabel("mDialog") ),
      myDialog = app.dialogs.add({name:"Indesign Close and Save File Machine",canCancel:true});
      with(myDialog){
           with(dialogColumns.add()){
                with(dialogRows.add()){
                     var
                     mySelection = dropdowns.add({stringList:["01   Close and SAVED", "02   Close WITHOUT save", "03   Save all files", "04   Reverse", "05   Remove unused color"], selectedIndex: 0});
    if (myDialog.show() == true) {  
        var docs = app.documents;  
        main();  
        myDialog.destroy();  
    function main(){
          colse_file();
    function colse_file(){
        if (mySelection.selectedIndex == 0){
            var docs = app.documents;
                 for (var i = docs.length-1; i >= 0; i--) {
                         docs[i].close(SaveOptions.YES);
          alert("Files are saved.") 
          return;
        if (mySelection.selectedIndex == 1){
            var docs = app.documents;
            for (var i = docs.length-1; i >= 0; i--) {
                  docs[i].close(SaveOptions.NO);
          alert("Files are closed without save.") 
          return;
       if (mySelection.selectedIndex == 2){
            var docs = app.documents;
                 for (var i = docs.length-1; i >= 0; i--) {
                         docs[i].save();
          alert("Files are saved.") 
          return;
       if (mySelection.selectedIndex == 3){
          var docs = app.documents;
                 app.scriptPreferences.userInteractionLevel = UserInteractionLevels.neverInteract;
                 app.documents.everyItem().revert();
                 app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
          alert("All files are reversed.") 
          return;
       if (mySelection.selectedIndex == 4){
          var doc = app.documents, i, j; 
               for(i =0;i<doc.length;i++) 
                      unused = doc[i].unusedSwatches; 
                         for(j=0;j<unused.length;j++) 
                          unused[j].remove(); 
            alert("All the unused swatches in your opening files are removed.") 
          return;
    thanks
    Teetan

    The only way to purchase from the iTunes Store is via iTunes, on a computer or iOS device, and it will automatically download your purchase immediately. You have a couple of options: you can go ahead and purchase on another computer that has iTunes and then just copy the purchases to your Vista system (via any normal means of file transfer), or if you're in the US, the new iTunes in the Cloud feature, currently in beta and so not completely reliable, would allow you to download the purchases again at some future time when you get your iTunes problems sorted out. I'd recommend the first option as the best solution for now (and the only solution if you're not in the US).
    Regards.

  • Can Director Interact With Other Applications?

    Hello,
    I am a CBT/E-Learning Developer looking for a way to author
    Guided Help. I am thinking of how to develop interactive tutorials
    that, instead of using screenshots of an application, interact with
    the application itself.
    For instance, let's imagine that a person is working in MS
    Word and doesn't know how to save a file. He can click the icon for
    the "Saving A File" lesson, and a caption displays on top of MS
    Word that reads something like "Click FILE", along with some type
    of indicator of the FILE button, such as an outline, highlight,
    arrow, etc. The user clicks FILE, the File Menu drops down in MS
    Word, and the next step of instructions is displayed. In this way,
    the usre is guided through the steps of saving a file as he
    actually performs the task in the software.
    Can Director create this type of thing?
    Thanks a lot,
    Mike

    Hi Chunick,
    Thanks for replying. I used MS Word as just an example; the
    type of software I'm wanting to use this for is police records
    management software. I've been doing the interactive simulation
    tutorials for them since 1999, using multimedia authoring tools
    Demoshield and Opus Pro, and demo authoring tools RoboDemo and Demo
    Builder. However, I wanted to get away from interactive tutorials
    for 3 reasons:
    (1) My client's software is frequently updated, and keeping
    up with taking new screenshots is a hassle.
    (2) I'm of the opinion that "at the moment of need", process
    embedded "guided help" in the actual application is a much more
    useful form of training than working through a simulation.
    (3) It will greatly help my client's support staff and
    training staff
    I've been researching process embedded e-learning and guided
    help for almost a year now. I've looked at everything from
    multimedia authoring to macro software. I even found two programs
    that do exactly what I want, but they are very very expensive, much
    more expensive than Director.
    Thanks for the tip on Hook Xtra; I'll check that out. Last
    night I found an xtra called MasterApp, which may also do what I
    need. I appreciate the concern about the difficulty of programming,
    and I'm not a programmer (except HTML, and we all know how easy
    that is). But I'm in this for the long haul, and would be using it
    for potential new clients, not just my current client. I love
    learning new software, and I have a membership to the IEEE Computer
    Society, which gives me over 1300 online e-learning courses I can
    take, including Director.
    Thanks again for the lead!
    Mike

Maybe you are looking for

  • Cmd-esc undesirabley launches Front Row?

    Hi I have LiteSwitch installed (www.proteron.com/liteswitchx). According to its documentation, hitting esc while toggling through the apps (with CMD-TAB) would exit it without switching to the selected app. However, on my machine, hitting esc (while

  • Does anybody know where to buy a centronics cable?

    I have a power pc G4 with firewire ports. And I have a hp printer that has a 36 pin (mini) centronics parallel port. Does anybody makean adapter for this ? Thank you.

  • Forgot my security question! no rescue email!

    HELP! i forgot my apple security question answers and i don't have a rescue email address!!! please please please please HELP ME!!!

  • Chnaging Java Version in 10g

    Hello, I recently downloaded JDeveloper 10g(9.051) which run Java Version (1.4.2_03) and so far I like what I seen, but I have been assigned a enhancement to a Oracle Internet File System Application, which runs I believe Java Version 1.3.1_02. Is th

  • Set Camera Profile with a Preset?

    I am shooting tethered with a Nikon D700 and I want to apply a camera profile (Nikon D700 Landscape) to each image as it is captured. While tethered, I know how to assign a Preset, what I don't know is how to assign a camera profile to a preset? Thou