HELP: Run-time array dimension in LabVIEW formula node

I need to dimension an array at run time within a formula node as follows:
int32 i,N;
N = sizeOfDim(inputArray,0);
float64 outputArray[N];
for (i = 0; i outputArray[i] = myfunction(inputArray[i]);
However, LabVIEW complains "Formula Node: index list expected". On the
other hand, if I say
float64 outputArray[1000];
LabVIEW is perfectly happy. But that's not what I need to do! Is there
an alternative
way of accomplishing my goal?
BTW, I've tried calculating N outside the formula node and then
presenting it as
an input with the same results. I've got a bad feeling that run time
array dimensioning
just isn't allowed.
TIA,
Hugh

Can't you just use the Initialize Array function outside the formula node and pass that instead?

Similar Messages

  • Run time error while installing Labview 8.6.1 in Vista x64

    hai friends,
               i got an error( Run time error) while installing Labview 8.6 software. this software has bought from NI. it shows the error path as setup.exe. this software i had tried to install in vista x64. but when i am installing the same software in windows xp, it is installing fine...so what was the problem for this error. how to solve it, please help me....

    Thank You Mr.Jason Daming,
    Same error what post Mr.muks referred in the last reply....
    When the installation begins an error occurs (after the acceptance of licence step in the installation procedure) with the title on the error window "Microsoft Visual C ++ Runtime Library " and displays the program set up path with these statements " This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information."
    while installing the same Labview in windows XP..... it is installing fine... but in vistax64 only i am facing this kind of problem...

  • Help - run-time visualization

    I need some advice on a project...
    I have to develop a run-time visualization tool that implements a 3x3 mesh topology and follows a distance vector routing algorithm.
    I have to graphically demonstrate the execution of the routing algorithm and execution of the sliding window between adjacent nodes, as well as operation of the go-back N approch.
    Anyone have hints on how to get started?
    I'm very new to swing.

    Can't you just use the Initialize Array function outside the formula node and pass that instead?

  • Run-time error R6025 exiting Labview

    After I modify a VI and/or Project, I exit from labview by clicking on file->exit. It will generate a R6025 run-time error. If I just open and close labview, this will not occur.
    I am running Labview 8.0.1 on windows XP.

    Humm…..
    Sorry to hear that the Norton configuration is locked down,
    because we have about half a dozen instances of this error occurring and all
    but one were fixed by changing the Norton settings.
    There are a couple of other questions that I didn’t ask but
    might be relevant if there is to be any workaround.  Are you running any VIs
    before closing LabVIEW, or just modifying them? 
    Does this happen on every VI you use, or just on a particular VI?  Is there anything else unusual about the
    development machine – do you have a different version of Win XP (such as media
    edition, or tablet)?  Do you have the
    same problem with other computers?  Would
    you be allowed to temporarily disable the script blocking in Norton while you
    work in LabVIEW?
    I don’t know what role (if any) NI Serial might have in
    this, but if you are interested in getting that driver, you can find it here: http://digital.ni.com/softlib.nsf/webcategories/85256410006C055586256BE600707F28?opendocument&node=1...
    Thanks again for the reply, let me know how things go-
    Travis M
    LabVIEW R&D
    National Instruments

  • Array index problem in formula node

    dear friend
    I'm trying to use formula node to solve a problem because I make this program using c at the begining.
    It runs perfectly in turbo c, but somehow it doesn't work in the formula node.
    I try to debug my source code, and I find that the formula node seems can't read the true value in
    the array.
    Here is the code in the formula node.
    int32 i,j,k;
    for ( i = 0 ; i < sopa; i++ )
     j = 1;
     ep[i][0] = pa[i];
     ep[i][1] = np[ep[i][0]][0];
     while ( ep[i][j-1] != exit )
      for ( k = 0 ; k < sonp ; k++ )
        if ( np[ep[i][j-1]][k] != -1 && (pc[ep[i][j-1]][ep[i][j]] + pc[ep[i][j]][exit] >= pc[ep[i][j-1]][np[ep[i][j-1]][k]] + pc[np[ep[i][j-1]][k]][exit] ) && (pc[ep[i][j-1]][np[ep[i][j-1]][k]] == org[ep[i][j-1]][np[ep[i][j-1]][k]] ))
          ep[i][j] = np[ep[i][j-1]][k];
      j++;
    This is the part that I think the problem might be.
    if ( np[ep[i][j-1]][k] != -1 && (pc[ep[i][j-1]][ep[i][j]] + pc[ep[i][j]][exit] >= pc[ep[i][j-1]][np[ep[i][j-1]][k]] + pc[np[ep[i][j-1]][k]][exit] ) && (pc[ep[i][j-1]][np[ep[i][j-1]][k]] == org[ep[i][j-1]][np[ep[i][j-1]][k]] ))
     ep[i][j] = np[ep[i][j-1]][k];
    I state that "np[ep[i][j-1]][k] != -1" but I do get the value -1 in the array "ep".
    Could someone tell me why I get -1 in the array?
    I hope I can finally do it all by labview not using formula node,but array like "pc[ep[i][j-1]][np[ep[i][j-1]][k]] "
    seems very hard to wire in labview. Could someone give me some good advices of doing this?
    Thanks for your help

    altenbach 已寫:
    normanshi wrote:
     ep[i][0] = pa[i];                                          (A)
     ep[i][1] = np[ep[i][0]][0];                            (B)
    ...    if ( np[ep[i][j-1]][k] != -1 && ... )          (C)
          ep[i][j] = np[ep[i][j-1]][k];                       (D)
    I state that "np[ep[i][j-1]][k] != -1" but I do get the value -1 in the array "ep".
    Could someone tell me why I get -1 in the array?
    I hope I can finally do it all by labview not using formula node,but array like "pc[ep[i][j-1]][np[ep[i][j-1]][k]] "
    seems very hard to wire in labview. Could someone give me some good advices of doing this?
    There are many possible scenarios to get a -1 in the ep output. For example if the -1 gets already written in step (A) or (B) at a certain index, and that index does not get overwritten in step (D). You are indexing all over the place! Is there some bounds checking on the array contents? What are typical inputs and array sizes?
    I'm sure about that the -1 doesn't get already written in step (A) or (B) because ep[i][0] and ep[i][1] is fine. What really makes me confuse is that sometimes ep array has the value like this.
    That means it does overwritten some value in step (D). The -1 should never be written into it because I have already state that np[ep[i][j-1]][k] != -1. Somehow I still get -1,and this is really strange! I'm indexing all over the place becuase I can't figure out a better way to achieve my requirement.
    I think I should briefly tell you what I'm trying to do. In this program,I input some values which means the distance from one point to another. Then I use floyd's all pairs shortest-path algorithm to find all the shortest distance. Finally I want to find out the "shortest path". I mean like from point 4 to point 0,the shortest path might be like 4 -> 2 -> 1 -> 0, and what the formula node part do is trying to find out this "shortest path". Maybe you can give me some better advice of doing this, I have been thinking a better way to do it for about two months. I think I'm really not good at this.
    I try to do it all by labview ,but again I get a strange problem. This time the ep[i][j-1] doesn't get the correct value. In the first time i=0 j-1=0 ep[i][j-1] = 1,but the second time i = 0 j-1 = 1 ep[i][j-1] = 0. This makes the "ep[i][j-1]!=exit" get the incorrect boolean value. The ep[i][j-1] should be 2,not 0. I try to use highlight to find if I make any mistake, but I can't one.This is the input and I put the labview program in attached file (temp4.vi).
    Could you help me find out why this happened?
    Thanks for your help altenbach!
    由 normanshi 在 08-19-2006 10:06 PM 上編輯的訊息
    Attachments:
    temp4.vi ‏191 KB
    ep.jpg ‏10 KB
    input.jpg ‏9 KB

  • How do I get an array output on a Formula Node?

    My problem is simply that I cannot figure out how to get an output on a Formula Node to be an array. Documentation states that "you must declare local arrays and output arrays in the Formula Node" but doesn't say anything more than than. Attempts to put something like "float32 out[100];" for an array output called "out" fail.
    If anybody knows how you can do this or even knows if it is possible I would appriciate your help.
    Thanks,
    Naveen

    I found a typo in the formula node I was doing that was making the output not be an array. I don't think I was getting the error before but I was going to put together an example VI to attach here and I found it. So, thanks for your help even tho it was a stupid little mistake on my part.

  • How do I determine array size in a formula node

    I am feeding an array into a formula node to perform an operation on. However the size of the array can be an arbitrary size. How can I determine its size to use for iterating through a for loop?
    I suppose that I could add another input that is fed with the array size from the array palate but I would like to know if it can be done inside the formula node itself.

    Your own advice is the only and best one.
    greetings from the Netherlands

  • Run-time engine problem in Labview 2009 and Labview 2010

    I have a problem with Labview 2009 and Labview 2010. I updated my Labview 2009 into 2010. But it turned out to be a trial one, because i did not have the serial number. So I uninstalled the Labview 2010. however, the funny stuff came over. I cannot use my Labview 2009. So i uninstalled Labview 2009 again. But eventually, I could not reinstall Labview 2009. Every time i had a runtime error and i could not proceed with the installation. in addition, any installation  related to Labview is not permitted and the same error came up every time. it is very annoying.
    So, What is the deal?
    I attached the error here. Any comments or advice are welcomed and appreciated.
    Attachments:
    error.docx ‏2305 KB

    By chance is this machine's language set to any non-English locale?  You would check the locale setting by:
    Opening Control Panel.
    Opening "Regional and Language Options".
    Looking Under "Regional Options" >> "Standards and Formats"
    If it is set to something besides English, trying setting it to English and please report back what locale it was set to (or if this even solves the problem).
    Regards,
    - WesW

  • Integrating an NI-USB 8451 driver and Labview Run-Time Files in an installation package of a .vi application

    Hello,
    I've built a .vi which uses the NI-USB 8451 device (please see http://sine.ni.com/nips/cds/view/p/lang/en/nid/202368), and I would like to create an installation package to be used on a costumer's PC, which has no Labview installed on or a driver for this device.
    I would like to have this installation as a completely stand-alone setup, so that the user could take this file and run it, and have the driver to the 8451, the run-time files for the Labview application installed by themselves,  and have the .exe file working on a completely "clean" PC.
    How can I integrate it all in one package ?
    Thanks,
    Michael.

    Nice hearing from you again, Ipshita
    I do not call any dll's currently, but am using the driver of the USB device, NI-USB 845x, version 1.0.1
    Now, I would very like to make the use of my application, by another user, with no Labview or this driver on his PC, as simple as possible.
    I just thought that maybe I could create an .EXE file with some Labview created dll's, which this executable would use, and spare the need of the 845x Driver or Labview Run-Time library prior installation. I could be wrong.
    What should I do ?
    P.S.
    Meanwhile, I've been playing with the Application Builder and tried to create an installation with the Driver and the Labview Run-Time.
    It had started the compile, but stopped with the following pop-up window: "Locate the 'NI-845x Software 1.0.1' distribution. Labview needs to copy a component installed or updated by the distribution..."
    (Attaching the pop-up window below)
    What is it looking for and where can I find it ?
    Thanks,
    Michael.
    Attachments:
    Installation_pop-up.JPG ‏20 KB

  • Why does "NI LabVIEW Run-Time Engine 6.1" window appear when I start LabVIEW?

    it also prompts "insert the 'NI LabVIEW Run-Time Engine 6.1' disk.
    Attachments:
    windows.jpg ‏26 KB

    Hi,
    There can be many reasons why this error would appear. Most probably, you have a broken installation of the Run-Time engine.
    Just reinstall the run-time engine from the LabVIEW 6.1 CD. You can also download it from our web site:
    LabVIEW Run-time Engine Version 6.1 for Windows 95/98/NT/2000/ME/XP
    Zvezdana S.
    NAtional Instruments

  • Can I create array inside formula node

    I need to create and use array (multidimensional) inside a formula node. My LabVIEW version is 5.1.The input and output from/to formula node do not necessarily being array. Thank you.

    You need to declare a variable to be an array. To declare a multidimensional array of 32 bit intergers enter this:
    int32 VarName[x][y];
    Where x=1st dimension size (rows) and y=2nd dimension size (columns). You can then operate on this like you would an array in a text based language. Try the entering the example below in a formula node.
    int32 i;
    int32 y[5][2];
    for (i=0;i<5;i++)
    y[i][1] = x[i]+1;
    Where y is an output and x is an 1D array input.
    Hope this helps...
    Brian

  • Array output from formula node

    How to get an array output from the formula node.I am trying to use a for loop inside the formula node and want an array output.

    You cannot place a For or While Loop inside the formula node.
    Here is what the Help Description says about the syntax inside the Formula Node:
    Formula Node
    Evaluates mathematical formulas and expressions similar to C on the block diagram. The following built-in functions are allowed in formulas: abs, acos, acosh, asin, asinh, atan, atan2, atanh, ceil, cos, cosh, cot, csc, exp, expm1, floor, getexp, getman, int, intrz, ln, lnp1, log, log2, max, min, mod, pow, rand, rem, sec, sign, sin, sinc, sinh, sizeOfDim, sqrt, tan, tanh. There are some differences between the parser in the Mathematics VIs and the Formula Node.
     Place on the block diagram
     Find on the Functions palette
    Refer to Creating Formula Nodes and Formula Node Syntax for more information about the Formula Node and the Formula Node syntax.
    Note  The Formula Node accepts only the period (.) as a decimal separator. The node does not recognize localized decimal separators.
    <SCRIPT type=text/javascript>if (typeof(writeVarRefs)=="function"){writeVarRefs("763");}</SCRIPT>
    <SCRIPT type=text/javascript> if(typeof(lvrthelp763) != "undefined"){document.writeln(lvrthelp763)}</SCRIPT>
    <SCRIPT type=text/javascript> if(typeof(lvfpga763) != "undefined"){document.writeln(lvfpga763)}</SCRIPT>
    <SCRIPT type=text/javascript> if(typeof(lvemb763) != "undefined"){document.writeln(lvemb763)}</SCRIPT>
    <SCRIPT type=text/javascript> if(typeof(lvpdahelp763) != "undefined"){document.writeln(lvpdahelp763)}</SCRIPT>
    <SCRIPT type=text/javascript> if(typeof(lvtpchelp763) != "undefined"){document.writeln(lvtpchelp763)}</SCRIPT>
    <SCRIPT type=text/javascript> if(typeof(lvblackfin763) != "undefined"){document.writeln(lvblackfin763)}</SCRIPT>
    <SCRIPT type=text/javascript> if(typeof(lvdsp763) != "undefined"){document.writeln(lvdsp763)}</SCRIPT>
    Example
    Refer to the Create Function with Formula Node VI in the labview\examples\general\structs.llb for an example of using the Formula Node.

  • Check marks or dynamic items for run-time shortcut menus

    Labview version: 8.0
    I'd like to create a run-time shortcut menu for my Xcontrol, that would
    allow user to toggle between two states of the control. Is it possible
    to either
    1) dynamically apply check marks to run-time shortcut menus or
    2) dynamically modify the run-time shortcut menu content
    Tomi
    Tomi Maila

    Hi Tomi,
    Great question.  Yes, you can do what you want with run-time shortcut menus in LabVIEW 8.0.  If you want to dynamically modify the menu content, you have to do it in the "Shortcut Menu Activation?" event in the facade VI of the XControl.  In the event data for this event is a parameter called "MenuRef" which works with the same menu primitives that have been around since LabVIEW 5 for editing the menu bar at run-time. 
    With these primitives, you can add/delete/modify menu items to the shortcut menu.  The items that are already in the MenuRef when this event case executes are always the ones that are statically defined, either by LabVIEW or by customizing them.  You do not have control over the state of the items that LabVIEW adds, but you can remove them and add ones with the same text (just with a different tag).  In your case, you would probably want to use the Insert Menu Item primitive to add an item such as "Toggle State".  Give it a tag such as "USER_TOGGLE_STATE".  Then you'll want to use the Set Menu Item Info primitive to set the checkmark for that item based on the state of the XControl.
    Then, you'll need to add an event case for the "Shortcut Menu Selection (User)" event so you can handle the item being selected.  Wire the Item Tag parameter from the event data to a case structure and add a case to look for "USER_TOGGLE_STATE".  And in that case, toggle the state of your XControl.  That's all you need to do!
    The Dual Mode Thermomter shipping example in <LabVIEW 8.0>\examples\general\xcontrols\Dual Mode Thermometer\Simple Dual Mode Thermometer XControl.lvproj is a simple example of how you can modify the menu and respond to the items selected.  It's a little different than what you want to do, but it might help you to look at it.
    Good luck!  Let me know if you have questions.
    Robbie

  • Necessity of a run time engine

    Can anyone tell me whats the detailed concept behind the necessity of installing the labview run time engine along with a labview application to make it work?
    veena.

    "Veena" wrote in message
    news:[email protected]..
    > What i wanted to know was what does a run time engine exactly does and
    > whats its necessity? I havent explored the versions compatibility
    > parts...am new to labview and exploring various things theoretically
    > and practically, since I cant find a particular place or book that
    > gives a overall view, and theres only manuals available for now...
    > Veena
    I'm taking a guess here, Labview is an interpreted language and that means
    it needs something to convert the labview code into machine instructions,
    the converter is the Labview runtime engine.
    I think even if you create a *.exe file you need the runtime engine to run
    it. I don't have the full d
    evelopment version though so don't quote me on
    that.
    If you look in the help index for run-time engine you will find this answer
    "Using the LabVIEW Run-Time Engine
    If you create a system using LabVIEW that runs applications or shared
    libraries, then you must install the LabVIEW Run-Time Engine. The LabVIEW
    Run-Time Engine includes the libraries and other files necessary to execute
    LabVIEW-built applications and shared libraries. All client computers
    running LabVIEW-built applications and shared libraries must also have the
    LabVIEW Run-Time Engine installed.
    The LabVIEW Run-Time Engine also includes a browser plug-in that allows
    clients to view and control VI front panels remotely using a browser.
    All applications and shared libraries built with a particular version of
    LabVIEW will share the same LabVIEW Run-Time Engine installation, so only
    one installation is required. If you use applications or shared libraries
    that you create with different versions of LabVIEW (for example, 5.1,
    6.0,
    and so on), you must have the Run-Time Engine for each version of LabVIEW
    installed on the system.
    You can find an installer for the LabVIEW Run-Time Engine on your LabVIEW
    CD. "

  • Formula node help?

    I am new to Labview and I'm trying to calculate an area based on the a formula.  The error message says array indexing expected, but I don't have any arrays feeding into the formula node.  Does anyone know how I could fix this?  Here's a snapshot of the block diagram.  Thanks! 

    Check the width of the wire going as input to 'd'... that an array...!!
    It might contain just one element or may be multiple elements...!! So use 'Index Array' and convert it into a scalar value...!!
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

Maybe you are looking for

  • Close an A/P Reserve Invoice

    Hi, How can I close an A/P Reserve Invoice? It has been posted with 1 item perfectly correct but by mistake with 2 items with quantity of 200 and unit price of 0 (to adjust for total - instead of deleting the lines 2 and 3). Line 2 and 3 of this PO h

  • Support for multiple core?

    Does GarageBand support multiple-core processors? In other words, would it take advantage of the multple cores the new MacPro offers?

  • IWeb '09 Random Font Issues

    Saturday, February 7, 2010 Hello, For my website, I am using Arial as my font. For some reason, only certain pages are having font issues once published. The published Arial fonts are changed to Times and also decreased in size. I've been trying to f

  • Migration Assistant killed my system...

    ...I think. I created a new partition on my Mountain Lion-driven iMac's drive and installed a fresh, unadulterated Mavericks on that barren partition. I left it at that, choosing not to migrate most of my data-driven life for the time being. I primar

  • Cannot print from Blackberry Blend for the Classic

    It would be nice to print emails from Blackberry Blend.  Curently you cannot print anything.  Will this feature be implemented in the future?