Curve fitting gives input, at the output

Hi everybody, i am having a problem at curve fitting function,
i take at output, what i give as input, where do i make mistake?
at example i give 4 values, if i enter 6 values it works, but i need to do it with 4 values.
any ideas?
thanks
Solved!
Go to Solution.
Attachments:
curve fitting.vi ‏16 KB

Your function is a simple quadratic polynomial, so you should use the general polynomial fit function instead. Don't overcomplicate things
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • Can we use cl_gui_alv_grid to give input on the screen?

    Hi experts ,
        Can we use <b>cl_gui_alv_grid</b> to give input on the screen  and save the input in some internal table which is passed as a parameter with the calling method of
    cl_gui_alv_grid??
    Thanks in advance
    regards,
    Ashwin

    OR you want to can set any particular field by
          ls_fcat-edit = 'X'.
    in the field catalog for that field .
    Assign the points if it helps you ...
    Gaurang

  • Constrained nonlinear curve fit can properly handle the function like ln(1+b(x-xc)/a) ?

    Hi all,
    I met some problems about using constrained nonlinear curve fitting vi. It seems to me that this vi can't properly deal with the function like ln(1+b(x-xc)/a), a,b, and xc are the parameters, and b is in the range of 0 and -1. The reason I said that is as I used the other nonlinear fitting function in the other software, like Originlab, the fitting function can work properly.
    The error message from LV occurs as 1+b(x-xc)/a is less than zero. 
    However, due to a,b are both adjustable parameters, how could this situation happen ?
    Now I attach the vi files. The attachment includes main vi, mathmatical formula, and an input XY txt file.
    I appreciate any help or suggestion from you!!
    Here is the error message
    Joy
    Solved!
    Go to Solution.
    Attachments:
    LN-fitting.vi ‏21 KB
    LN-fittingmodel.vi ‏18 KB
    Book2.txt ‏1 KB

    Thanks for reply. whitenoiz 
    Actually I have more than 100 XY data set to test my vi. Some of the data set can be fit flawlessly. And the best fit parameters obtained from my vi are exactly the same as those from other analytical software, like OriginLab. In this case, I know my vi is valid. And in this scenario, I also found 1+b(x-xc)/a is always larger than zero with the best fit parameters (a and b). However, for certain XY data set, the error message will pop up if I use LV built-in vi, but I still can obtain the best fit parameters with OriginLab. And then I realized that error message always pops up as 1+b(x-xc)/a is less than zero, which it means to me that as LV built-in vi handles this type mathematical function, this built-in vi will encounter some difficulties. 
    I will step through my code, and also focus on the Matrix Left DivisionMV.vi, try yo find where the problem is.
    Best regards,
    Joy

  • I have made a prg in your fuzzylogic toloolkit but not able to give input and getting output through DAQ.

    I AM WORKING WITH LABVIEW 6.1.MY PROJECT IS "WATER LEVEL CONTROL"USING "PID"AND FUZZY CONTROLLER. MY PID CONTROLLER IS WORKIN.BUT FOR THE FUUZY CONTROLLER I AM USING YOUR "FUZZY LOGIC TOOLKIT"I HAVE MADE A PROGRAM IN IT. BUT I AM NOT ABLE TO GIVE MY INPUT THROGH DATA ACQUISTION.AND ALSO NOT ABLE TO GET THE OUTPUT(CONTROL SIGNAL).
    WHERE I CAN SEE THE ANSWER.

    Are you using NI's PID control VIs for your PID controller? Are you able to acquire any signals through your data acquisition? What I would suggest is that you try to run one of the shipping examples that comes with the Control Toolkit (perhaps the one titled, "Tank - fuzzy DAQ.vi"). Hope that helps.

  • To get input in the output form

    i need create a report and i should display the persons date of birth and i should get the values in output form how should i do this .i can fix the input in data module but i don't know how do give input in output form.

    How are you running the report ? Is it from Forms ? Are you reffering by "output form" ?

  • How to give input to the vi references

    I'm using vi server to call sub vis.Here by i attached the code.I want to pass one array control also ahile calling the vi.How to do that.
    Attachments:
    main1.vi ‏68 KB
    Horizontal_bar.vi ‏139 KB

    Thank u very much.
    --- Please don't call me "u". The word is "you".
    Whether can i use set control value in the case of call by reference node.
    When you CALL BY REFERENCE, you wire the terminals just as if you were calling it conventionally. Look in frame 2 of my demo.
    Also please clear me whether using run continously is an efficient mode or putting the login in a while loop.
    I have no idea about your "login", but "run continuously" is not a good idea for a finished program. It's intended for debugging, and testing subVIs, but not as a way of operating. For one thing you can't use it in a built application.
    If you need to coordinate several VIs, you need a global b
    oolean variable, called PROGRAM RUNNING" or something.
    Set it TRUE first thing, when the program starts, before you launch all the parallel VIs.
    Set it FALSE when the user clicks the QUIT button on the main panel.
    Each independent loop should check the value of this global and stop if it is TRUE.
    For making an exe file.which is the better way either making the exe of main appln or making exe of library which has alltogether all subvis."
    The library method is only useful if the library can be used by more than one main application. If you have one main application, then use the everything-in-one-file approach - it's easier on everybody.
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

  • What is the proper way to create a new line space int the output?

    I want to create a space in between each input so the output would look something like this,
    Name of item 1: lollipops
    Quantity of item 1: 10
    Price of item 1: .50
    Name of item 2: diet soda
    Quantity of item 2: 3
    Price of item 2: 1.25
    Instead of this:
    Name of item 1: lollipops
    Quantity of item 1: 10
    Price of item 1: .50
    Name of item 2: diet soda
    Quantity of item 2: 3
    Price of item 2: 1.25
    Here is my code:
    for (i = 1; i < 4; i++)
                   System.out.print( "Name of item " + i + ":");
                   name = keyboard.nextLine();
                   System.out.print( "Quantity of item " + i + ":");
                   quantity = keyboard.nextDouble();
                   keyboard.nextLine();
                   System.out.print( "price for item " + i + ":");
                   price = keyboard.nextDouble();
                   keyboard.nextLine();
              }I know i can use the an empty output statement but is there something that will make my code neater?
    Edited by: RandellK on Sep 27, 2009 6:23 PM

    Just use an empty println.
    It's a pretty common idiom and no messier than printing a newline.

  • Using bus in the Output channel

    Hi there, what's the deal with using the bus instead of Output ? In which case can we use this, in order of what?
    Thanks

    Are you referring to submixes, for example? Let's say you have 8 drum tracks. Select each of the drum tracks to (say) Bus 1 instead of Output 1-2. Now you can set individual levels of your drums, but control the overall level of your drums with the fader on an Aux object that has Bus 1 selected as its input. The output of the Aux would be 1-2.

  • Quadratic & cubic curve fitting ???

    I hope this is just a simple one :
    I need to do a curve fitting applet, what's the difference
    between quadratic & cubic curve fitting methods ???
    & how do I write such methods ???

    genetic algorithms... but that is far fromsimple...
    A bit over the top for what he wants!
    nah... 5 min job ;0)

  • 2 real-time plots + curve fits on the same x-y graph

    Hello all-
    Per the title, I'm trying to plot two series, both in real time, plus curve fits for each series on the same x-y plot.  Some background on the subject - this will be used to show the temperature distribution across a counter-flow heat exchanger.  So the x-y plot will plot temperature vs. position for two different flow streams - a hot flow stream, and a cold flow stream.  I would like to plot them both on the same graph so the temperature relationship between the two flows can be clearly seen.  If I can plot 2 series with simple lines connecting the points that would be fine, but would prefer some smoothing on the line or using a curve fit if that is possible to do in real time.
    A screen shot of my block diagram is linked below.  As you can see, the diagram is symmetrical with the inputs from the cold flow being processed on the top, and the inputs from the thermocouples in the hot flow being processed at the bottom.  I've got 2 issues:
    1.  Plotting 2 series on the same X-Y graph in real time.  (I've done this before, but never in real time).  Am I correct in assuming, if I append the array so it is a 3-D array (X, Y1, Y2), that I can plot both series on the same X-Y graph?  The individual X-Y graphs are functional, but I would like to combine them.
    2.  I've circled a bundle output which outputs the X,Y values of a curve fit.  The output here is a string (pink wire), so I cannot plot it on the X-Y graphs which are shown, due to it being 2 different data types.  Is there any way to plot the curve fit on the same graph?  Is LabVIEW capable of doing this in real time?
    Thank you for any help...   I realize that some of the answers here may be obvious, but visualizing what's going on in LabVIEW is a bit of a challenge for me, since I'm used to seing text-based code in VBA and MATLAB.
    Attachments:
    HX Block Diagram 2.jpg ‏302 KB

    The output you have circled is a cluster of two 1D arrays, not a string.
    XY graphs take a varirty of inputs (array of points, cluster of x and y arrays, complex arrays, etc.) but you cannot mix datatypes in a single graph. Since you are graphing arrays of points (a point is a cluster of an x and y scalar), you need to do the same for the data you circled. Simplest would probably be to just wrap an autoindexing for loop around the bundle function. See how far you get.
    If you want detailed help, please attach your actual VI. We cannot debug a picture.
    LabVIEW Champion . Do more with less code and in less time .

  • How can I pass the values to the variable by using INPUT ON from output

    HI,
        In this code I printed  s_number by using INPUT ON .
    In the out put I want to give the some new values to that field s_number.
    That new value I  pass to the another prgroam ZMAT_LABEL_FIRST .
          How could I pass this new  content to this program.  I wrote like this but I am not getting new content what I entered in the output.
    REPORT  ZMAT_LABEL_SCREEN_V1    NO STANDARD PAGE HEADING                    .
    PARAMETERS S_MBLNR TYPE MSEG-MBLNR.
    DATA C .
    DATA CNT TYPE I.
    DATA   S_NUMBER(3) TYPE C.
    DATA : BEGIN OF IT_MBELN OCCURS 0,
            MBLNR TYPE  MSEG-MBLNR,
            END OF IT_MBELN.
    DATA :  BEGIN OF IT_MSEG OCCURS 0,
            ZEILE TYPE MSEG-ZEILE,
            MBLNR TYPE MSEG-MBLNR,
            MEINS TYPE MSEG-MEINS,
            BPMNG TYPE MSEG-BPMNG,
            MAKTX TYPE MAKT-MAKTX,
            END OF IT_MSEG.
    DATA IT_FINAL LIKE IT_MSEG .
    data: it_ret like ddshretval occurs 0 with header line.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_MBLNR.
    SELECT MBLNR
           FROM MSEG
           INTO TABLE IT_MBELN.
           CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
             EXPORTING
             DDIC_STRUCTURE         = ' '
               retfield               =  'MBLNR'
              PVALKEY                = ' '
             DYNPPROG               = ' '
             DYNPNR                 = ' '
             DYNPROFIELD            = ' '
             STEPL                  = 0
             WINDOW_TITLE           =
             VALUE                  = ' '
              VALUE_ORG              = 'S'
             MULTIPLE_CHOICE        = ' '
             DISPLAY                = ' '
              CALLBACK_PROGRAM       = 'ZMAT_LABEL_SCREEN '
             CALLBACK_FORM          = ' '
             MARK_TAB               =
           IMPORTING
             USER_RESET             =
             tables
               value_tab              =  IT_MBELN
             FIELD_TAB              =
              RETURN_TAB             =  IT_RET
             DYNPFLD_MAPPING        =
           EXCEPTIONS
             PARAMETER_ERROR        = 1
             NO_VALUES_FOUND        = 2
             OTHERS                 = 3
           IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
           ENDIF.
    IF SY-SUBRC = 0.
    read table it_ret index 1.
    move it_ret-fieldval to S_MBLNR.
    ENDIF.
    START-OF-SELECTION.
    SELECT A~ZEILE
           A~MBLNR
           A~MEINS
           A~BPMNG
           B~MAKTX
           INTO CORRESPONDING FIELDS OF TABLE IT_MSEG
           FROM MSEG AS A INNER JOIN MAKT AS B
           ON AMATNR = BMATNR
           WHERE MBLNR = S_MBLNR.
    ****FINDING THE NUMBER OF RECORDS IN THE TABLE
    DESCRIBE TABLE IT_MSEG LINES CNT.
    at line-selection.
    DO CNT TIMES.
    READ LINE SY-INDEX FIELD VALUE C.
    IF C = 'X'.
    READ TABLE IT_MSEG INDEX SY-INDEX .
    ***HERE READ THE S_NUMBER(WHAT I ENTERED IN THE OUTPUT)  AND PASS TO THIS PROGRAM
    submit   ZMAT_LABEL_FIRST with p_mblnr = IT_MSEG-mblnr
                              with number =  S_NUMBER
                              WITH S_ZEILE =  IT_MSEG-ZEILE and return.
    CLEAR IT_MSEG.
    ENDIF.
    ENDDO.
    **********ALL ITEMS CORRESPODNING TO THE DOCUMENT NUMBER DISPLAY
    END-OF-SELECTION.
    LOOP AT IT_MSEG.
    WRITE : /10 C as  CHECKBOX,IT_MSEG-ZEILE,IT_MSEG-MAKTX,IT_MSEG-BPMNG,IT_MSEG-MEINS, S_NUMBER COLOR 5 INPUT ON.
    ENDLOOP.
    Regards,
    Surya

    Hi Surya..
    Change it like this ...
    START-OF-SELECTION.
    SELECT A~ZEILE
    A~MBLNR
    A~MEINS
    A~BPMNG
    B~MAKTX
    INTO CORRESPONDING FIELDS OF TABLE IT_MSEG
    FROM MSEG AS A INNER JOIN MAKT AS B
    ON AMATNR = BMATNR
    WHERE MBLNR = S_MBLNR.
    ****FINDING THE NUMBER OF RECORDS IN THE TABLE
    DESCRIBE TABLE IT_MSEG LINES CNT.
    at line-selection.
    <b>DO. </b>
    READ LINE SY-INDEX FIELD VALUE C
                                      <b>FIELD VALUE IT_MSEG-ZEILE.</b>
    <b>if sy-subrc ne 0.
      EXIT.
    ENDIF.</b>
    IF C = 'X'.
    ***HERE READ THE S_NUMBER(WHAT I ENTERED IN THE OUTPUT) AND **PASS TO THIS PROGRAM
    <b>CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      exporting
        INPUT = IT_MSEG-ZEILE
      IMPORTING
        OUTPUT = IT_MSEG-ZEILE .</b>
    submit ZMAT_LABEL_FIRST with p_mblnr = IT_MSEG-mblnr
    with number = S_NUMBER
    WITH S_ZEILE = IT_MSEG-ZEILE and return.
    CLEAR IT_MSEG.
    ENDIF.
    ENDDO.
    **********ALL ITEMS CORRESPODNING TO THE DOCUMENT NUMBER DISPLAY
    END-OF-SELECTION.
    LOOP AT IT_MSEG.
    WRITE : /10 C as CHECKBOX,IT_MSEG-ZEILE,IT_MSEG-MAKTX,IT_MSEG-BPMNG,IT_MSEG-MEINS, S_NUMBER COLOR 5 INPUT ON.
    ENDLOOP.
    <b>Reward if Helpful.</b>

  • How to send the output of the 1st BPEL process as a input to 2nd BPEL Proce

    Hi,
    I am working on OBPM 11G and my requirement is like below,
    From Mediator we need to call two different BPEL process. 1st one is Synchronous one and second one will be a one way interface. We need to call a java call out from Mediator and then give the output to the first BPEL process. The output from the first BPEL process has to be given to the second BPEL process with a filter condition.
    However we have achieved to call Java callout as well as call to two different BPEL process but facing issues in sending the output of the first BPEL process as a part of input to the second BPEL process.
    Any help on this would be appreciated.
    Bibhu

    Hi,
    Why do you need the third step, if the second step is a Numeric Limit Test step type, you can setup the limits of this step for your required limits of 11V and 12V. Your result is returned from your VI to Step.Results.Numeric which will be evaluated in the Status Expression giving you a Pass / Fail status.
    Look at the example TestStand\examples\demo\..\Computer Motherboard Test\computer.seq
    But to answer your reoriginal question, some additional information is required.
    What are your inputs and outputs assigned to in TestStand, do you use the Step properties, Locals, FileGlobals?
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • How to use the parameter "data" in the vi of Nonlinear Curve Fit

    I used "Nonlinear Curve Fit" to do state estimation. If I make the number of unknows a constant number, it is fine to code the fitting model for f(x,a). But if I want to code the number of unknows as a variable, how can I do this?
    Maybe "data" should be used here. But I just could not find any examples talking about how to use "data" here.
    Thanks.

    Hey hilary,
        Have you looked at the LabVIEW help for the Nonlinear Curve Fit VI?  Which version of LabVIEW are you using?  In mine, the VI is polymorphic, and you can declare the formula to be a formula string.  Then it provides pins to enter the input parameters programmatically.  Perhaps you could post a screenshot of how you are currently using the VI, and we could help more.
    Brian B
    Field Sales Engineer
    Tennessee/Southern Kentucky
    National Instruments

  • I have transefer function like (1/(s^2+s+​5)) and i have a square wave input , i want to use this transfer function with this input to see the output , how can i do that , with example please.

    i need to know also how to represent this transfer function in labview, try to send me example. answer me at my mail

    "st" wrote:
    > answer me at my mail
    give a valid e-mail first, and your name, we don't like to help anonymous
    people
    > try to send me example.
    how much do you pay ?
    > i have transefer function like (1/(s^2+s+5)) and i have a square wave
    > input , i want to use this transfer function with this input to see
    > the output , how can i do that
    First you have to know what you are doing, like an engineer : you have a
    Laplace, continuous time transfer function but LabView handles discrete
    signals only. Use matlab/simulink if you want to simulate continuous time
    systems easily...
    If you definitely want to use LabView, the first step is to discretize your
    continuous-time transfer function, i.e. decide a sampling rate and convert
    it to a "z transfor
    m". Then you can directly use the "IIR Filter.vi" as I
    said earlier.
    Philippe Guglielmetti - www.dynabits.com me at my mail

  • How can I connect the output of a BNC cable as a differential input to the SCB-68 block connector?

    The output of a BNC cable has two lines, one for my voltage data and one for the ground. I would like to use the differential input mode of the SCB-68 connector block and i m not sure if i have to connect the ground to AI0 and the voltage to AI7 or the opposite, and also what is the name of this channel when i have to configure it using Labview. The DAQ card i m using is the 6036E.

    Hi,
    Because it just measures the potetial difference between the 2 pins it does not really matter. i would stick with the +ve going to the first channel of the pairing and then the -ve going to the second. You then have to go into Measurement & Automation explorer and create a virtual channel. In here you right click data neighbourhood and create channel....go through the steps, I.E analog input, device type, input type as just a voltage....and then on one of the later screens it tells you the exact pins to connect the wires to and gives you the option to select RSE NRSE or differential input type....as you change the connection type the pins guidance changes accordingly. its quite straight fwd and very easy to follow using this wizard.
    Cheers
    Lee

Maybe you are looking for