Convert MathScript node to regular wired diagram

I wrote a program last year in LabView 8.6, with some MathScript codes in it.  But this year, after I upgraded LabView to 2009 Full Development System, I am not able to run this program anymore because I didn't purchase the MathScript Module.  And what even worse is, when I wrote the program, I shrinked the script node frame too much in order to save some room, but now I cannot even drag the frame bigger.  So now everything is hidden inside the script frame and I cannot see what's inside.  Is there anyway that I can find out what's inside the script node so I can translate them to regular wired diagram?  Thank you in advance.
Message Edited by Support on 03-04-2010 02:25 PM

Hello,
Unfortunately there's no way to see your code without MathScript being installed. This seems like an overzealous restriction, so I have filed a bug report (ID 211321) to allow resizing and exporting text in a future version.
In the meantime, I can think of two options. You could install the MathScript RT Module in Evaluation mode. This will let you try it out for 30 days for free. Or I'd be happy to copy the text from your nodes and post it on the forums. If you'd like me to do that, just let me know which VIs to look at in your ZIP file.
jattas
LabVIEW MathScript R&D

Similar Messages

  • Calling a .m file from inside a mathscript node

    hello all i am hoping someone can help me out, I am in the process of converting our version 7.11 matlab node vi's to mathscript (I hope) AND I HAVE RUN INTO AN ISSUE. we have a very simple matlab script that bundled the data and sent it to another matlab sub routine. when i copy this script over to mathscript I get the following eror: Unknown symbol on line 13: Pre_Process_Function_Pulse. Is there a way I can call and run these subroutines from the mathscript node? Do i need to convert the sub routines into a mathscript file? or do i just need to change the syntax for my call? bmp of the offending line in mathscript attached. please forgive if this is an easy question, I am not really a matlab programmer, the files that we are running are provided from elsewhere, and i get to integrate them any and all help is always appreciated thanks Chris
    Attachments:
    mathscript.JPG ‏51 KB

    Hello again,
    Ok I am still having issues running the matlab script in mathscript.  I have gone back to the original scripts with all the nested sup routines.  and the mathscript code is just a call to the first .m file subroutine.  but for some reason mathscript will not recognize the function call as a call?  I recreated the original matlab node in a sequence, so the matlab node runs (successfully) and then the next sequence is the identical call in mathscript.  I have set the path in mathscript to the directory where all the .m files are located.  The pre-process_function_pulse .m file sequentially calls 6 very small .m subroutine files.  all are located in the same directory.  and this directory is the only one listed under path and working directory in Mathscript preferences.  Additionally from the last suggestions all traces of the original japanese comments have been deleted from all the .m files.  The inputs and outputs are the same for the matlab and mathscript nodes.  so i am basically at a loss here.
    Any and all help will be greatly appreciated.
    thank you
    Chris
    Attachments:
    mathscript.doc ‏138 KB

  • Changing a path dynamically in a MathScript node

    I have inherited a MatLab script that must be run in LabView. The first issue I have is creating unique paths. When a Unit Under Test runs, its data will be saved to a file based on the serial number of the UUT. The MatLab script then analyzes the data from that file and creates a new file based on the serial number with a new file extension. Therefore, I need to read in a file whose path changes and write a file whose path changes. The relative path will be the same but the unique file will not. I am looking for suggestions on how to do this since there will be hundreds of serial numbers being tested. It would be nice if the node could have an input that could configure to a path or string type instead of a scalar only. The serial numbers will be apha-numeric and this must be able to exist as a stand alone application.
    Also, the node reports a 'unexpected token: function'. I am noticing that functions must be a seperate .m file but how do you call the function after that?
    I am using LV 8.5
    Thanks - Jeff
    Message Edited by j.masse on 07-07-2008 07:57 AM

    Hello Jeff,
    Creating unique paths is not difficult in MathScript.  Simply pass in the string you want to use as the specific part of the path and have a local variable contain the base path.  For example, if you have a string input named serial to the MathScript node, the following code will build a path:
    basepath = 'c:\data\';
    filename = [basepath serial];
    You mention needing to do this for a large number of files.  The easiest way to do this is to have your loop in LabVIEW and simply pass in one string at a time to the MathScript node to do your processing.  If there is a lot of setup work involved before the work that needs to be done for each file, then it is more complicated.  There really isn't a concept of an array of strings in the language.  The closest you can get is a cell array containing many 1D character arrays.  However, LabVIEW MathScript does not yet support this construct.
    You can pass in a LabVIEW 1D string array -- the MathScript node input will adapt to the type wired to it.  What it does is create a 2D character array in MathScript.  If not all the strings are the same length, then it will pad the end of the string with zeros.  This presents a problem when you try to use the string as a filename.  However, you can use the strrep (string replace) function to replace the zeros with empty strings.  For example, assuming you have an input variable named serial that is a 1D array of strings and a loop-control variable named index, type
    basepath = 'c:\data\';
    name = strrep(serial(index, : ), char(0), '');
    filename = [basepath name];
    You cannot write a function inside of a MathScript node.  What you can do is create a .m file on disk and add the directory to your MathScript search path.  The default search path is your "My Documents\LabVIEW Data" directory.  But if you add the file elsewhere, there are three ways to set the search path for MathScript.  First, from the MathScript Window, go to "File >> LabVIEW MathScript Properties" and click on the "MathScript: Search Paths" category item.  This will set the search path for the MathScript Window only.  Second, from a LabVIEW VI, go to Tools >> Options and click on the "MathScript: Search Paths" category item.  This will set the search path for all VIs in the main application instance only.  Third, from within the project explorer, right-click on "My Computer" and select Properties.  Then click on the "MathScript: Search Paths" category item.  This will set the search path for that context only.  Since you are talking about using this in a built application, the third option will likely be what you need.
    As for using a built application generally, as long as you avoid any MathScript function that describes itself as being unsupported in the run-time engine, you should be okay.  The help for individual functions will list if they are unsupported.  You can see a list of all such functions by looking in the LabVIEW help index for "MathScript" and double-clicking on the entry for "functions not supported in Run-Time Engine."
    Grant M.
    Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments

  • How to make a text based language in mathscript node executed faster?

    Hello Everyone,
    I have build a VI contains mathscript function node, due to the big data needs to run it takes long time to finish the execution, is there any way to make the process faster, such as building shared library so it can be called by call library function node, or this only valid for c and c++ .
      any help will be highly appreciated

    smercurio_fc wrote:
    There is no way to convert the Mathscript code to a shared library.
    Please post what you're actually doing in the Mathscript node. As Gerd noted, there's probably a way to do this using native LabVIEW functions.
    While it may not be possible for a direct conversion from MathScript code to a DLL, it is possible to build a shared library using the application builder from a VI containing a MathScript node. This could be one way to get MathScript code into a shared library.
    The application builder is included with LabVIEW Professional Edition. You can setup a shared library by going to the project explorer and right clicking "Build Specifications" and selecting New->Shared Library (DLL).
    -K Scott

  • EXE I built unable to open reference to VI with MathScript Node in it

    Hi Everyone,
    First off, I'm using Labview 8.5 on Windows XP.
    I have two VIs. One called "Main Instance.vi" and the other is called "code.vi". The Main Instance vi is very simple. It opens a reference to code.vi. Using this reference, it dynamically calls code.vi using the "Call by Reference" node.
    The code.vi is also fairly simple. On this VI's connector pane, I have two inputs "a" and "b" and one output "c". All are of double data type. These controls are wired to a MathScript Node where the code inside is simply:
    c = a + b;
    So the idea here is that I am using the Main Instance VI to dynamically call and pass two numbers to code.vi. code.vi adds these two numbers via MathScript and returns the answer back to the Main Instance VI.
    This all works fine and dandy within LabView. However, when I build Main Instance.VI as an application, I am no longer able to open a reference to my code.vi because it has a MathScript Node in it. I put error indicators on the front panel of Main Instance VI to monitor the Open reference and Call by Refernce nodes. As VIs running in Labview, I get no errors and everything works fine ("a" and "b" are added and "c" is the correct answer). When Main Instance is an exe I get errors 1003 for the open reference function.
    I have attached screenshots of the Vis as well as the VIs themselves.
    Any guidance is appreciated. Keep in mind that I have to use Labview 8.5 as this is just an example of a bigger problem that is occuring in our software while developing a solution for a customer. Right now our software is compiled in Labview 8.5.   
    Attachments:
    Main Instance.vi ‏15 KB
    code.vi ‏30 KB

    Hello,
    As you may know, MathScript is implemented on top of LabVIEW.  Consequently, there are various VIs and controls from LabVIEW's vi.lib directory that are needed for a MathScript VI to run.  A built application can run on a computer that does not have LabVIEW installed.  The LabVIEW Run-Time Engine provides support for LabVIEW's primitives, but any functionality implemented in a VI must be included in the built application.  Otherwise, the application cannot find those support VIs. 
    Basically, the problem is that in trying to run your MathScript VI, you are only giving the application the top-level VI and none of the subVIs.  A way that will likely work around this is to build a source distribution with your MathScript VI.  Create a project with your VI in it.  Create a new source distribution build specification in the normal manner.  (I don't have LabVIEW 8.5 installed at the moment, but these are instructions for 8.6)  In the "Additional Exclusions" section, uncheck the "Exclude files from vi.lib" setting.  This should pull in all the subVIs you need to run the VI.  Then, open your top-level VI from your built application.
    Grant M.
    Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments

  • Mathscript node: an internal mathscript error has occurred: 64-bit LabVIEW 2009

    Hi Folks -
    I have an installation now of
    LabVIEW 2009 9.03f, Vision, and Advanced Signal Processing Toolkit, all
    64-bit versions on a new computer so that I can convert some code from
    32- to 64-bit.
    I figure I will address errors
    one-by-one and here's the first one.  I have a VI with a mathscript
    node and the VI, which loaded and ran fine in the 32-bit environment,
    is now broken and giving the error "mathscript node: an internal
    mathscript error has occurred."  My main concern - is mathscript not
    supported in 64-bit LabVIEW right now?
    I am attaching the VI.  Any ideas are appreciated.  I need to get this working.
    Also, NI, is there a special 64-bit forum that we should post to in the future, or create to post to?
    Sincerely,
    Don 
    Solved!
    Go to Solution.
    Attachments:
    sort.vi ‏753 KB

    From 2009 help
    LabVIEW MathScript is a text-based language you can use to write functions and scripts. You can process scripts using LabVIEW MathScript in the LabVIEW MathScript Window or a MathScript Node. When you create a LabVIEW MathScript, you must use supported data types.
    The MathScript syntax is an intuitive and logical
    syntax predominantly based on standard mathematical and computer
    programming terms, terms in widespread and common use, and/or
    descriptive abbreviations, truncations and concatenations of standard
    terms. The LabVIEW MathScript Window and MathScript
    Nodes are able to process files you create using the current MathScript
    syntax and, for backwards compatibility, files you created using legacy
    MathScript syntaxes. The LabVIEW MathScript Window
    and MathScript Nodes also can process certain of your files that use
    other text-based syntaxes, such as files you created using the MATLAB® software. Because the MathScript RT Module engine is used to process scripts in the LabVIEW MathScript Window
    and MathScript Nodes, and because the MathScript RT Module engine does
    not support all syntaxes, not all existing text-based scripts are
    supported.
    (LabVIEW 64-bit) LabVIEW MathScript is not supported in LabVIEW (64-bit).

  • Move code between MathScript Node and MathScript Window

    It seems like there should be some way to easily move between the MathScript Node, block diagram view and the MathScript Window.
    All I can find is saving to a script and reloading in the other view.
    Am I missing something?

    Hi wildcatherder,
    That seems to be the only way that I've been able to see to interface the MathScript Node and the MathScript Window.
    Is there a particular reason you're switching back and forth between the two?
    Regards,
    Joel I.
    Applications Engineer
    National Instruments

  • Mathscript node access to class data

    I am trying to implement some code which I developed in Matlab in Labview. The code uses functions from the Control and Optimization toolboxes, and looks like it will port easily to Mathscript. I need to parameterize a state-space model of several drugs from several parameter (age, height,weight, gender). I can see how to create an lvclass Patient with a control which uses these four parameters in the private data. I'd like to be able to duplicate the Matlab-style syntax of Patient.Age, etc, by just wiring the Patient object to a Mathscript node.  There doesn't seem to be a way to do this without unbundling first. This seems inelegant, as it requires me to hard-code the names of the private data fields in the mathscript node interface. Is there a simple way to define lvclass data in a class VI's mathscript node?
    Matlab 2008a, Labview 8.6, MacPro OSX 10.5. 

    Hello,
    The MathScript syntactical element you are referring to is a structure.  Unfortunately, we do not have support for structures or cell arrays in MathScript at this time.  It is a limitation we are aware of and investigating for a future release.    You have discovered the workaround.  You will need to unbundle your class data and create separate variables for each member variable in the MathScript node.
    Grant M.
    Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments

  • Is it possible to define a function in the MathScript Node

    Is it possible to define a function in the MathScript Node

    You can not define a function inside of a MathScript Node, but only because it isn't necessary. The way custom functions work in MathScript is that they are saved in .m files located in paths in the MathScript path list. When the MathScript compiler receives a function that it doesn't recognize, then it searches for it in the path list, and upon finding it, compiles and loads the function. You can specify these search paths manually by going to File>>MathScript Preferences from the MathScript Window or dynamically by using the path() command within a script.
    To answer your original question, if you would like to create custom functions dynamically within a VI, then you can simply build your custom functions using strings and then save them to an ASCII file with the extension .m. You could either save the file to a path already in the MathScript path list or you could dynamically specify the path by passing the path into a MathScript Node as a string and by using the path() command at the beginning of your script to set it.
    Kind Regards,
    E. Sulzer
    Applications Engineer
    National Instruments

  • I'm replacing my motherboard for ane9220yl pavilion elite. I'm looking for a wiring diagram

     I'm replacing my motherboard for HP pavilion Elite e9220yl. I need a wiring diagram to help me make sure I'm rewiring correctly.
    This question was solved.
    View Solution.

    That depends on what type of connection your display has and whether or not your PC has a video card used for display or if you are using the onboard video outputs.
    Do you really mean PC monitor ( the old school kind) or did you mean to say LCD display (thin flat screens) instead?
    Use the setup poster.
    ****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
    2015 Microsoft MVP - Windows Experience Consumer

  • How to call User defined functions in Mathscript Node ?

    Hi,
    I have created a user defined function and saved it to Search path of Labview as an M file. If I run my program in Math script window, the function is recognized and the program works properly. If I do the same with MathScript node , the user defined functions are not identified.
    Kindly help me with this problem. Thanks in advance
    Cheers
    Lenord Melvix

    This page may help:
    http://zone.ni.com/reference/en-XX/help/373123C-01/lvtextmathmain/caveats_recommendations_ms_search_...
    Kevin C.

  • How to use mathscript node in server side with the parameter from the client side

    I tried to develop a server/client system with some algorithms written in matlab. So I included a mathscript node on the server side. The client will send the parameter to the server. According to these parameters, the sever will call the matlab functions to do some computings and then send the results back to the client. The server has to wait for all parameters received before the computings. How do I know this since I only connect the parameter variables to the inputs of mathscript node on the server. The sever cannot know whethere these parameters are the new ones or old ones since the client may send parameters multiple times?

    It seems to me you have two perfectly good options to start with. You could send all possible parameters in a single packet from the client to the server. This could be in the form of a cluster or an array of values. If by server/client you mean you are sending data over the network, then you could flatten this data to string before sending and unflatten it on the other side. Since all parameters come in one packet, you know all the data is valid every time you send data.
    The other option is to send the parameters individually, but include some extra information such as a timestamp or iteration count. The server keeps reading and storing parameter values until a packet arrives with the next timestamp. Alternatively, you could include some information such as an end-of-parameter-list boolean that is sent with every parameter. It would be false until the last parameter packet.
    Give it a thought. There are lots of solutions.
    Jarrod S.
    National Instruments

  • How to implement a user-defined function in a mathscript node

    I am trying to use a mathscript node that includes self-defined functions, but I always get an error. I tried to run an NI-example: MathScript using Riemann Zeta.vi ,and I got the same error I get when I run my own programmes:MathScript Node'MathScript Node' (zeta): User-defined function contains an error. I didn't change anything in that example, so what could be wrong?

    Try the Mathscript forum instead. Good luck.
    (Maybe start reading this, for example)
    Message Edited by altenbach on 11-18-2009 01:48 PM
    LabVIEW Champion . Do more with less code and in less time .

  • Error converting DOM nodes into SOAP nodes

    Hi,
    i am doing an http call using http binding activity in oracle soa suite 11g.The http call requires some header information.When I pass the header information through headers in invoke activity and invoke the http call,I get an error " Error converting DOM nodes into SOAP nodes".What might be the reason and how to solve it.
    Naresh

    Hello,
    It appears your code is trying to repeat messagePart itself. Split Joins strictly adheres to a WSDL definition for incoming and outgoing messages.
    Instead of repeating <RootElement> which is defined as single occurance in your message definition within WSDL, you should find a way to tweak the WSDL to have "repetitive node which will become single message after split" within 1 Root element.
    This will call for having need of implementing transformation within split join based on need of target input message. Below is the example:
    WSDL contains:
    <wsdl:message name="inputMessageName">
         <wsdl:part name="partInput" element="rootElement"/>
    </wsdl:message>
    What your current xml structure is(please note how message itself is repeating below while it has been defined as single in wsdl, unfortunately there is nothing maxOccurs for message in WSDL definition , although you can define multiple parts but that is not case here):
    <soap:Body>
    <rootElement>
    </rootElement>
    <rootElement>
    </rootElement>
    <rootElement>
    </rootElement>
    </soap:Body>
    What Split-Join expects(If you have existing wsdl then you need to tweak it to conform to below kind of structure then use transformation within split join to convert it into correct xml structure for outgoing):
    <soap:Body>
    <rootElement>
         <repetitiveElementSpecificToIndividualSplitRequest/>
         <repetitiveElementSpecificToIndividualSplitRequest/>
         <repetitiveElementSpecificToIndividualSplitRequest/>
    </rootElement>
    </soap:Body>
    I hope this helps.
    Regards,
    Ankit

  • How to create Decision Node in Data Flow diagram under Process Model

    Hi,
    I am starting a new project and would like to use Oracle Data Modeler for my data flow diagrams and logical/relational diagrams. Could you please guide me how can I ask Decision question in data flow diagram. Ideallly i would like to create a Decision Node (diamond) in Data Flow diagram under Process Model with yes or no option.
    Thanks in advance
    JM

    Hi JM,
    may be you are looking for other notation. There is no dedicated decision node in data flow diagramming.
    Philip

Maybe you are looking for