MATLAB OR 5112

Hello;
 
I decided to write a mex file to use NI 5112 with Matlab. I wrote my mex file but I couldn't run sort. When I was running my mex code is an error in the matlab command window, as the background.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
Microsoft (R) incremental Version of the linker 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
 
C:\DOCUME~1\ADMINI~1\Locals~1\Temp\mex_1B92711B-AD13-4568-C29A-44BC1FF98570\GettingStarted.obj
Creating object C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\mex_1B92711B-AD13-4568-C29A-44BC1FF98570\templib.exp and C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\mex_1B92711B-AD13-4568-C29A-44BC1FF98570\templib.x Library
GettingStarted.obj: error LNK2001: symbol _niScope_close@4 unresolved external
GettingStarted.obj: error LNK2001: symbol _niScope_errorHandler@16 unresolved external
GettingStarted.obj: error LNK2001: symbol _niScope_Read@28 unresolved external
GettingStarted.obj: error LNK2001: symbol _niScope_SampleRate@8 unresolved external
GettingStarted.obj: error LNK2001: symbol _niScope_ActualRecordLength@8 unresolved external
GettingStarted.obj: error LNK2001: symbol _niScope_AutoSetup@4 unresolved external
GettingStarted.obj: error LNK2001: symbol _niScope_init@16 unresolved external
GettingStarted.mexw32: fatal error LNK1120: 7 unresolved external
 
C:\MATLAB\BIN\MEX.pl: Error: 'GettingStarted.mexw32' link has failed.
 
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
 
Something is wrong but what... I couldn't understant... The blue parts of the error messages (like niScope_init@16 ) are the routines in C/C++ (function) of the 5112 code OR... (maybe MATLAB cannot bind NI5112 *.dll files. It is possible...)
 
Could you help me on this problem.  THANKS FOR EVERYTHING...

Murat,

Please post on the Forums of NOR. The reason why you get these errors when you try to run your program, it's that there's not an API for scopes OR with Matlab®. You have two options. You can use the C API to write C code and interface with the 5112, you could program in LabVIEW, I also found a forum post where a couple of people used the "knot of Matlab®" to make calls to Matlab® of LabVIEW. This forum can be found here. I hope this helps.

Tags: NI Hardware

Similar Questions

  • No version of Matlab works on MacOS Sierra

    The MathWorks has published a statement recommends do not update until this problem is fixed. Why we still have the same problem with Mac OS, updates every year? MATLAB is a software more used for engineering! (<-this is a very important field of knowledge.) I don't want to even look upward to the other programs that I need! Now, we will all wait to update until this problem is fixed.

    framework for an operating system may change to reflect the changes made to the features necessary for the developers of the operating system to enable new features. General rule, Apple makes their software available to other developers to make changes to allow their software to work. It's their responsibility if they would like to do, not apples.

  • Do not open attachments MATLAB in TextEdit

    I understand how to set type on a Mac applications. However, there is a problem.

    When I receive an email with a ".m" (MATLAB) file, it should open in TextEdit (on a Mac) because this is the app that I put on my machine. I also put types strangers and plain text to open with TextEdit. But Thunderbird opens a copy of the message in another window and includes the ".m" as an attachment file. He seems unaware that the default is set to TextEdit.

    If you open Preferences(or AppMenu/Options/Options)/room detached/Incoming, there's an entry for ".m" content type files for this? If so, delete it by clicking on the drop-down Action, OK, restart TB, double click on (open) a ".m" attachment and set up the application by default for files ".m"; If TextEdit does not appear, click on the dropdown menu 'Open with', other... and locate the TextEdit program.

    On my Windows 7 system, the default text editor is already available as a default program to open attachments ".m", and the attachment is "inline" displayed in plain text.

  • 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.

  • 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

  • Using a neural network with box Toolbox MATLAB in LabView?

    I would like to know how to train a neural network in Matlab and use it in Labview? I know I should be using the MathScript, but as I do once the network formed in matlab is a dull file?

    Hi GringoButzlaff1,

    Well, it's not all MATLAB code/script that can run in LabVIEW using MathScript.

    If there is a function of IP (intellectual property) in the code, that is, any Toolbox MATLAB functions, you won't be able to execute it using the MathScript.

    In fact, you must call the MATLAB script node in your code. This node calls the script software MATLAB server to run scripts written in MATLAB language syntax and are only available for windows.

    Try encoding using the MATLAB script node and tell me if it worked for you.

    Best regards.

  • How to access the counters in cDAQ9174 / NI9403 with C / Matlab

    Hello

    I read that the cDAQ9174 has four available counters. However, they need to be interfaced via another card and they are now directly available to the user. How do I with e/s digital NI9403 card? How could I do with LabVIEW but with C/Matlab?

    Thank you

    Jan

    Hello, Ulysses,.

    normally all modules with the DIO 8 inputs or less.

    Connections of signals C series for counters

  • The value of the seed of the generator of random numbers in Matlab node

    Hi all

    I need to use random variables inside a Matlab Labview Commsuite node. I generate with the randn() function. Is it possible to put the seed of the random number generator such as the random numbers are reproducible?

    Hi Steve,.

    You can use randn ('seed', seeds) to initialize the random number generator. The seed must be a positive integer value. For example, randn ('seed', 3). In addition, this seed is global within the entire application. This means that if the randn() function is called MathScript multi-node that could run in parallel, random results are not guaranteed to be the same after you change any part of your code. But you should always get the same results for repeated passages of the same code.

  • 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


  • MATLAB script node error: 1046

    Hello world

    I now use Labview for data acquisition and want to use MATLAB
    function of node script to do the work of image processing.

    I have some problems get MATLAB script to function properly. The
    It is:

    Whenever I tried to run the program, Labview gave me the following
    error:

    "Error 1046: Labview does not initialize the script server, make sure that the server software is.
    installed. »

    However, MATLAB is installed in the PC. I think that the reason of
    This error is that I'm using a PC based campus University. I got into this PC MATLAB is a network
    versioned. (i.e.
    installed on the network server, but not in the local hard disk).

    Is that what I can do to work around this error?

    Kind regards
    Kent

    Hi hykwei,

    Unfortunately, it is not possible to obtain the MATLAB Script nodes to work
    LabVIEW under your current network configuration. So that the
    Node MATLAB Script to work properly, it takes that MATLAB is
    installed on the same machine as LabVIEW. This means that you will need
    either install MATLAB on the local computer on which you apply
    LabVIEW or you need install and use LabVIEW in the same
    Server computer where MATLAB is installed. Function of MATLAB
    feature, you may be able to make some sort of minimum installation on the
    local machine that adds MATLAB to your registry and program files list,
    but who sends you right to the copy of MATLAB on the network.
    However, I am not aware if it is still an option or how you could go
    on the implementation of this scheme, so if you are interested, I would contact with
    MATLAB for more on this topic.

    Kind regards

  • Import MATLAB generated the file ascii in the Analog Waveform Editor

    Hi all

    I tried to create signals by the Analog Waveform Editor. I have some Waveform generated from MATLAB and recorded as ASCII files, following the instructions on this Web page OR, but it did not work properly. For example, if I produce a column to fill with 0.5 and import the file into the analog signal generator, all I get is a huge series of random number. I missed a few steps in the import of the waveform?

    Thank you!!

    Just for your reference, I could almost in half the size of your file just by saving as .hws. Also to answer your last point, you may have issues opening / importing your .txt file because it may have been opened in another program at the same time. Make sure that you have closed it in Notepad or Excel or other programs which may still be locking on the reference.

    Kind regards

    Jason L.

  • USB-5133, hws file matlab

    Hi all

    I use USB-5133 to measure voltages of both channels simultaneously. For this, I use the NO-SCOPE. The scope record measured as a DJ-file data. I need these files in Matlab, but I can't open them. What would be the easiest way to export and to open these data in Matlab?

    Any help is greatly appreciated!

    Joonas

    I've never used Matlab, this will probably not be able to help much.  However, NEITHER-HWS uses HDF5 1.4.4 version which was released around 2002 or 2003.  The current version of HDF5 is 1.8.5.  I think remember me some problems of compatibility with 1.4.4 but it has been a long time and I don't remember the details.  Hdf5 recorded the version of the writer in the file to allow compatibility downstream, and the HDFView doesn't seem to have a problem with the file (I was able to trace the track without any problem in the Viewer).  You may need to define a compatibility option in your read file.  See your documentation.

    Data, stored as an array of I8s, are one of the two places (there is only one copy of data, but it is related to two places):

    wfm_group0 / vectors / vector0 / data

    wfm_group0 / traces / trace0 / axis / data_vector / data

    The coefficients of the scale for the data are stored in

    wfm_group0 / traces / trace0 / axis / scale_coef

    It is an array of point numbers floating 64-bit with shift first, followed by the scale factor (0,1,...).

    Timing information in the attributes of the x axis:

    absolute timestamp - wfm_group0 / traces / trace0 / axis / ref_time

    first point against the benchmark of timestamp - wfm_group0 / traces / trace0 / x axis / start

    vesting period - wfm_group0 / traces / trace0 / x axis / increment

    Good luck.  My apologies for not having more help.

  • Choose from several versions of Matlab

    Is currently working with several different versions of Matlab on my workstation and have not been able to find a way to choose the version that opens when I run a Matlab Script.  It is always default to the same version.  Haven't seen an existing thread that addresses this issue.  Any ideas how to point the script server to a specific version of Matlab?    Thank you.

    GSinMN

    Hello GSinMN,

    LabVIEW determines which version of the Inc. MATLAB® to run by searching the registry for the class ID of MATLAB® from The Mathworks and calls the ActiveX object.

    Knowledge base article How do LabVIEW determine what Version of The MathWorks, Inc. MATLAB® to use? describes how you can modify this registry entry to change the version of MATLAB® script calls into.

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

    David has

  • How to run Matlab code in labview for Binay coded on a file.

    Dear Sir/Madam,

    I saw a binary coded and Matlab code too, but I'm not able to open this file, so I want to open and run this file under the Matlab code. This image is what I want to do and also attached here file and matlab entry code.

    Hello

    Your script reads the data from the .dat file and gives a 3D Board. Unfortunately, MathScript currently can not handle 3D Board.

    In addition, you can use the following code to read the data in LabVIEW.

  • MATLAB R2007a to Mathscript

    Hello

    I wrote the MATLAB code to produce a square at a certain frequency to 0.01 seconds. The code performs a loop then back to produce a similar squares but at a different frequency and it then concatenates up to the end of the first square. There are 100 these iterations as she founded a square of frequency change that runs for 1 second (or 0.01 * 100). I want this squares with the computer output speakers.

    The code works in MATLAB, but when I copy in the window of Matchscript it does not work. The commands I use seem to be compatible with Mathscript and it seems that the problem happens at the stage of the loop. My MATLAB code is pasted below and I join the LabVIEW VI with my Mathscript window. Could someone please take a look at my code and see if I am missing any common questions? I am a new user of LabVIEW and am not completely familiar with its intricacies.

    ______________________________________________________________________________

    CLC
    sample rate = 40000;
    Step = 1/sampling rate;

    freqArray = [5247.819345 2691.190023 2379.575143 2242.862777 2162.605492 2105.101801 2056.973700 2011.841157 1966.260707 1918.191205 1866.327910 1809.784986 1747.934921 1680.325561 1606.638751 1526.672983 1440.340700 1347.674817 1248.840788 1144.151306 1034.080952 919.278207 800.572260 678.972385 629.941608 670.923135 706.090004 733.248856 750.729600 757.468401 753.055128 737.746864 712.449234 678.666661 638.422079 594.147026 548.544635 504.430794 464.562051 431.461673 407.256955 393.540721 391.268089 400.696344 421.371792 452.163428 479.456733 499.635983 519.683091 539.345489 558.379030 576.550816 593.641724 609.448655 623.786494 636.489853 647.414604 656.439263 663.466274 668.423222 671.264030 671.970137 670.551695 667.048751 661.532385 654.105760 660.331784 659.175196 658.042926 656.973398 656.008980 655.196461 654.587596 654.239768 654.216768 654.589753] [655.438402 656.852357 658.933014 661.795790 665.573014 670.417674 676.508334 684.055673 693.311331 704.580088 718.236954 734.751698 754.724945 778.942900 808.463177 844.755078 889.940437 947.233277 1021.807261 1122.692006 1267.554308 1497.662150 1946.857495 4694.713066];
    z = [ ];
    T2 = [];
    for n = 0:99
    t = (0 + (0.01 * n)): step: (0.01*(n+1)) - stage;
    y = (square (2 * pi * freqArray (n + 1) * t) + 1) / 2;    % VL creation at different frequencies
    z = [z, y];                                  % is concatenate matrices
    T2 = [t2, t];                                tables of time CONCATENATE %
    end

    Plot (T2, z)
    Sound (z, 40000, 16)

    _______________________________________________________________________________

    DCT,

    Remember that table in MathScript indices are 1-based, so change the for loop statement "for n = 1/100' should do the job.  It can be a little confusing because array indices are based on 0 in native LabVIEW, so you must make sure to add or subtract 1 during the back and forth between LabVIEW code and MathScript code.

    Chris M

Maybe you are looking for

  • which is the best Web site program

    Which is the best site that I can buy, it's easy to download changing SKU

  • Lenevo Z580 key lock problem

    I bought reliance Kolkata Z580 August 4. I amreally very satisfied with my purchase even after the purchase ofauthorized dealer. We've checked the machine, the best way possible anda machine at home. At home when we started typing a single key'W' is

  • How can I cancel

    I have zune to a few recent xbox live monthsfor, but now I feel like im not much use, but pay each month... Can't find a way to cancel the subscription... HELP, financial issues...

  • HP Probook 6560 b windows 8 install

    I put a new 80 GB of HD in my probook 6560 b.  When trying to install Win 8 of win8 standard ISO DVD it is not the disc.  I installed the latest version of the BIOS. Windows 7 installation works fine, sio I know the HD works. Upgrade to win 8 after i

  • Using HTML5 FIleReader / FileWriter on BB10 dev alpha

    Is this supported? Apart from the examples PhoneGap and w3c, I can find no information on the implementation of webworks of it and despite all my efforts, I can't work properly. I can list files and writing files seems to work (for example does not e