Comunicacion entre Matlab y Labview

Me gustaria saber cuales son las posibles formas de comunicacion entre Labview y Matlab. Creo que se puede hacer por ficheros, DDE, Active X. Tambien me interesaria saber si existe alguna libreria ya creada con este objetivo o algun ejemplo. He visto un ejemplo para Labview 3.0 o 3.1 pero no se puede convertir a Labview 6i.
Si alguien tiene ejemplos, librerias o informacion sobre esto me gustaria que me ayudase.
Gracias!

Maneje convertir el fichero asociado sin ningunos problemas, ahora probados en LV 6i y todo el VI abierto. Espero que esto le ayude. Dejeme saber si hay algunos problemas..
(Perdone por favor mi espa?ol pero estoy utilizando un programa de la traduccion para comunicarme - no se realmente una sola palabra del espa?ol mismo!)
Attachments:
matlab.llb ‏258 KB

Similar Messages

  • MATLAB and LabVIEW Communication Optimal Performance

    I have tried my own code,  searched through forums and examples to try and figure out best method to communicate between LabVIEW and MATLAB.  Most of the information I found was over a year old and I was wondering if there was a better current solution.  My goal is to work in LabVIEW to collect the data, process in MATLAB and return the results to LabVIEW.  I have encountered some difficulty in my search and before I delve even further in to one in particular, I was wondering if anybody had an optimal solution with this communication protocol or solutions to my errors encountered thus far.
    I have looked at the following methods.
    1)TCP/IP and a very good example found here: http://www.mathworks.com/matlabcentral/fileexchange/11802-matlab-tcp-ip-code-example
    When I try to adjust even the example and communicate for my own purposes I get the following errors
    Error 63 if MATLAB server not running
    Error 66 occurs if the TCP/IP connection is closed by the peer. In this case, Windows notices that no data is returned within a reasonable time, and it closes the TCP/IP connection. When LabVIEW attempts to communicate after Windows closes the connection, error 66 is the result. 
    However, the example itself works perfectly and does not get these errors
    2)Math Script Node, works but the post below states that MATLAB Node is faster.
    "computing fft of a 1024x1024 matrix ten times (attached code). Result is that Matlab node version takes 0.5s versus 1.6s for Mathscript node version."
     http://forums.ni.com/t5/LabVIEW/Why-are-mathscript-performances-much-below-matlab-s/m-p/2369760/high...
    3) MATLAB Node, which states it uses ActiveX Technology seemingly works well, but loses time for data transfer.
    4) Trying to use the ActiveX functions or if there is other Automation potential.
    5)Other solutions that I have not found that might be better suited.
    Thank you for any help or suggestions in advance. 

    Barp and Mikeporter,
    Thank you for your assistance:
    The reason I need to do the processing in matlab is as you mentioned the processing script is coming from another person who has already developed it in matlab.  I almost have to treat it as a black box.
    The TCP/IP method was interesting is that none of the errors show up when I run the example but if I try to modify it in a new VI I get the errors.
    I have attached a simple program that just has a basic butterworth low pass filter I am trying to confirm if it works in the Matlab node.  I have done other simple codes which work, and this one does not seem the implement  the appropriate filter.  The LabVIEW signal and LabVIEW filter seem to work at the default values (but not if I change sampling rate) for the Simulation of signal, Matlab signal and Matlab filter work, but the Labview signal processed in Matlab is not working...
    Ideally it would be bandpass filtered (0.1-30) at sampling rate of 256 Hz and further processed from there, but I can't even seem to get low pass to work in the matlab to labview communication.
    Any help would be greatly appreciated.  Once I have that working I will have more of an idea of the constraints of the actual processing Matlab Code I will be using.
    Thank you again.
    -cj18
    Attachments:
    labview_matlab_filter.vi ‏70 KB

  • Script Matlab In Labview

    Buongiorno a tutti,
    sono nuovo di questo forum. Sono un tirocinante presso l'università di Napoli Federico II e sto familiarizzando con l'ambiente LabView. Mi è stato assegnato il compito di eseguire uno script Matlab mediante LabView (le macchine su cui lavoro possiedono la versione 7.0 e 8.5). Se mi sapete dare qualche informazione ve ne sarei grato o anche qualche link visto che sto agli inizi.
    Saluti.
    Sorry for my english...

    Sorry, can you move this question to italian community?
    Thanks
    Sorry for my english...

  • Ejecutar m files de matlab desde labview

    Hola!
    Me gustaría saber cmo es posible ejecutar m-files de matlab desde Labview, es decir llamar desde Labview que se ejecute un m-file ya creado y poder recuperar la información resultante como puede ser un conjunto de matrices. No se si puede hacer directamente con el labview o hace falta alguna toolkit concreta.
    Muchas gracias

    Larson09
    Si tiene el paquete completo o profesional de Labview entonces tiene el script de Matlab ( lo puede encontrar en paleta de funciones>>Análisis>>Matemáticas>>Formula>>Script de Matlab.
    Para que le funcione este script debe tener instalado matlab, y dentro del script puede ejecutar directamente código de Matlab.
    Espero que esto le ayude
    Atentamente
    Belens

  • Comunicacion entre opc server y allen bradlley micrologix 1500

    necesido comunicar Ni opc server con plc micrologix 1500, debido a que el plc trabaja con red devicenet y el opc server trabaja con red ethernet se me ha echo un poco complicado realizar la comunicacion entre el servidor y el plc Una ayuda es urgente.

    Buen día:
    Observa los siguientes enlaces:
    1. OPC Y MICROLOGIX
    2. ¿Cómo Puedo Conectar un PLC Allen Bradly Micrologix 1400 con NI OPC Servers?
    El primero afirma que es posible utilizar tu dispositivo con NI OPC Server y el segundo explica paso a paso como configurarlo (procedimiento similar a pesar que el hardware es distinto).
    Espero esto ayude
    Saludos,
    Alejandro | Academic Program Engineer | National Instruments

  • Toolkit matlab avec labview

    bonjour à tous et merci d'avance ,
    je cherche un lien(ou bien une idée) pour télecharger le toolkitmatlab compatible avec labview 2011 (sinon 2009).
    l'objectif c'est que je veux transformer un code matlab vers labview.
    merci les ingénieurs du ni et tout les membres de forum.
    amicalement

    Hi khadija,
    You should be able to find the 2011 version of the mathscript-RT toolkit on ni.com/downloads. The download site has recently undergone a lot of changes and the search may not be up to speed yet. A direct link to the 2011 mathscript-RT toolkit is here: http://joule.ni.com/nidu/cds/view/p/id/2558/lang/en. 
    However, it sounds like you are using Matlab toolkits. The mathscript-RT toolkit re-compiles .m code into labview source code. However, the mathscript-RT toolkit will not work with any of the Matlab® toolkits, such as a vision processing toolkit. A list of commands the mathscript node can use is given here. 
    You also might try using the Matlab Script node, which is separate from the Mathscript-RT node, the Matlab Script node uses activex to call into the Matlab runtime engine. It should be able to utilize any toolkits that the mathscript-RT toolkit can't. However, the Matlab Script node will be slower and will require an installation of Matlab on each computer that your application runs on. 
    MATLAB® is a registered trademark of The MathWorks, Inc. Other product and company names listed are trademarks and trade names of their respective companies.
    Jesse Dennis
    Design Engineer
    Erdos Miller

  • Difference between the Matlab and LabVIEW Hann (Hanning) functions

    Hi All,
    I'm hoping someone out there can satisfy my curiosity. I have been porting over some code from Matlab to LabVIEW and came accross a difference in the two implementations of the Hann function. Essentially:
    LabVIEW has array length = n
    http://zone.ni.com/reference/en-XX/help/371361J-01​/lvanls/hanning_window/
    Matlab has array length -1 = N.
    http://www.mathworks.co.uk/help/signal/ref/hann.ht​ml
    (where n= N in the two implementations)
    As I'm not very clued up on signal processing I was hoping someone could explain why there is a difference in implementation and why array length was chosen for the LabVIEW implementation. According to wolfram the parameter a is full width at half maximum:
    http://mathworld.wolfram.com/HanningFunction.html
    http://mathworld.wolfram.com/FullWidthatHalfMaximu​m.html
    Is the difference just due to the interpretation of what this value should be?
    I've attached a modified version of the window comparison example to illustrate the diference.
    Thanks,
    Attachments:
    Window Comparison from example.vi ‏32 KB

    ^N wrote:
    LabVIEW has array length = n
    Matlab has array length -1 = N.
    Could part o the confusion be due to the fact that LabVIEW arrays start with index zero and matlab arrays start with index one?
    I'll look at your code later...
    LabVIEW Champion . Do more with less code and in less time .

  • How to implement Non linear Curve fitting (lsqcurvefit of matlab) in Labview

    Hi Labview Team,
    I am looking a way to implement "lsqcurvefit" command of matlab in Labview to do some curve fitting ; basically to  Solve nonlinear curve-fitting (data-fitting) problems in least-squares sense, at present I couldn't find a better way to implement it. Can you please give me some suggestion on this to how to implement this " curve-fitting: on labview.
    Thanks,
    Ankit Gupta

    You did not say you have the mathscript module. Do you? In any case, labview has a rich set of native nonlinear fitting tools. This seems like a better option.
    LabVIEW Champion . Do more with less code and in less time .

  • Connecting JADE &MATLAB with LabVIEW

    I wish to Connect JADE and MATLAB with LabVIEW,. Please provide the relevant documents.  

    For matlab, there is the matlab script node.
    For JADE, you need to be more specific, because there are several programming tools with that name (e.g. here or here).
    You need also define what you mean by "connect". In the most general case you would simply build a dll in the other language and then call it using the call library function node.
    What are you actually trying to do?
    LabVIEW Champion . Do more with less code and in less time .

  • Comunicacion paralela entre PIC18F452 y labview 7.1

    hola buenas.... tengo problemas con la comunicacion paralela entre un PIC18F452 y labview7.1 me gustaria saber si alguien tiene una guia de un protocolo paralelo que sea bastante efectivo para la comunicacion paralela que garantice que el software en labview adquiera una trama de 76 byte sin perdida de datos lo mas rapido que se pueda en el modo spp del puerto....muchas gracias....

    la nena buen día!
    Para hacer comunicación con tu PIC18F452 y LabVIEW 7.1 por medio del puerto paralelo es necesario que uses VISA y para hacer un ejemplo de esta comunicación paralela (que ojo, no es la comunicación como tal para PIC) para que la vayas probando y de acuerdo a las especificaciones de tu PIC puedas ir programando la comunicación con tu PIC, es un poco tardado ya que lo tienes que hacer casi casi por las piedritas, pero con este ejemplo te das una idea de la comunicación paralela
    Te vas a Help>>Find Examples...>>Search>>Parallel y te saldrá el ejemplo de Parallel Port Read and Write Loop
    Espero que con esto te de una idea más amplia de lo que quieres hacer!
    Te mando un saludo y gracias por usar los Foros de National Instruments
    NorSa
    NI Applications Engineer Latin America
    Para Soporte entra aquí

  • How do I perform the interp3 function in matlab in LabVIEW

    I have the following data attached (DTTT.txt).  The four columns are as follows: Column 1, 2 and 3 are (fixed) measurement points and the fourth column is the resulting measurement data using these 3 points. What I need to do is find the value that should be in column 4 with the values in columns 1, 2 and 3 of (i.e. 0, 100 and 20).  Is there any base function in LabVIEW for performing this interpolation? I would be using interp3 in matlab for this, but we only want to use strict LabVIEW code in this project (i.e. no external interface to matlab allowed). Thanks for any help I can get...
    Attachments:
    DTTT.txt ‏8 KB

    There are quite a few interpolation functions in LabVIEW.
    Go to
    Function Palette
    then
    Mathematics Palette
    then
    Interp & Etrap Palette
    and choose the VI that will work from there.
    CLD | CTD
    LabVIEW 2011 SP1 | TestStand 4.5

  • Using a "fopen" call in a DLL made with MatLab for Labview

    Dear Sirs:
    My name is Juan Crespo and I write you from Spain. I answer if you could help me with a Labview problem. This is the problem.
    I want to write a DLL for being used in labview, and i want to use matlab for write this DLL. I have been searching in the web and reading the NI "using external code in labview" manual in order to know what I must do.
    I know that if I want to use MatLab, I must build a "wrapper function" to avoid the different data type between MatLab and C. I have found on the web -Thanks to Alberto Sanchez- one example about how could a DLL could be written.
    But it exist one diference: I want to read a plain text file that has the input data. so I must read the file, store
    the data in an array and then pass this array to the "interface functions" but in a simple example this dont works
    My question is ¿How could I open a text file in order to use it as input data in a DLL in Matlab?
    Attached to this message is the code I use as "wrapper function". when I compile it there is no apparent errors, but when I try to use the DLL in a VI, an error appears.
    If I change this code and the input is made "manually" (using the VI) there are no errors. So I think that problem is in the way that Labview consider "fopen" function when I build a DLL. The "num.txt" file, where the data input are, is on the same directory that dll file and VI file.
    I hope that you can help me with this problem.
    Thank you very much in advance and please sorry for my bad english
    Best Regards
    Juan Crespo
    Attachments:
    foo_wrapper.c ‏2 KB

    Dear Juan Crespo,
    normally I don't answer questions concerning Matlab because I have no experience with it. But your question was waiting a long time and had to do something with DLL I decided to look at it.
    Your C code has a serious error. You are declaring a variabale named "in1" as "double *". You do not set this pointer to point to a variable. Then you use this uninitialized pointer in the fscanf function to read in from the file. The value is written somewhere in the address space at a place where "in1" is pointing randomly. This will cause an error or crash.
    Declare "in1" as "double" like you have declared "out". You must change some other places where you have used "in1".
    Waldemar writing from Germany
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • Calling Matlab from Labview returns a 1047 error - what am I doing wrong

    above

    Does your script work fine in MATLAB? Do you run a VI or an .exe?
    MATLAB must be running, otherwise LabVIEW will be unable to access the MATLAB server. This will cause the 1047 error. Manually start MATLAB, and your program should run without the error.
    The following KnowledgeBase may also be useful in troubleshooting this issue
    LabVIEW 6.x and Earlier Does Not Interface Properly with MATLAB 6.1 or MATLAB 6.5
    Zvezdana S.
    National Instruments

  • Easiest way to call MATLAB from Labview

    I have a bunch of MATLAB scripts I've developed over the years. I'd
    like to have Labview collect data and pass it off to my MATLAB scripts
    for plotting and analysis as it is streaming in. What is the easiest
    way for me to do this?
    Thanks for your help,
    Matthew Little

    [email protected] (Matthew Little) wrote in message news:<[email protected]>...
    > I have a bunch of MATLAB scripts I've developed over the years. I'd
    > like to have Labview collect data and pass it off to my MATLAB scripts
    > for plotting and analysis as it is streaming in. What is the easiest
    > way for me to do this?
    >
    > Thanks for your help,
    > Matthew Little
    Matthew:
    Have you tried the Matlab script container in the Mathematics->Formula
    function palette? This node allows you to put your scripts into the
    Labview diagram. I haven't tried it myself, but it should work. Good
    luck.
    sm

  • Matlab *.mat / LabView *.mlv

    Comparison:
    test code in Matlab: 
    AA = [1 2 3 4 5];
    save AA-matlab.mat AA; 
    and test code in LabView MathScript Node
    AA = [1 2 3 4 5];
    save 'AA-LV-matlab.mat' AA;
    Both scripts make a file, but different files.
    File made using LabView is NOT readable in Matlab! Save in LabView is not same as save in Matlab. Why this incompatibility? How to make compatible files?
    Check Spelling in this editor gives suggestion LabView > Labile.  True?

    Danigno wrote:
    VesaU,
    actually what I think he tried to say is that you can still use MatLab, but save your data from LabVIEW in txt files (which can be read by MatLab later). Then you won't need to use the MathScript, just regular LabVIEW coding...
    Yup, that was exactly what I was saying. Thanks for the clarification. 
    VesaU wrote:
    Just saving a vector to a .mat file? Yes this is
    my target. Why? Let's assume that we have raw data files from two
    NI6259. We may get 2 million samples/second. A short test gives me
    100MB or more data. Saving data to text file for exporting to
    Matlab-analysis is not very good idea. Why Matlab? Matlab is widely
    used for mathematical analysis. We use Matlab and our partners use it.
    I tried to say that TXT file method is not a
    method for today or tomorrow. I have used that 1990's. It is almost
    same as pen and paper. Something better I want for tomorrow.
    TXT file is OK, if it is used once in a year or month. For daily work it is not a solution.
    Solutions for tomorrow may be:
    1. Matlab reading directly LabView data files.
    2. Converting
    LabView data files (TDM/TDX files) to MAT files. Mat file with all
    relevant data from TDM/TDX file into a Matlab Struct.
    You're starting to be a little defensive here for no reason. You had provided NO information as to what you were saving, or how much data you were saving, and to belittle a suggestion that was based on virtually no facts is like biting the hand that tries to feed you. Not a very good way to make friends.
    As pointed out by Danigno, I wasn't telling you NOT to use Matlab, but rather to change how you were saving the file since the data was apparently (though I'm wasn't sure since you provided no information) being saved in LabVIEW. Obviously, saving data as a text file for that amount of data is not warranted. If you were still going to collect the data in LabVIEW then a binary file would be something that can be used by both LabVIEW and Matlab, though you have to watch the endianness since LabVIEW defaults to big endian, and I believe Matlab defaults to little endian. 
    2. Change from NIDAQ to NIDAQmx was not a success
    story. Now we have four times bigger datafiles in Matlab
    because NIDAQmx uses longer numerical expression than earlier. Old
    NIDAQ we use with PCI and PCMCIA cards but new USB hardware forces us
    to use NIDAQmx.
    I don't understand what you mean by this. What functions were you using, and how were you saving the data? 
    I have asked help from MathWorks and National
    Instruments to solve the problem. Both companies say that the fault is
    on the other side. I think that both companies should face the truth.
    It should not be end user's problem. It may happen that end user find a
    third software + hardware which is working. I think that it is easier
    to change DAQ than analysis package.
    I'm not here to defend either NI or Mathworks, but I think that's debatable.

Maybe you are looking for

  • How to change font size in Notification center?

    Good day I purchased new monitor with BIG resolution an dfount what font in notification message from Notification Center stay very small I try to find place where possible change font siza but don't found anything Please help

  • Need to change Tax code in po but GR and IR also completed

    Hi Gurus,             I have one issue in the po, the line item "xxxxxxx" in the PO It shall be 36 instead of 39.but it is GR and IR also completed,now we need to change the Tax code,for this we need to cancel IR and GR or without cancel GR, IR also

  • How to create a web bulk upload in SAP BW

    Hi there, does anyboady has an idea which is the best way to create a bulk upload via web interface where the user can select a csv file and upload data by himself? Thanks in advance. regards, ralph

  • Cannot find hidden files on Windows 8.1 after refresh

    I stupidly did a Refresh on Windows 8.1 when having trouble with Clean Up disk not working. I know that i need to find the hidden files from other questions on here, and have checked the box for this, but how do i actually access these files, to get

  • Have windows 7 and Elements 8 email errors

    I am getting an error msg   Create an association in the default program. I have tried Dell  Charter internet service Adobe and still have msg when I try to send mail any help or any updates.