AutomationOpen and Matlab

Hi all

I have to call Matlab of Labview by using ActiveX

'Matlab nodal point Script' (including using activeX) works, but I need for more control

via the connection, so I have to use the ActiveX screw directly.

Problem: I still get the same error using AutomationOpen vi:

error-2147221164: class not registered in Matlab ActiveX Example.vi

I tried to cancel/save the matlab Automation server (using /UnRegServer and/regserver).

As expected, the matlab Server (MLApp.DIMLapp) actually disappear / reappear from the dialog box "Select activeX" class Labview

But in the end, I still have the same error-2147221164

The strange thing is that the matlab script node works, which means that the link of the ActiveX is ok.

But AutomationOpen still fail...

Note: I use Labview 8.5.1 and Matlab 7.6.0.324 (R2008a)

AutomationOpen now works with Matlab!

But I do not know why...

It may be related to a test I did in Visual basic:

Dim Matlab MLApp.MLApp
Dim Result As String
MATLAB = new MLApp.MLApp
Result = Matlab.Execute ("myVariable = 0")

This test worked, and maybe he has somehow "fix" Configuring ActiveX for MLApp...

Tags: NI Software

Similar Questions

  • New MacBook (12 ", towards 2015/2016) and MATLAB

    Hey everybody,

    does anyone have experience with the new MacBook (2015/2016) and MATLAB?

    I am currently using the MacBook Pro now after 6 years I want to something new, but I'm quite bad if I have to buy Air or the new one (1.3 GHz dual-core Intel Core m7, Turbo Boost up to 3.1 GHz, 8 GB memory SDRAM 1866 MHz LPDDR3, 512 GB PCIe-based embedded flash storage Intel HD Graphics 515).

    I am a student of neuroscience so I use matlab x times per week as well as spss, otherwise its all the usual stuff (office, senseless surfing the internet, average of much netflix etc.). I will still use my Pro, with a new hard drive, but carrying 2kg of Mac around campus is horrible.

    I regret the new 12 '' MacBook?

    Thank you!

    See you soon

    Magda

    I use the new Macbook and Igor Pro that is similar in the CPU usage and data processing capabilities. I also have a 15 inch MB Pro, which is a pain to lug around... you will be happy with the new Macbook and don't suffer from the "slower" processor if only using MATLAB.

    One thing to keep in mind is that there are only two hearts, then if you don't have any parallel treatment (whether through Matlab or other calculations) they will be slower. If you do not I recommend the Macbook.

  • Communication between PCI6251, Labview and Matlab

    Hello

    I work with a Council of PCI6251, driven by an executable labview.

    I get measurements from several sensors (pressure, temperature, etc.) which are read by the executable of labview.

    I would like to know if it is possible to send these Matlab measurements at the same time.

    I mean: is the PCI6251 card can send data to Labview and Matlab at the same time of acquisition?

    Or I need to install a second PCI card for that?

    (Labview and Matlab are installed on the same PC now)

    Hi Nico974,

    If you want to transfer data from LabVIEW in MATLAB, you have to use ActiveX connection between 2 software or to add the node to MATLAB in you program LabVIEW (see http://digital.ni.com/public.nsf/allkb/2F8ED0F588E06BE1862565A90066E9BA?OpenDocument)

    Another solution is to use the of MathWorks Data Acquisition Toolbox, because the card PCI-6251 is supported by this Toolbox (http://www.mathworks.fr/products/daq/supportedio14005.html)

    But here you have a LV executable so if you can't change it you will not be able to use your exe and a Matlab Script at the same time, if you need another PCI card.

    Sincerely

  • Myrio and Matlab script

    Hello

    I control my physical robot with labview and my rio. I also have a matlab (m.file) code that uses it the Robotics Toolbox in Matlab. I would like to add this m.file to my labview program. Can I create a matlab script in the program labview and matlab code inside and deploy code to myrio? It will work in this case?

    AFAIK, the nodes in script call script software MATLAB server to run scripts written in MATLAB language syntax. But I don't know about adding my rio to the loop.

    Thanks for the reply.

    I also later get to know that this can be done by establishing communication between Matlab and myrio wifi.

  • The interface of LabVIEW and matlab

    Hello, I want to interface LabVIEW with MATLAB using the TCP/IP protocol for data transfer. Can anyone, please give me an instruction step by step how to do this? If not, can point out you where I can get them? Thank you.

    Hi Gilles,.

    TCP/IP is a generic protocol then you should easily be able to build enough interfaces TCP/IP for your LabVIEW and Matlab code and data transfer on ASCII or variants, etc., depending on what kind of data you are trying to transfer. I'm not too familiar with Matlab, but on the end of LabVIEW, there are a few examples of server and client very good TCP/IP provided with LabVIEW.

    Another option you may want to, and the reason why I answer it is that I did recently a project through which we took some legacy code MATLAB which we wanted to transpose into LabVIEW, so that we can automate then completely a test system that we use TestStand. A big part of it, we have been able to derive equivalent LabVIEW, but some functions where LabVIEW does not have an equivalent appropriate, or where it was simply more effective, simply copy us and paste Matlab code in any event in the first instance MathScript nodes (not dependant on Matlab) or Matlab script nodes (which will return if all goes well at a later date to transpose in full) LabVIEW for that is no longer dependent on a Matlab license).

    In both cases, the facility to do this was very impressive, and we were able to wrap huge amounts of code Matlab LabVIEW with very few problems. As an idea, have you considered your functionality of Matlab of packaging in this way and keeping all the customer TCP/IP and comms server in LabVIEW?

    Note: If you have not found it pick up the palette "Matlab Script.

    Good luck

    David

  • Difference between FFT LabVIEW and Matlab FFT

    Anyone know why there is a lag in the absolute levels of the results of the function in LabVIEW and Matlab FFT?

    See the VI attached for an example of my code to LV.

    Also attached is the plot generated in Matlab, which seems to be compensated by ~ 37dB.

    This was generated by using the command "plot (10 * log10 (abs (fft (x))))", where x is the same as in the VI input array.

    Thank you very much

    Dan

    I see you are using the VI of spectrum FFT which returns a unique range of face.  To convert a transformation both sides (IE FFT) in one spectrum sided with RMS units there is a standardization of sqrt (2) / n, where N is the number of points in x (t).  You can prémultiplier your x (t) by N/sqrt (2) and get the same results as Matlab.  Or, you can use the FFT.vi so you compare transform to transform instead of spectrum to transform.

  • Trouble installing programs, 18 Maple and Matlab on my Area2

    I tried to install 18 Maple and Matlab on my Area2, but were unsuccessful. It would also not to load QuickTime, it keeps telling me that the application cannot function and cannot be on the app store. Help, please.

    A Surface RT can install the MS Apps Store apps/programs

    You need a Surface Pro with the o/s of full win8 to install external programs

  • Localhost UDP connection between FCR and Matlab

    Hi all

    I have a question about the connection between Matlab and FCR UDP. My idea is to Exchange data between Matlab and Labview on the same computer.

    So I found the 'UDP Simple' of the FCR 2.0 sample project where periodically a datasample is generated randomly and sent to the remoteport 61557 local host. In the project a 'fractional number of string for transmission' is used for the transmission of data. The receiver of the sample project reads from the same port to receive the datasample.

    Now, I'm interested to read this simple stream from Matlab (just at first), however, it does not work and I'm not sure why. What I do in Matlab is the following (code Matlab)

    delete variables;
    u = udp ('127.0.0.1', 61557); % Of installation UDP Object
    fopen (u); open reading port %
    A = fread (u, 1);  % read an element
    fclose (u);

    With this code, however, I get a timeout by saying: "' WARNING: unsuccessful reading: the amount of data specified has not been returned within the time limit." "

    I'm not sure why this happens, maybe you could help me out here? I guess that the formet serving to VCF is not the same as in Matlab? Maybe the Terminators are not the same?

    See you soon,.

    Steve0

    Hey

    So, regarding the problem actually, I found the solution today. It was not the firewall, but a simple configuration in Matlab seting the UDP port. So the side of Matlab, to change the definition of udp object according to

    u = udp ('127.0.0.1', 'Thelocalport', 61557);

    If you have

    u = udp ('127.0.0.1', 'Thelocalport', 61557);
    fopen (u);

    A = fread (u)

    fclose (u);
    Delete (u);

    Who does the trick and you can read from the port. Then of course you say Matlab that you read from the "LocalPort" x, which I wasn't aware of.

    On the transmitter side, you simply:

    u = udp ('127.0.0.1', 61557);

    fopen (u);

    fwrite (u, '1');

    fclose (u);
    Delete (u);

    Here, you set just the port of transmiting.

    About the format of the data: I used the simple UDP protocol streaming Comms project where a random number is generated as a double, transformed into a string (ASCII values) and transmitted. At the level of the receiver, you get as much the UDP packet with the ASCII values that you must turn if you want to find the number.

    I hope this helps anyone having the same problem.

    See you soon

  • Eval commands and Matlab num2str

    All,

    I searched all the 12 pages of this forum and this solution is not found.  If this is a repeat, I am sincerely sorry.

    I try to use the MathScript matlab Module "eval" and 'num2str' orders.  For example:

    II = 01:10;
    eval (['w' num2str (ii) ' = ii ;']);])
    end

    The problem is that 1) it says that it will slow down the program (I get only) and 2) it does not seem to run the script.  I'm looking for some 'w' matrices/vectors/scalars as output.

    In addition, as part of the script that I have other variables that I would use as output.  When I try to add them, labview stipulates that: "you must set this variable in the script and then set its data type. I get the output variable: right click--> Add out--> click variable.  Even variables that are not used in the script I want to pass give the same error.

    For example:

    input variables x = y z

    II = 1:x

    eval (['y' num2str (ii) ' = ii ;']);])

    end

    output (by above method) variables will show all three, but even with just passing through "z" I get this same error.

    This error does not appear when I do basic math in the node and pass the unused variables.

    Ideas, suggestions, solutions would be appreciated.  If necessary I can post some of my code; However, I gave the relevant information above.

    Best,

    Corbin Walker


  • 2012 of LabVIEW and MATLAB use

    Hello.

    I am using the Matlab data plugin (http://zone.ni.com/devzone/cda/epd/p/id/4178) with LabVIEW 2012. I installed the plugin and the installer says that the installation was successful. However, the plugin does not appear in the list of plugins in LabVIEW. I rebooted the system, but that did not help.

    Data plugins are incompatible with LabVIEW 2012? I also tried to add the plugin using the vi of the data plugin manage the palette. Although the vi does not return an error, the plugin still isn't available. Decommissioning of 2010 is not an option for me, because I need some of the new features.

    Thanks for your help.

    MATLAB does support 32-bit LabVIEW.

  • 2012 LabVIEW and Matlab script server error

    I just installed LV 2012 and upgrade the code that runs Matlab scripts. Now when I run it, it gives me an error of server script (1047). I'm using Matlab 2007. Someone at - it the same problem? Anyone know of a solution?

    I guess it has to do with the server script does not properly. But I can't exactly run the same code in LV 2011 without problem while LV 2012 gives me an error. Same computer, etc.

    Thanks in advance for any help you might be able to provide.

    Thank you "transfererror", this helped me identify workaround.

    For those who struggle with this, that's what I learned:

    1. This affects only the variables that are passed in a sub - VI in the connector pane (that is, local variables are not connected to the connector pane apparently do not have this problem).

    2. it seems to only affect as vectors 1 d or 2D paintings. The reason why the screws inserted by Sev_K example applies to this problem is that the types of data that are not arrays do not have this problem.

    3. Thus, to solve my problem, I inserted just an addition of 0 to all vectors and matrices that have been passed in the Sub - VI. I guess what it doesn't copy the variable in a local buffer and it is perhaps the reason why he fix it?

    In any case, workaround seems to work. I don't know what it costs in terms of speed or memory, but I do not have much about it for my application (some real-time applications that use Matlab scripts eventually consider it).

    Perhaps this information can help identify and fix this bug.

    Unique

  • Simulation Interface toolkit and MATLAB R2013a

    Hello

    What LabVIEW Simulation Interface Toolkit compatible with MATLAB R2013a?

    Thank you

    Hi Wade,.

    Here is the readme for 2012 of LabVIEW Simulation Interface Toolkit: http://digital.ni.com/public.nsf/allkb/049295038FF0EE2A86257A06006B2DAD

    We do not guarantee that is works with the software MATLAB of The MathWorks, Inc.® 2013 (and I wouldn't recommend it). As stated in the readme file, the last being fully supported is 2011.

    (MATLAB® is a registered trademark of The MathWorks, Inc.).

  • How to sit interface with matlab 2010A and labview 2010

    I use tools of simulation interface 5.0 with matlab 2010A and labview 2010, I want to take my cue from matlab, labview but signal transfer, I am facing a problem. I want to know is there any compatibility issue in sit 5.0 or I do something wrong?
    photos of errors are attached.

    natasftw wrote:

    http://digital.NI.com/public.nsf/allkb/02F5FA55FC28BDE1862578A30071F975
    While it is for 2011, I doubt that they decided to remove 64-bit compatibility as they went forward as 64-bit has become more rather than less demand.  In this document,notes LabVIEW Simulation Interface Toolkit does not support 64 bit versions of MATLAB application software."

    The extent of the compatiblitly for 32 - bit, I'd take a peek at: http://digital.ni.com/public.nsf/allkb/D174674A91E5536286257428005C2426

    The OP's question was SIT support 64 - bit version of LabVIEW and 64-bit version of the MATLAB/Simulink itself, not the operating system software.

    Document in your second link is on a completely different topic to have API for LabVIEW and MATLAB/Simulink/RTW (well, mostly Simulink & RTW). Here is the relevant link for the 32-bit compatibility: http://digital.ni.com/public.nsf/allkb/049295038FF0EE2A86257A06006B2DAD is no SIT 64-bit.

    Other underlying issues is that Pharlap does not have a 64-bit version. Finally, simulations are better performed on some RTOS (embedded PXI) for a deterministic execution rather than PC operating systems.

    -BTC

  • Incompatible Mabview and responses of Matlab

    Hi all

    I need to determine a transfer function of which augurs well for response:

    _______________________ 17dB
    /
    /
    /
    /
    /
    __________________________________/ -14dB
    1.5 kHz 20 kHz

     

    I tried to do it with Labview and matlab. However, the same transfer function have the same bode diagram on matlab Ant labview:

    MATLAB code:

    sys = tf ([0.0244 1.17E - 5 2.64E - 9], [0.056 1.26e - 5 9.8E - 10]) ^ 2

    Bode (sys);

  • PCI-GPIB and controller movement legacy Newport Orion-CM - timeout in MAX but not MATLAB

    I kinda a weird GPIB problem which seems to be related to the legacy quirks of implementation of GPIB.  The system I use is an Orion of Newport-CM, which has a controller of electrostrictifs actuator in him as a monitor of power on separate GPIB addresses, but a physical port.  I have it connected via a<= 2m="" cable="" to="" an="" ni="" pci-gpib="" board. ="" i've="" tried="" both="" the="" 2.6="" and="" 2.2="" ni-488.2="" drivers="" and="" both="" act="" the="">

    I found that when I try to query the device through MAX, I can see a SPY OR that the first FindLstn mark 2 units, but expires (probably to try a * IDN? command, because it signals no response).  After that, if I try other commands via MAX or MATLAB, all the GPIB commands time out, so I have to power cycle the Newport before being receptive again.  I tried every permutation of the GPIB driver located in MAX without result - always the same behavior settings.

    Curiously, however, when I use the device only in MATLAB (with the instrument control toolbox), I can have some success, but with delays every now and then are not paralyze the MAX in the same way, it was.  I am able to open the device with:

    mcobj = gpib ('nor', 0, 1);

    fopen (mcobj);

    and query with:

    fprintf(mcobj,'*IDN?');

    data = fscanf (mcobj);

    and get the good * IDN? response.

    In addition, I can do writing and reads the device (with intermittent downtime... I found I need to leave at least 0.3 seconds between commands, which leads to a slow operation).

    It left me speechless.  Of course, it appears the interface GPIB works, maybe slowly, but if I'm not mistaken, the same driver should be usage of communication for MAX and MATLAB, why so MAX time so that I am able to have the operation in MATLAB?  Are there some low level which may be different that I cannot change in MAX or GPIB configuration, but is defined by MATLAB?

    Any thoughts appreciated.  Newport is as usual MOM on obsolete parts, and their job is not much help outside retailer orders GPIB (Nothing on the specifications of the bus).

    Thank you

    Scott

    Thanks for the tips.  It seems that the old Newport is just really, really slow (must be material and mid-1990 s), so he needs a good break between her send GPIB commands.  I installed the 1.7 legacy drivers, and those at least have correctly the * IDN? the device response.  Gpib MATLAB interface is quite simple you can give sufficient breaks between commands to send to the Newport, so in it, I am able to control the time between orders.

    It seems that it is just a matter of a slow device.  I know not what look like the internal FindLstn characteristics and, therefore, why the new version of MAX expires while the old ones do not, but for really old hardware that there could be GPIB read/write in the new pilot who are too fast to actually really old equipment sufficient time to respond.  Thanks again for the input.

Maybe you are looking for

  • For vista x 64 fingerprint reader?

    Are there no software available yet for the fingerprint reader on the W500 to Vista x 64? If Yes, where?

  • How to delete the EDS sheet technique list?

    Because I need one and I have about 100 to the choice.

  • custom device PLC Siemens

    Hello I do test with NI Veristand HIL. My hardware is a cRIO 9075 siemens AND 200 s PLC. I found an address ethernet/IP add it to veristand:http://zone.ni.com/devzone/cda/epd/p/id/6337 However, if I understand correctly, it will not work with siemens

  • More than 8,000 critical errors on the laptop. What should I do about these?

    Original title: critical errors I have more than 8,000 critical errors on my laptop, which, on the contrary, should I do about these?

  • Help! Data recovery!

    Hi all My laptop was working fine when suddenly it became very slow access to the data for a couple of days. The next Win7 has not loaded up. Now I can't even the Dell BIOS screen upwards and the course when I turn it on. Just a black screen (is powe