LabVIEW MathScript - loadlibrary

in Matlab, the below commands are able to produce neat results to display functions from NI-488.DLL. However in LabVIEW MathScript, it has problems.
>> loadlibrary('ni488.dll', 'ni488.h')
>> libfunctions('ni488')
Functions in library ni488:
AllSpoll        SendDataBytes   ibcac           ibloc           ibsad          
DevClear        SendIFC         ibclr           iblock          ibsic          
DevClearList    SendLLO         ibcmd           iblockxA        ibsre          
EnableLocal     SendList        ibcmda          iblockxW        ibstop         
EnableRemote    SendSetup       ibconfig        ibnotify        ibtmo          
FindLstn        SetRWLS         ibdev           ibonl           ibtrg          
FindRQS         TestSRQ         ibdiag          ibpad           ibunlock       
PPoll           TestSys         ibdma           ibpct           ibunlockx      
PPollConfig     ThreadIbcnt     ibeos           ibpoke          ibwait         
PPollUnconfig   ThreadIbcntl    ibeot           ibppc           ibwrt          
PassControl     ThreadIberr     ibexpert        ibrd            ibwrta         
RcvRespMsg      ThreadIbsta     ibfindA         ibrda           ibwrtfA        
ReadStatusByte  Trigger         ibfindW         ibrdfA          ibwrtfW        
Receive         TriggerList     ibgts           ibrdfW         
ReceiveSetup    WaitSRQ         ibist           ibrpp          
ResetSys        ibask           iblck           ibrsc          
Send            ibbnaA          iblines         ibrsp          
SendCmds        ibbnaW          ibln            ibrsv          
>> libfunctions ni488 -full
Functions in library ni488:
[int16Ptr, voidPtr] AllSpoll(int32, int16Ptr, voidPtr)
DevClear(int32, int16)
int16Ptr DevClearList(int32, int16Ptr)
int16Ptr EnableLocal(int32, int16Ptr)
int16Ptr EnableRemote(int32, int16Ptr)
[int16Ptr, int16Ptr] FindLstn(int32, int16Ptr, int16Ptr, int32)
[int16Ptr, voidPtr] FindRQS(int32, int16Ptr, voidPtr)
voidPtr PPoll(int32, voidPtr)
PPollConfig(int32, int16, int32, int32)
int16Ptr PPollUnconfig(int32, int16Ptr)
PassControl(int32, int16)
voidPtr RcvRespMsg(int32, voidPtr, int32, int32)
voidPtr ReadStatusByte(int32, int16, voidPtr)
voidPtr Receive(int32, int16, voidPtr, int32, int32)
ReceiveSetup(int32, int16)
int16Ptr ResetSys(int32, int16Ptr)
voidPtr Send(int32, int16, voidPtr, int32, int32)
voidPtr SendCmds(int32, voidPtr, int32)
voidPtr SendDataBytes(int32, voidPtr, int32, int32)
SendIFC(int32)
SendLLO(int32)
[int16Ptr, voidPtr] SendList(int32, int16Ptr, voidPtr, int32, int32)
int16Ptr SendSetup(int32, int16Ptr)
int16Ptr SetRWLS(int32, int16Ptr)
voidPtr TestSRQ(int32, voidPtr)
[int16Ptr, voidPtr] TestSys(int32, int16Ptr, voidPtr)
int32 ThreadIbcnt
int32 ThreadIbcntl
int32 ThreadIberr
int32 ThreadIbsta
Trigger(int32, int16)
int16Ptr TriggerList(int32, int16Ptr)
voidPtr WaitSRQ(int32, voidPtr)
[int32, voidPtr] ibask(int32, int32, voidPtr)
[int32, voidPtr] ibbnaA(int32, voidPtr)
[int32, voidPtr] ibbnaW(int32, voidPtr)
int32 ibcac(int32, int32)
int32 ibclr(int32)
[int32, voidPtr] ibcmd(int32, voidPtr, int32)
[int32, voidPtr] ibcmda(int32, voidPtr, int32)
int32 ibconfig(int32, int32, int32)
int32 ibdev(int32, int32, int32, int32, int32, int32)
[int32, voidPtr] ibdiag(int32, voidPtr, int32)
int32 ibdma(int32, int32)
int32 ibeos(int32, int32)
int32 ibeot(int32, int32)
[int32, voidPtr, voidPtr] ibexpert(int32, int32, voidPtr, voidPtr)
[int32, voidPtr] ibfindA(voidPtr)
[int32, voidPtr] ibfindW(voidPtr)
int32 ibgts(int32, int32)
int32 ibist(int32, int32)
[int32, voidPtr] iblck(int32, int32, uint32, voidPtr)
[int32, voidPtr] iblines(int32, voidPtr)
[int32, voidPtr] ibln(int32, int32, int32, voidPtr)
int32 ibloc(int32)
int32 iblock(int32)
[int32, voidPtr] iblockxA(int32, int32, voidPtr)
[int32, voidPtr] iblockxW(int32, int32, voidPtr)
[int32, voidPtr, voidPtr] ibnotify(int32, int32, voidPtr, voidPtr)
int32 ibonl(int32, int32)
int32 ibpad(int32, int32)
int32 ibpct(int32)
int32 ibpoke(int32, int32, int32)
int32 ibppc(int32, int32)
[int32, voidPtr] ibrd(int32, voidPtr, int32)
[int32, voidPtr] ibrda(int32, voidPtr, int32)
[int32, voidPtr] ibrdfA(int32, voidPtr)
[int32, voidPtr] ibrdfW(int32, voidPtr)
[int32, voidPtr] ibrpp(int32, voidPtr)
int32 ibrsc(int32, int32)
[int32, voidPtr] ibrsp(int32, voidPtr)
int32 ibrsv(int32, int32)
int32 ibsad(int32, int32)
int32 ibsic(int32)
int32 ibsre(int32, int32)
int32 ibstop(int32)
int32 ibtmo(int32, int32)
int32 ibtrg(int32)
int32 ibunlock(int32)
int32 ibunlockx(int32)
int32 ibwait(int32, int32)
[int32, voidPtr] ibwrt(int32, voidPtr, int32)
[int32, voidPtr] ibwrta(int32, voidPtr, int32)
[int32, voidPtr] ibwrtfA(int32, voidPtr)
[int32, voidPtr] ibwrtfW(int32, voidPtr)
%% below script written for MathScript, but it gives some errors. why?
%% take note ni488.dll and ni488.h files must be in the working directory. I attached both files here.
if libisloaded('ni488.dll')
unloadlibrary('ni488.dll')
end
loadlibrary('ni488.dll', 'ni488.h')
libfunctionsview('ni488.dll')

Hola;
La versión de LabVIEW 64 bits no tiene este módulo, de hecho es una versión limitada únicamente a ciertas herramientas. Te recomiendo que descargues e instales la versión de 32 bits (aunque tu máquina esté corriendo en 64).
Yo estoy corriendo win 7 64 bits con LabVIEW 2013 de 32 y funciona a la perfección.
Puedes descargar la herramienta desde aquí debajo de LabVIEW 2013 Toolkits and Modules
Exito en tu aplicación

Similar Messages

  • User defined function error in Labview mathscript

     I m Labview 2011 user. I had a problem when i use a user defined func in mathscript.
     I have used it well, but it doent work suddenly. It looks like below.
     function name turned to grey color suddenly. Plz help me.

    The last time I dealt with this, it was very confusing.  If I remember correctly, there were 3 different places that I had to set the correct search path for the .m file:
    1) Tools>Options>MathScript
    2) In the Project, right-click on My Computer and select Properties>MathScript
    3) Tools>MathScript Window>File>LabVIEW MathScript Properties
    The documentation seems to indicate that at least 1 and 2 should be the same and 3 only applies to that window, but like I said, last time I did this I remember having to change all three.
    Good luck!
    Chris
    Certified LabVIEW Architect
    Certified TestStand Architect

  • What is LabVIEW MathScript​?

    The subject of this forum, LabVIEW MathScript, is a new
    feature for LabVIEW 8 that adds math-oriented, textual programming to LabVIEW.
    MathScript joins graphical dataflow programming as another means to define the
    custom software you develop using LabVIEW. Working with LabVIEW, you can choose
    a textual approach, a graphical approach, or a combination of the two. You can
    choose the most effective syntax for technical computing, whether you are
    developing algorithms, exploring signal processing concepts, or analyzing
    results. The significance of LabVIEW and MathScript lies in this “best of both
    worlds” approach that it facilitates.
    At the heart of LabVIEW MathScript is a high-level text-based
    programming language with syntax and functionality that abstracts the
    complexity of tasks related to signal processing, analysis, and math. MathScript
    includes more than 500 built-in functions for such work so you can define your
    own new user-defined functions. MathScript is generally compatible with m-file
    script syntax, the syntax widely used by alternative technical computing
    software such as The MathWorks, Inc. MATLAB® software, Comsol, Inc.
    COMSOL ScriptTM software and others.
    Such compatibility means that you can work with many previously developed m-file
    scripts such as those available in engineering textbooks or on web sites that
    distribute open-source m-file scripts.
    Please visit http://ni.com/mathscript for more
    information about LabVIEW MathScript including:
    Inside
    MathScript
    A white paper with a more extensive overview
    Function
    Lists
    Complete and abridged lists of built-in LabVIEW MathScript functions
    Examples
    Links to online examples for LabVIEW MathScript
    Much more…
    MATLAB® is a registered trademark of The MathWorks, Inc. All other trademarks are the property of their respective owners.
    Sam Shearman

    Hello,
    Thank you very much for your idea. It is just what I was looking for. I have used the polynomial evaluation.
    My origin polynomial is an acquired signal V(t) and I get a new signal G(t) that takes value each second. I would like
    a more continues signal. For example it changes each 0.2 second. Have I to modify something in the polynomial evaluation.vi?
    Thank you very much for your time. Sincerely,
    John
    Attachments:
    draw.jpg ‏961 KB
    V(t).jpg ‏600 KB
    G(t).jpg ‏600 KB

  • In-browser LabVIEW MathScript Online Evaluation is now in beta...

    MathScript Online Evaluation Beta is Live!
    http://www.ni.com/mathscript >> Test Drive LabVIEW MathScript Today
    National Instruments LabVIEW MathScript adds math-oriented, textual programming to NI LabVIEW. You can use the MathScript Online Evaluation to test your scripts in MathScript before you purchase or download the LabVIEW development system.
    Free online utility generally compatible with widely used m-file script syntax 
    Easy-to-use interactive script prototyping environment 
    Streamlined algorithm development for Math, Signal Processing, and Control Design
    http://www.ni.com/mathscript for more information

    I already owned 10 copies of MathScript as part of the NI Developer Suite.  All ten Serial Numbers were, and are now, currently on SSP.
    MathScript was taken away from me as part of the LabVIEW 2009 Upgrade.
    Everybody that owns Developer Suite and MathScript and has a current SSP has had their MathScript taken away from them as part of LavVIEW 2009 upgrade.
    They will need to repurchase MathScript again.
    Shame on you NI.  This is appalling and horrific. 

  • Help In LabVIEW Mathscript

    Hi ,
        This is Sreenivas.I have started working on NI-5640R LabVIEW card.I need to generate some modulations(QPSK,GMSK,OOK and 4-FSK) with Fc 21.4 Mhz. Successfully i   completed all these modulation in MATALB.
        In  labview 8.2,  LabVIEW Mathscript future is there.
    Plz tell me how i have to use it.where i  need to write my matlab code in Labview Mathscript.Directly i can copy my m-code into command window or script editor.
    plz tell me procedure.
    I am using LabVIEW 8.2 and card NI-5640R(PCI based) v 1.1
    Thanking you
    with regards,
    Sreenivasulu.O

    Hi Sreenivasulu.O,
    Smercurio has provided some great information on this! He is right in saying that you have to use NI-DAQmx to acquire/generate data. Here is a link that gives you information on using MathScript to get you started with it. Here is another link that gives you information on transferring information from Matlab and vice versa.
    Good luck with your application!
    Warm regards,
    Karunya R
    National Instruments
    Applications Engineer

  • Can LabVIEW Mathscript be used with Speedy 33?

    I am having SPEEDY 33. Whether I can program Mathscript functions using LabVIEW 8.6 or 2009? Or any solution to include Mathscript in SPEEDY 33?

    Hello,
    Unfortunately, at this time, LabVIEW MathScript is only supported on the desktop platform.
    Grant M.
    Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments

  • Can Labview Mathscript be use with speedy-33?

    i had Labview version 7.1, 7.1 embedded, 8.0 and 8.2 but it seem like i cant use mathscript on speedy-33.

    Hello,
    Unfortunately, at this time, LabVIEW MathScript is only supported on the desktop platform.
    Grant M.
    Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments

  • Mathematica output formula to labview mathscript

    I've been working on developing general error propagation equations based upon empirical equations in mathematica, and the outputs are extremely long.  Instead of sitting and copying each line of the output to labview mathscript, is there a quicker way to copy this over?

    You can save all the equations to an m-file and then import the whole file.
    Jarrod S.
    National Instruments

  • Help abt LabVIEW MathScript

    Hi,
    i am sreenivasuluI need to generate some modulated(AM,BPSK,QPSK 4-FSK and GMSK) signal.
    i successfully completed all these modulation in Matlab.how can use that m.file directly to this labview or any indirect method is there.
    tell me how i ahve to use that m files or tell me procedure to generate modulated signal using LabVIEW MathScript.
     actually i am working on LabVIEW 8.2 with ni 5640R(PIC) Hardware card.
    after generating this signal i can communicate with this card.if YES tell me procedure.
    if possible send me some VIs.
    Final my goal is i need to generate some modulated(AM,FM,FSk,BPSK,QPSK Etc) signal with Fc
    21.4MHz for providing as a input to other module(RAD-2,Pentaland).
    I am using LabVIEW 8.2 and card NI-5640R(PCI based) v 1.1
               Thanking you so much sir.
    Thanks & regards,
    Sreenivasulu.O

    Hello,
    The script you currently have in the MathScript node generates a real output.  If you wish to convert it to complex, you can simply drop the "To Double Precision Complex" conversion bullet located in the Programming >> Numeric >> Conversion palette.
    In looking at the second loop in your VI, you don't need to use the "Get Waveform Components" element because MathScript does not currently output a waveform datatype.  Simply use the vector directly.
    Grant M.
    Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments
    Message Edited by GrantM on 03-14-2008 09:14 AM
    Attachments:
    ToComplex.png ‏4 KB

  • Labview mathscript

    I recently upgraded labview 8.6 to labview 2010, and I can't get mathscript to activate.   I was given an activation code for mathscript, but it is rejected by license manager.
    Is mathscript now a seperate module that must be purchased ?
    That means I lost the ability to use mathscript when I upgraded from 8.6 to 2010 ?

    Mathscript became a separate module a few years ago. See this thread about it. If I remember correctly, users with an active SSP could activate it with their upgrade to 2009. It may have been for a limited time though. Check with your local Sales Engineer.
    Just curious, why long to upgrade and why not to the latest version?

  • LabVIEW MathScript computation speed improvement

    I am using a MathScript node to make calculations on an sbRIO FPGA module and the speed of these computations is critical.  What are some ways to improve the speed of calculations and is there a faster way to do matrix calculations than MathScript?  If I make the MathScript portion into a subVI will it improve the speed of calculations?
    Thanks for any ideas
    Solved!
    Go to Solution.

    Please look at the attached VI. It has your original .m code, my modifications to your .m code, and the G code equivalent to the modified .m code. First, let me describe to you the numbers I saw on a cRIO 9012 for each of the three approaches.
    I ran each of the three approaches for hundred iterations, ignored the first 30 iterations to allow for memory allocations (which caused a huge spike in run-time performance on RT), and then took the average run-time for each loop iteration for the remaining iterations
    Original M: 485 msec/iteration
    Modified M: 276 msec/iteration
    G: 166 msec/iteration
    The modifications I made to your .m code are the following:
    (1) Added ; to end of each line to suppress output (used for debugging)
    (2) Moved the random code generation out - used whitenoise (seems like that's what you were doing)
    (3) Switch on the data type highlighting feature. Noticed that majority of the data was casted to complex, although didn't seem like you needed the complex domain. The source was sqrt function. Modified it to using real(sqrt(...))
    This improved performance by over 40%. I believe more can be squeezed if you follow the documentation - Writing MathScript for Real-Time Applications. 
    Then, I took the MathScript you had and wrote equivalent G leaving the algorithm as is. This gave us performance improvement of another 40% over the modified G. This is a known issue that on slow controllers MathScript adds a 2x penalty to equivalent G. We are currently investigating this issue and may be able to fix it in a future release.
    If you profile the G code, you will notice that most of the time is spent in matrix multiplication. Unless you rethink your algorithm, I doubt this can improve further.
    Let me know if you have questions
    Regards,
    Rishi Gosalia
    Attachments:
    Mathcript_efficiencyProblem Modified.vi ‏255 KB
    MathScript_efficiencyProblem_G.vi ‏62 KB

  • How to create a filter using mathscript transfer function in labview

    Dear all,
    I am currently designing a filter in labview using a Mathscript looping. The filter can be represented in transfer function. I have attachted the transfer function equation together with its value and the desire frequency vs. amplitude graph that I should obtained from it. Also, following are the transfer function written in Matlab.
    B1= tf ([57.5221845],[1 51.017077 205.1868]);
    B2 = tf ([1 0],[7.6991]);
    B3 = tf ([1 0],[14.32433403]);
    B4 = tf ([1 0],[137.6017]);
    F = B1 * ( (1+B3)/((1+B2)*(1+B4)));
    plot(F)
    I have also modify the coding as Labview Mathscript does not support the Matlab coding "tf" as transfer function to "bilinear"
    Problem I am facing are:
    1) Unable to display the graph of the filter in labvie.
    2) Unable to have sinewave as an input to the filter.
    3) The output cannot be display in graph format. 
    Hope to have the soonest reply from you guys. Many thanks in advance 
    Solved!
    Go to Solution.
    Attachments:
    transfer function.jpg ‏18 KB
    Weighting Filter.vi ‏266 KB

    Thank you again for offering to help me in writing the code.
    I suppose that I should do a frequency sweep on the transfer
    function to prove that it behave as the sample graph. Example, if I have an input sine
    wave with the frequency of 8.8Hz passing through the transfer function filter, the
    output that I should be getting is 1 according to the transfer function graph
    and of cause the frequency range of my input sine wave would only be between
    the ranges of 0.5 Hz to 30 Hz.
    Attachments:
    Weighting FilterTest1.vi ‏53 KB

  • Labview 8.5.1's MathScript window failed running imread with an error "A problem occurred in a subVI call."

    Hi,
    I am trying to port a Matlab program into a MathScript script.  Following is the first few lines of the script:
    clear;
    image1=imread('C:\LV_VertAlign\DSC_0104.jpg','jpg');
    image_double1=im2double(image1);
    image_gray11=rgb2gray(image_double1);
    In the first line, imread is supposed to read in a photo taken from a DSLR camera, so I think it's a 32-bit image.  And this is the error I got when trying to run this script in the Labview 8.5.1's Mathscript windows:
    "Error in function imread at line 2.  A problem occurred in a subVI call."
    What is the problem here?  and why does it complain about a subVI call?
    Thanks for any help to point me in the right direction.
    -Anh

    Hello Anh,
    As you may know, LabVIEW MathScript is implemented on top of LabVIEW.  The error message you received indicates that a problem occurred in one of the LabVIEW subVIs that MathScript calls.  As Jim indicated, the problem is in the file type specifier you passed to the function.  MathScript requires the use of 'JPEG' and not 'jpg' or even 'jpeg.'  In this case, we could return a better error message.  I have filed a bug report (115804) for this issue.
    You will find that once you fix this, the im2double and rgb2gray functions are not supported.  In LabVIEW MathScript, you generally can execute scripts written in the MATLAB® language syntax.  However, the MathScript engine executes the scripts, and the MathScript engine does not support some functions that the MATLAB software supports.
    We will look into adding these functions in a future release of LabVIEW MathScript.  If you need this functionality now, these functions are very simple to write yourself.  If you are performing additional image analysis in your script, you may wish to purchase the IMAQ toolkit.  It doesn't add any functions to MathScript at this time, but you could continue your analysis outside of MathScript with LabVIEW VIs.
    MATLAB® is a registered trademark of The MathWorks, Inc.
    Grant M.
    Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments

  • How to Use LABVIEW charts with Mathscript

    Hi,
       I recently tried to work on Mathscript and it is really amazing. what I tried to figure out is:
        Instead of plotting using traditional "plot" statement, how to use LabVIEW chart ( I know how to Add output but the graph were not as expected
    Is there any mean to get rid of this "Lengthy" delay that "ALL MATLAB User know" for first time compilation?
    Thanks in advance
    Waleed El-Badry MSc.,MCPD, ISTQB Certified Tester
    Assistant Lecturer
    Mechatronics Department
    Faculty of Engineering
    Misr University for Science & Technology

    Well Chris,
             I was about to post the solution, but as I said, I'm in a middle of experts
    It took me 3 hours to figure it out. I should've checked your answer . I resolved to the same suggesstion of yours. I only added some functionality to get the newbies like me being acquainting with how easy to work with LABVIEW mathscript based on MATLAB knowledge.
    Waleed El-Badry MSc.,MCPD, ISTQB Certified Tester
    Assistant Lecturer
    Mechatronics Department
    Faculty of Engineering
    Misr University for Science & Technology
    Attachments:
    Play with Mathscript.vi ‏35 KB

  • MathScript/LabVIEW residue bug

    Try this in MathScript:
    >>bb = [6 -8];
    >>aa = [1 -1 -6];
    >>[r,p,k] = residue(bb, aa)
    r =      4   
               2   
    p =     -2    
               3
    k =      0    
    Then multiply both the numerator and denominator by z:
    >>bb = [6 -8 0];
    >>aa = [1 -1 -6 0];
    >>[r,p,k] = residue(bb, aa)
    r =      -8   
               6   
    p =     -2    
               3
    k =      0 
    Wow, you get a different, wrong answer.  Matlab returns the same answer in both cases.
    Take this a step further and use the Partial Fraction Expansion VI.  It gives the same wrong answer!
    What's up?

    Hi Mark,
    You've located a problem with the LabVIEW MathScript function 'residue'.
    With your example
    >>bb = [6 -8 0];
    >>aa = [1 -1 -6 0];
    >>[r,p,k] = residue(bb, aa)
    the problem arises when the parameters bb and aa describe polynomials that are multiples of 'z' and have a nontrivial greatest common divisor:
    bb represents 6z^2-8*z
    aa represents z^3-z^2-6z
    As you noted, the problem occurs due to an underlying problem in Partial Fraction Expansion, a VI from the LabVIEW function palette (Mathematics->Polynomial->Rational Polynomial) that is being called "under-the-hood" when you invoke the LabVIEW MathScript 'residue' command.
    One way to avoid this problem is to do pole-zero cancellation before applying 'residue'
    Alternatively, you can perturb aa or bb slightly by adding some small constant terms, for instance:
    >>bb=[6 -8 1e-6]
    The problems described here are something that our engineers are aware of and are planning to fix in a future release.
    --Sam
    Sam Shearman

Maybe you are looking for