I cannot run the matlab script node in the labview

Hi there,
My LabVIEW version is 8.5, and matlab version is R2008a.
I wrote a simple matlab code, like x= 1, y = x*2. Then I tried to put them into matlab script node in LabVIEW.
However, when I ran the program, I couldn't run and Labiew show some error. 
Then I tried the method talked before on this forum. Please see the following link.
http://forums.ni.com/ni/board/message?board.id=MathScript&thread.id=571
I followed the instruction and open the "command prompt," type some commands then I could run the program, and simultaneously, the LabVIEW program open "Matlab command line window" and run my labview code. However, if I didn't use the command prompt, the  "matlab command window" will not be opened by running the labview program. It would just show some error. And even if I turn on the matlab program in advance, I still couldn't run the labview program.
Is there any effecient way to deal with this problem without using "command prompt?" Because I try another PC with both matlab and labview installed on it, I "can" run my simple matlab script node on it, and it will open the matlab command line window automatically by running my code. Therefore, I thought there might be some software linking problems in the previous PC I used . Do you have any ideas?
Thanks in advacne.  

Hi, and thanks for the post! I hope your well today.
This may help,
MATLAB® version 2006b (7.3) and version 2008a do work with LabVIEW
8.20. This problem can occur if a new version of the MATLAB® software
is installed along with a previous installation, which is then
uninstalled. The uninstallation of the older MATLAB® software results
in removing the ActiveX/COM components LabVIEW uses. This can cause the
MATLAB® script node in LabVIEW to stop working. There are three
solutions to this problem.
Uninstall the MATLAB® software and reinstall it. This should install the necessary ActiveX component.
Restore the MATLAB® automation server. Browse to the \bin directory (e.g. MATLAB\R2006b\bin) and type matlab -regserver ,
which will reset the registry settings and start the server. The server
can then be closed and the MATLAB® script node will work properly again
in LabVIEW. LabVIEW may need to be restarted if VIs are open that
contain MATLAB® script nodes.
Leave both versions of the MATLAB® software installed.
MATLAB® is a registered trademark of The MathWorks, Inc. Other
product and company names listed are trademarks and trade names of
their respective companies.
Did you have an older version of MATLAB before 2008a?
Kind Regards,
James.
Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help!

Similar Messages

  • I can't find the MATLAB script node in labview

    We are using a MAC G4 with OS 9. We also have labview 5.1. I have looked under Mathematic>>Fomula in the tools palette and I cannot find the MATLAB script node.
    Is there an extra download that I need to get this MATLAB script node?

    The HIQ and MATLAB script nodes are only available in the full and professional development systems. If you have one of these versions, these nodes should be under the Mathematics>>Formula palette.
    If you have the base package of LabVIEW, you will not have access to these script nodes. Details about which options are included in which development packages can be found at:
    http://www.ni.com/labview/devchart.htm

  • I have some software problems of running matlab script node in the LabVIEW program.

    Hi there,
    I wrote a simple matlab code, like x= 1, y = x*2. Then I tried to put them into matlab script node in LabVIEW.
    However, when I ran the program, I couldn't run and Labiew show some error. 
    Then I tried the method talked before on this forum. Please see the following link.
    http://forums.ni.com/ni/board/message?board.id=Mat​hScript&thread.id=571
    I followed the instruction and open the "command prompt," type some commands then I could run the program, and simultaneously, the LabVIEW program open "Matlab command line window" and run my labview code. However, if I didn't use the command prompt, the  "matlab command window" will not be opened by running the labview program. It would just show some error. And even if I turn on the matlab program in advance, I still couldn't run the labview program.
    Is there any effecient way to deal with this problem without using "command prompt?" Because I try another PC with both matlab and labview installed on it, I "can" run my simple matlab script node on it, and it will open the matlab command line window automatically by running my code. Therefore, I thought there might be some software linking problems in the previous PC I used . Do you have any ideas?
    Thanks in advacne.  

    This board is for Mathscript, but you seem to have a matlab problem. You should probably post in the LabVIEW forum instead.
    What is your LabVIEW version? What is you matlab version?
    LabVIEW Champion . Do more with less code and in less time .

  • Input data type of Matlab script node

    Hi,
    I have 1D array of complex number in single precision.
    Matlab script node is used to import data into Matlab and do some data processing, and then export.
    Data type of input is currently double precision.
    How to re-define this input data type of the Matlab script node?
    Thanks,

    Right, arrays of singles are not supported. See Comparison of MathScript RT Module and the MATLAB® Software Data Types in LabVIEW
    As for memory usage, Profiling the VI should let you know how much memory Labview uses when running your code. Communication with MATLAB® is done through ActiveX, and I'm actually not 100% sure whether it will reflect memory usage from script execution. I think it'll be simple enough to profile your VI with and without the MATLAB Script node and note the memory usage difference...
    Misha

  • IMAQ FFT multiplication and MATLAB Script Nodes/Compact Rio

    I would like to automatically generate a frequency kernel to multiply with the FFT of my IMAQ image. I was wondering if there was a way for LabVIEW to automatically set up 2D arrays (with a lower bound, a step size and a higher bound) like what is done in MATLAB.
    I was wondering also, if someone could give me some insight as to what restrictions I face, when uploading code from MATLAB script nodes into the Compact RiO (I have a cRiO-9025).

    Hi Bilaln,
    I think you confused about a MATLAB script node and a Mathscript node.
    A MATLAB script nodes uses ActiveX to call into MATLAB, where as a Mathscript node runs in a NI built environment. The MATLAB script node requires both that MATLAB be installed and the host supports ActiveX. Since cRIO does not do either, you should use the MATHSCRIPT RT module.
    Joe Daily
    National Instruments
    Applications Engineer
    may the G be with you ....

  • Error 1050 by trying to use load'filename' in matlab script node

    Hi
    I keep getting error 1050 when Labview tries to load a text file through the matlab script node.
    I've all ready checked for it on google and this forum but found nothing. I've also done this: http://digital.ni.com/public.nsf/allkb/2B3FF46C8512C4F786256CF30071BE53 and tried to use dlmread and more. 
    The thing is that  I need the matlab script node to read a txt file that Labview made from a chart with only 1 array, plot it and export a jpg image. I can't really use the 'export image' or 'get image' function in Labview cause I need the whole plotted chart (these functions only take a snap shot of it when they're run).
    This is my code that I'm using:
     data=load('file') ;
    Vpp=(data(1:2000,1));
    xsize = (1/2000);
    plot(0.0005:0.0005:1,Vpp);
    axis([0 1 -5 5]);
    print('-djpeg', 'graph.jpg');
    The usual load in matlab to load txt files and print to print the jpeg. The code works in matlab but not in labview
    And yeah, I'm using windows 7 and legal versions of matlab r2009b and Labview 2009  
    Solved!
    Go to Solution.
    Attachments:
    matlab.jpg ‏213 KB

    Yes I forgot, this is my error...  It looks like it can't read the file path, but the 'file' path is actually just a path to my c:\user\*\*\*\*.txt 
    Error 1050 occurred at LabVIEW:  Error occurred while executing script. Error message from server: ??? Error using ==> load
    Unable to read file file: No such file or directory.

  • Calling user defined functions in Matlab Script Node

    Greetings!
    I am not successful in calling a user defined function inside a Matlab Script Node.
    The path has been added to Matlab, but the Matlab script node is not calling my function.
    I am calling it as follows:
    a= fcd(b,c);
    and the fcd.m file is calculating the 'first central difference' - works in Matlab, but not in LabVIEW:
    function MtxOut=fcd(MtxIn,dt)
    %MtxOut=fcd(MtxIn,dt)
    %first central difference method of finding instantaneous
    %first derivatives
    %MtxIn = MxN matrix of inputs
    %dt = time change between inputs
    %MtxOut = MxN matrix of first derivatives of inputs
    r=size(MtxIn,1);
    c=size(MtxIn,2);
    MtxOut(1,=(MtxIn(2,-MtxIn(1,)/dt;
    MtxOut(r,=(MtxIn(r,-MtxIn(r-1,)/dt;
    for i=2:r-1
        for j=1:c
            MtxOut(i,j)=(MtxIn(i+1,j)-MtxIn(i-1,j))/(2*dt);
        end
    end

    Matthew:
    What version of MatLab, LabVIEW are you using?. Also, what type of errors are you running into?.
    Thanks,
    Rudi N.

  • Matlab syntax errors are not caught and reported when code is executed in a LabVIEW Matlab script node

    I want to be able to catch errors that occur during the execution of Matlab code in a LabVIEW Matlab script node. According to my understanding of the documentation, errors of this type should be available at the "error out" signal point on the Matlab script node. I have noticed that even deliberately generating matlab syntax errors will not produce an error output. See the attached vi for an example.
    Attachments:
    matlab.vi ‏13 KB

    I ran your example VI and the is what I got in the Error Out cluster:
    "Code 1050
    Error occured while executing script. Error message from server: ??? This is an error
    . in matlab[1].vi"
    If you are generating custom error messages in Matlab I would suggest passing them back to LabVIEW through output variables in the script node.
    Chris_Mitchell
    Product Development Engineer
    Certified LabVIEW Architect

  • Matlab script node for real time purpose

    Hi!
    We are trying to control in real time the frequency of a vibration motor with a voltage signal proportional to EMG activation.
    Our EMG sends data to a LAN port and we read them in Labview using the UDP Read function.
    We created a VI which reads data from UDP connection, parses the header and does the decoding (according to the data type of our EMG device, TMSi Porti).
    Every sample read from UDP port is passed to the Matlab script node which implements a Bayesian filter which returns a value (MAP) used to control the vibration frequency.
    The problem is that this operation is extremely slow...(about 15 seconds!!) and we need it to be real time!
    We tried also a simple MA filter and the delay is reduced to around 2 sec, so we think that the major problem is in the Matlab script node.
    We wonder if this delay is due to the call of an external code (Matlab) or to the complexity of the Matlab code itself.
    Do you know how to improve the performance of this VI?
    Thank you!
    Serena
    Attachments:
    EMGreceiver+Bayes.vi ‏54 KB

    Serena
    I noticed that your code also have LabVIEW MathScript RT code. Have you tried to replace the Matlab scriptnode with it? The MathScript Node compiles the script natively into G function and avoid transfering information between programs.
    If this does not speedup your application, please attach the subVIs and test data that allow us to reproduce the problem and performance. Also, what is the version of LabVIEW that you are using? If it is before LabVIEW 2009, then I would strong recommend update to that version.
    Barp - Control and Simulation Group - LabVIEW R&D - National Instruments

  • Retrieving data from a MATLAB script node

    I am creating a VI that imports and manipulates arrays of data points and then plots them in Labview. When I run my Matlab script in Matlab there are no errors and all the assigned variables exist in the form that they should exist but for some reason Labview cannot retrieve all of them (they just show up as zeros). There are no errors in the script as far as I can tell. Do you have any idea what could be going wrong?

    Hi,
    You can use the MatLAB window opened by LabVIEW to debug your script.
    Check the values of your variables in the MatLAB window and try to find out where the data goes wrong. I've experienced many problems with LabVIEW MatLAB nodes on different PCs, and many times legal MatLAB operations would go wrong in the script node. You will need to find out which line exactly does your MatLAB code not executing correctly and try to modify the MatLAB codes from there.
    Hope this help,
    Dan

  • How to insert data from file into matlab script node

    I have interfaced input data from file to be processed using matlab script node. But the problem is that I could not capture the multiple data into matlab script node and to convert it into matrix. Further to this I need to process the data by plotting graphs from it. Thank you in advance for the advice

    Zarina,
    To clarify your problem, you have a script node contaning your Matlab code. Are you then using the standard LV functions to load in your data from a file and pass it into the script node?
    Regards
    Tristan

  • How adaptive algorithm is implemente​d through matlab script node?

    hi
    iam working on adaptive rejection algorithm
    i want to make a adaptive algorithm in labview using Matlab script node, beacuse i have the matlab file of that algorithm
    it is not directly converting in labview, so i wants to make the adaptive algorithm in labview
    but having problem to implement the adaptive algorithm
    could any one has idea?
    thanks
    Solved!
    Go to Solution.

    Hey,
    You just need to copy mfile content in MATLAB script node .. then rest of work is same as with other node in LabVIEW...
    Hope it helps..
    Regards
    HS

  • How to open an lvm file in MATLAB Script Node

    Hello everyone
    I am using LabVIEW 8.0 in order to acquire a signal, and I chose to save the signal's data with "Write to Measurement File"
    Here is the problem, later on I am using a MATLAB script on the data, but the problem is that the MATLAB can't read the lvm file, because it doesn't have a txt ending.
    So my question is this : is there any way I can convert in LabVIEw the lvm file to txt ???
    Thanks ,
    Lavi
    Attachments:
    Single Session 19 04.vi ‏197 KB

    Edit: Sorry about the double answer on the .lvm file. Posted at the same time as previous answer.
    The .lvm file is a text-based file. Form the online help for LabVIEW :
    Use text-based measurement files (.lvm) to save
    data that the Write To
    Measurement File Express VI generates. The text-based measurement
    file is a tab-delimited text file you can open with a spreadsheet application or
    a text-editing application. In addition to the data an Express VI generates, the
    .lvm file includes header information about the
    data, such as the date and time the data was generated. LabVIEW saves data with
    up to six digits of precision in a .lvm file. Use
    binary measurement files
    (.tdm) to exchange data with higher precision.
    A few comments regarding your code:
    Learn to stop using sequence frames. This is typical for someone coming from a text-based language programming environment. This is not a personal knock on you, just a pointer. For example, instead of using the "Wait (ms)" function you can use the "Time Delay" VI. That has error in/error out clusters which will allow you to chain VIs. In the bottom part you can eliminate the sequence frame that you're using the parallel port write to the following:
    which is much cleaner and easier to read.
    The loop where you're reading data is pointless. It is set up to run only once, so what's the purpose of a loop?
    You do not need to place all objects inside a sequence frame and then place the sequence frame inside the loop. This is redundant.
    Message Edited by smercurio_fc on 04-19-2007 09:26 AM
    Message Edited by smercurio_fc on 04-19-2007 09:27 AM
    Attachments:
    Example_BD.png ‏5 KB

  • CVP - Run Ext. Script Node Querry

    I was trying to route the call towards VXML app using Run Ext. Script Node.
    I referred cisco configuration doc. and it states that you need to set the VRU Script name as  GS,Server,V
    My question is once i configure this script in network VRU script list and associate it with Network VRU (type10).
    Do i need to create any VRU script elsewhere with the same name ? or it will default route the call to the Call Server ?
    Thanks in anticipation 

    Hi geoff
    Thanks for the response.
    I understand you need to set the application name = "" in the variable and pass it to the VRU .
    But my querry is when we set the Run External script Node = GS,Server,V ( VRU Script name )
    Do we create this VRU Script elsewhere apart from ICM . In ICM i am aware that you need to create this in Network VRU List.
    Hope my question is clear

  • Warning: Either the server is already running or the port number is invalid. Shut down the MATLAB process in which the server is running or run the server on a different port number.

    安装好SIT后,matlab 提示
    Warning: Either the server is already running or the port number is invalid. Shut down the MATLAB process in which the server is running or run the server on a different port number.
    怎么解决?

    这个应该和SIT无关,意思是你有个MATLAB进程占用了某个端口号或者matlab的服务器正在运行,导致你现在的程序没法建立这个端口的服务器。 试试刀windows进程管理里把matlab相关的进程kill掉,再启动试试。或者参考链接http://www.cnblogs.com/qiweiwang/archive/2010/07/29/1788281.html  里边有关于建立服务器的描述,就在前半部分。

Maybe you are looking for

  • Custom Bios for MSI GT70 ONE ( GTX 680M )

    Best Svet. I have current running windows 8.1 64bit and im on the latest bios from the MSI website ( x50 ) but i would like to have a unlocked bios ( i have a 3920XM ) also how do you flash it on windows 8 ? with the whole new UEFI bios ? Regards , J

  • Audio line-in input won't work

    Hello, have used Garageband several times in the past, and have had no problems setting the input as audio line-in to record my guitar. However, I tried again for the first time in a couple of years the other day and neither my Powerbook or my iMac w

  • Can't connect to X11 window server using ':0.0'

    I tried to deploy a sampel BIBean application (JSP+BIBean) to standalone OC4J( install on AIX). When I launch the jsp from windows browser,I got the following error message. And I export DISPLAY=IP address:0.0 and bounce the OC4J, the IP address is t

  • Apple Script Help please

    Pleasewrite an AppleScript for the following scenario: You need to ping the address10.32.8.151 every 5 seconds and report to the current logged in user via adialog box and email a set address when the IP has failed to respond to morethen 6 pings or 3

  • Solution for min price on sales order

    Dear All, When we create a sales order, the unit price is from price list 01 and the min price is in price list 02. We can change the unit price manually. Is there anyway to give our customer an alert or error message to force them to have a prince h