Formula node error

Error using formula node with non-linear fitting VI.
I am using LV 2011 on windows XP.
Using Nonllinear Curve Fit.vi.  I have used this before successfully.I am using the "formula string" instance of this polymorphic VI.  When I run my program using the formula string "b0+b1*x", it runs fine and give sensible results.  When I use the formula string "b0+b1*x+A1*x^2" I get the error message "Error -23083 has occurred at an unknown location. Analysis: Bracket problem at the end."
Attached screenshots show part of the block diagram that wrorks (lv0.bmp) and ppart of the block diagram that does not work (lv1.bmp).
Thank you.
Attachments:
lv0.jpg ‏23 KB
lv1.jpg ‏39 KB

Thank you Dennis. It turns out the "caret" ("^") operator is OK here, and is raising a number to a power, as desired.  The problem was that I used an uppercase letter in a variable name.  Not allowed!  Nor can variable names have have two letters, although that wasn't the problem in my example. (It was a problem in some of my other attempts.)

Similar Messages

  • Formula Node error: left brace required ???

    Hi,
    I'm trying to use a formula node to do a simple line calculation. However I'm receiving this error and I'm not sure why.
    Formula Node: left brace required
    Error on line 1 is marked by a '#' character: "y = 0.0183*x -# 0.2982;"
    I've tried replacing the y-intercept with a variable, but the same error results.
    Anyone know what to do?
    Thanks in advance.

    What version of LV are you using? The formula:
    y = 0.0183*x-0.2982;
    works perfectly fine in V6.0.2...
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Formula node error: missing left parenthesi​s

    Hi guys
    I am new on labview and i am strugling to right a bit of code.
    I am using formula node and i keep getting the error as above on the title moreover it displays: Error on line 5 is marked by a '#' character: "     for   {# H = 00.00.00 to  H = 06.00".
    I am attaching my file so that if you can give me a hand you could have a brief look.
    Thank you
    Solved!
    Go to Solution.
    Attachments:
    time_look up test.vi ‏14 KB

    Hi inaslab,
    still your formula node doesn't make sense: You still overwrite the value for H in the first FOR statement...
    What you want is either an IF-THEN-ELSE or a SWITCH/CASE construct like "IF (H>=0 AND H<6) THEN...". Right-click the formula node, select help, select formula node syntax !
    And I'm even more convinced a standard LV case structure will be much more reasonable here: just wire H to the selector input...
    Message Edited by GerdW on 10-29-2009 11:29 AM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Formula node error: missing left parenthesis

    Im trying to compute a simple function in a formula node, I recieve the following errors:
    Error on line 1 is marked by a '#' character: "X3=sin**#2(2*T);"
    Error on line 1 is marked by a '#' character: "X5=(cos**#(2)(T);"

    Has anyone else noticed the name of this guys VI ?
    Thoric (CLA, CLED, CTD and LabVIEW Champion)

  • Formula node error: missing right parenthesis

    Hi NI community,
    I am working with the formula node structure for the first time and I came along this error which I can't fix.
    It says it finds a # character, but the strange thing is that there is no character. Is there anyone who can help me with this one please?
    Kind regards
    Thomas Ruts
    Solved!
    Go to Solution.

    You are missing a right parenthesis on your first long formula.  It is in the last half of the formula.  You have two left parenthesis, but only one right.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Error on Formula Node :Error on line 1 is marked by a '#' character:

    Hey!!
    This is a part of my prog..
    Whats the problem with the prog?
    Error on line 1 is marked by a '#' character: "y=[#uvl*50+(ul+ull+utlll)*40+(um+umm+umm"
    Attachments:
    Formulanode.vi ‏7 KB

    you did not define "n" or "d". You can declare them in the formula node code, or even easier, just add outputs with these names.
    (What is your obsession with formula nodes, why not use wires instead? This is LabVIEW! )
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    Formulanode1MOD.vi ‏7 KB

  • Formula node: Else if

    I want to use a formula node to make my code smaller.
    I'm comparing a sensor value and depending on the value i have 3 options.
    At the moment i get the error that labview thinks my 'Else if ' is a variabel instead of a command.
    am i doing something wrong? another option is to use a Case-structure but this code is allready in a case so i don't know if this could give trouble.
    thanks,
    Lars
    Attachments:
    Formula Node Error.png ‏53 KB

    Hi James,
    when you want to mix datatypes you go with an 1D array of cluster and unbundle instead of the 2nd IndexArray…
    Waiting for Christian to post with 1 compare function using a complex number that makes even your look big and a Rube
    My own idea:
    Just one comparison…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Formula node, keep getting errors

    I am trying to integrate a formula node into an array, I keep getting errors and don't know why. Any ideas?
    Thanks!
    Solved!
    Go to Solution.
    Attachments:
    trial7.vi ‏42 KB

    That is a better attempt.
    The problem is that you only defined your output y array to be a 1-D array.  And your math on the input array is also acting like it is a 1-D array.
    See the attached modification.
    But your formula is simple enough that doing it in real LabVIEW code is easier and you don't have to deal with syntax problems of the formula node.
    (Note, since I don't have your data, I couldn't run this, so it is possible there are errors.)
    Attachments:
    trial7MOD.vi ‏57 KB

  • Why do I receive Error -23088 when using the Eval Formula Node.vi (LV6.1)?

    Hi,
    I want to evaluate formulas like x=v>20; with that vi. When typing the
    same formula into an normal Formula Node I get the correct answer. When
    changing the formula into x=v+20; the eval Formula node.vi works fine.
    But whenever I try to resolve a boolean function like that mentioned
    above, I receive that f****n Error! Why this? What can I do? Is the Eval
    ... .vi less powerfull than the normal node?
    Thanks for your help,
    Daniel

    Joel A wrote:
    > I think the boolean (binary) ops are the only difference between the two nodes.&nbsp; I pulled this from the help:
    > Formula Node and Expression Node Functions
    >
    > The following list contains the names of the Formula Node and Expression Node functions, and their descriptions. Except for the binary functions, you also can use these functions with <a href="gmath.chm::/Parser_VIs.html" target="_blank">Formula VIs</a>. All function names must be lowercase. You also can use <a href="mk:@MSITStore:C:\Program%20Files\National%20Instruments\LabVIEW%208.0\help\lvhowto.chm::/Precedence_of_Operators_in.html" target="_blank">operators</a> and the pi constant in Formula and Expression Nodes.
    > Start at the help above, and see if you can find any helpful information.
    > &nbsp;
    > &nbsp;
    > J
    Thanks for help,
    I solved the problem by using the "Parse Arithmetic Expression.llb" from
    examples. You can modify it and add the operators you need..

  • PV cell equation error in formula node

    Hi! I am currently building a PV system simulation in LabVIEW with maximum power point tracking, and I'm trying to make this VI work using the formula node but I can't run it due to an "array indexing problem". The VI is based on the LabVIEW's toolkit for IV characterization using the equation for the PV cell current. I added the XY graph to graph the current and voltage from the equation. I'm really new to LabVIEW, so any suggestion will be greatly appreciated. I  have attached the VI I'm building.
    Solved!
    Go to Solution.
    Attachments:
    eqn_based.vi ‏11 KB

    Hi spectre,
    the formula not cannot calc with arrays the way LabVIEW does:
    (Check for correct computation against given formula...)
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Formula node calculatio​n error

    Hi all,
    I am expecting the output of formula node as the value of "c" input variable. but it outputs NaN.  I am attaching jpeg file illustrating that.
    Clarification would be appreciated.
    Kousy
    Attachments:
    Formula 1.JPG ‏21 KB

    Hi Kousy,
    look at attached example...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    Interpolate_threshold.vi ‏15 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.

  • File Handling in formula node

    Hello All,
    I am trying to open a file and write some data to a file within the formula node. A declaration like
    file *in;
    produces this error:
    Formula Node:undefined variable.
    Error on line 1 is marked by a '#' character: "file# *out;"
    How does one do file I/O operations within the formula node?
    Thanks,
    KB

    Hello KB,
    it seems you are trying to write a LabView program by
    inserting C-code into a formula node... That's not the way it should be.
    As far as I know there is no way to open a file inside the formula node. (It's a "formula" node!) So you have to open the file with LabView for reading and/or writing. Use your prefered subVi from the file palette. Perhaps you have to convert the data to a format suitable for your formula node (like string to U8-array).
    In my experience it's better to use Labview-code instead of the formula node. In my programs a formula node was always slower than Labview code. So you should think about converting the C-style code to Labview.
    Best regards,
    GerdW
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Parenthesis in formula node

    I'm using the formula node and it appears that parenthesis don't work. Is this correct? What is the order of operations?
    The Formula Node Syntax page in the help is extremely brief and sparse, bordering on useless for anyone that doesn't already now what is going on. Is there a more thorough description of the Syntax anywhere?

    Thanks Dennis,
    The error is just an incorrect calculation.
    I put together a simple node and parenthesis did work. So something else must be amiss. I stripped down my VI and equation and made two formula nodes implementing the same equation with and without parenthesis. One gives an exponential decreasing curve, the other a constant array. Where is the error?
    Attachments:
    parenth_ex.vi ‏49 KB

  • For loop in formula node

    Hi,
    I wanna do some signal processing after I got the magnitude and phase infos from FFT. But the errors say that there is undefined variables.  I am just wondering that here absP and angleP are both vectors. Can I express them like what I did in the attached vi? 3x.
    Huihui
    Attachments:
    Untitled 12.vi ‏9 KB

    Hi huihui,
    do you just want to know the real and imaginary values of your signal?
    Why use formula node at all?
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    Untitled 12.vi ‏13 KB

Maybe you are looking for

  • Apache2 problems

    I recently attempted to enable cgi and php on my macbooks local webserver. In attempting to do this, my entire server stopped working. When I try to access the local site, I get the following error: Though the site seems valid, the browser was unable

  • Is there a way to cycle a while loop on its own and only controlled by the number of cycles?

    Hello everyone,  Newcomer here, recenlty just took core 1 and 2 the past couple of months is there a way to cycle my while loop so that the daq assist receives the same outputs from the list box table? So pretty much I need the VI to be able to read

  • How to update a auto increment record

    Hi all, I just figured out a way to insert auto increment record, but there is still one problem to solve which is how to do the update of the auto increment record, because after I get the db record, I don't know if there is a way to get the associa

  • How do find out failure in invoking a partner service from BPEL

    Helllo, When running my SOA composite I encountered the following error. I haven't found out how to find out what exact host:port it is trying to hit and failed. Does anyone know how to find out this info or from which deployment/admin interface can

  • How to update address fields from a different view?

    Hello Everyone, I have created a context node(Model Attribute) of standard address fields using BuilAddress in a view that doesn't have it and successfully displayed them. This is contacts view where the original address of the contact is not availab