How to pass waveform chart in a loop in a sub vi to calling vi

It has been awhile since I made my last application.  It has escaped me how to run a VI with a loop in it as a sub VI and still pass the waveform chart up to the calling VI.  I am trying to use the Bridge Continuous example as a sub VI and pass that waveform chart up to the calling VI that selects which load cells to monitor.  But when i run the calling VI it stops at the sub VI with a green arrow.

Your acquisition needs to run in parallel with your main loop.  You should also use a queue or notifier to send that parallel process commands (like to stop).  I would use a User Event to send the data from your aquisition to your main loop's event structure.  You can then update the chart inside of the event structure.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines

Similar Messages

  • How to take waveform chart data and put it into an array

    Hello all,
    I am new to programming in Labview, and am learning basically by watching youtube video and such. My question is how to take a set of random data that I have written code for and linked to a waveform chart, and put the data into an array so I can calculate the mean of the data set. If there is an easier way to calculate the mean of the data set I am all ears, but I need to be able to display the mean on the front panel each time the code is run. I have attached a file of my code.
    Thanks
    Attachments:
    CA1.vi ‏11 KB

    Welcome.
    If you have not done so, look at the on-line tutorials on Getting Started with LabVIEW on the NI web site.
    A chart has a property known as History which retains some previous values.  You can get access to the the History property by popping up on the block diagram terminal of the chart and selecting Create >> Property Node. Note that the history length can be set via a pop up menu.  The default length is 1024.
    Other comments: When you know the number of iteration in advance you should use a for loop rather than the while loop.
    You can also use an autoindexing tunnel at the boundary of the loop to create an array. It only contains the values from the current run, unlike the chart history which can retain values between runs (as long as the VI remains in memory). Watch the two Mean indicators as you run this VI several times.
    The error wire is to assure that the history property node runs after the loop.  Disconnect the wire and watch the Mean and Mean 2 indicators carefully.
    The Wait is to slow things down a bit so that you can see what is happening.
    Lynn
    Attachments:
    CA1.2.vi ‏11 KB

  • How to clear waveform chart

    How i can clear a waveform chart with dynamic datas? The normal procedure with handover a empty array doesnt work.
    Uwe Augst
    Muehlbauer AG
    Germany

    Hi,
    here´s a small example with a property node (Historie), everytime you restart that VI, first the chart is cleaned up and than refilled again.
    Hope this helps,
    AlexMessage Edited by Alex R on 05-03-2005 11:18 AM
    Attachments:
    Clear Waveform-Chart.vi ‏21 KB

  • How to set waveform chart to start data since beginning of run

    Solved!
    Go to Solution.
    Attachments:
    TCs.vi ‏106 KB

    You need to check the update mode of your chart.
    Strip Chart—Shows running data continuously scrolling from left to right across the chart with old data on the left and new data on the right. A strip chart is similar to a paper tape strip chart recorder. Strip Chart is the default update mode.
    Scope Chart—Shows one item of data, such as a pulse or wave, scrolling partway across the chart from left to right. For each new value, the chart plots the value to the right of the last value. When the plot reaches the right border of the plotting area, LabVIEW erases the plot and begins plotting again from the left border. The retracing display of a scope chart is similar to an oscilloscope.
    Sweep Chart—Works similarly to a scope chart except it shows the old data on the right and the new data on the left separated by a vertical line. LabVIEW does not erase the plot in a sweep chart when the plot reaches the right border of the plotting area. A sweep chart is similar to an EKG display.
    From the help menu:
    The waveform chart maintains a history of data, or buffer, from previous updates. Right-click the chart and select Chart History Length from the shortcut menu to configure the buffer.  The default chart history length for a waveform chart is 1,024 data points. The frequency at which you send data to the chart determines how often the chart redraws.
    Attachments:
    resp2.jpg ‏36 KB

  • How to pass parameter to cursor for loop having table type?

    Hi Friends,
    I am wondering how to pass a parameter into second for loop in the example code below.Please see the bold statements and answer my queries.
    Thanks a lot .Here is the code .
    declare
    l_bom_header_tbl BOM_BO_PUB.BOM_HEADER_TBL_TYPE ; ---TABLE TYPE
    V_bom_header_tbl Bom_Bo_Pub.Bom_Head_Rec_Type := Bom_Bo_Pub.G_MISS_BOM_HEADER_REC; ---Record type
    v_bom_components_tbl Bom_Bo_Pub.Bom_Comps_Tbl_Type := Bom_Bo_Pub.G_MISS_BOM_COMPONENT_TBL;---nested table type
    c:=0 number ;
    k:=1 number ;
    begin
    BOMPXINQ.Export_BOM(
    P_org_hierarchy_name => l_org_hierarchy_name,
    P_assembly_item_name => l_assembly_item_name,
    P_organization_code => l_organization_code,
    P_alternate_bm_designator => '1Test',
    P_Costs => l_costs,
    P_Cost_type_id => l_cost_type_id,
    X_bom_header_tbl => l_bom_header_tbl,
    X_bom_revisions_tbl => l_bom_revisions_tbl,
    X_bom_components_tbl => l_bom_components_tbl,
    X_bom_ref_designators_tbl => l_bom_ref_designators_tbl,
    X_bom_sub_components_tbl => l_bom_sub_components_tbl,
    X_bom_comp_ops_tbl => l_bom_comp_ops_tbl,
    X_Err_Msg => l_Err_Msg,
    X_Error_Code => l_Error_Code);
    if l_Error_Code = 0 then
    for i in 1 .. l_bom_header_tbl.COUNT LOOP
    V_bom_header_tbl.organization_code :='DSC';
    Can we assign a table type to record type like below statement?
    V_bom_header_tbl.assembly_item_name:= l_bom_header_tbl(i).assembly_item_name ;
    k:=1;
    I want to pass parameter  l_bom_header_tbl(i).assembly_item_name  into the for statement below: How to achieve this?
    for j in 1 .. l_bom_components_tbl.COUNT LOOP
    Can we assign a table type to table  type like below statement?
    v_bom_components_tbl(k).Assembly_Item_name := l_bom_header_tbl(i).assembly_item_name ;
    k := k + 1;
    end LOOP;
    end loop;
    end;
    Edited by: ILovePlSql on Mar 22, 2010 7:51 AM
    Edited by: ILovePlSql on Mar 22, 2010 8:16 AM

    ILovePlSql wrote:
    V_bom_header_tbl.assembly_item_name:= l_bom_header_tbl(i).assembly_item_name ;
    v_bom_header_tabl is a record type and l_bom_header_tbl is a table type .So is the above statement ok?I asked you for type definition. Please provide definition of BOM_BO_PUB.BOM_HEADER_TBL_TYPE and Bom_Bo_Pub.Bom_Head_Rec_Type. If BOM_BO_PUB.BOM_HEADER_TBL_TYPE is table of Bom_Bo_Pub.Bom_Head_Rec_Type then your statment is OK. For example:
    SQL> declare
      2      type BOM_HEADER_TBL_TYPE is table of emp%rowtype index by binary_integer;
      3      l_bom_header_tbl BOM_HEADER_TBL_TYPE;
      4      V_bom_header_tbl emp%rowtype;
      5  begin
      6      select * bulk collect into l_bom_header_tbl from emp;
      7      for i in 1 .. l_bom_header_tbl.count loop
      8        V_bom_header_tbl.ename := l_bom_header_tbl(i).ename;
      9      end loop;
    10  end;
    11  /
    PL/SQL procedure successfully completed.
    SQL> SY.

  • How to log waveform chart data in any file at specific interval

     i am using labview 7.0. i want to save waveform chart data in the file at specific interval given by user. Please give me solution for that.
    falgandha

    Open the example finder (Help>>Find Examples) and look at the Write Datalog File example. You can also convert your data to text to save a simple text file. Also, the tutorials in the following links probably cover something similar.
    To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here, here, here, here and here are a few you can start with and here are some tutorial videos. You can also contact your local NI office and join one of their courses.
    In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
    Try to take over the world!

  • How Clear a WaveForm Chart Programmatically?

    Hi LabView Masters!
    Can I Clear a WaveForm Chart Programmatically?
    I know that I can clear the chart clicking with the mouse, but I need to
    clear it when a particular variable is high. (Programmatically)
    I have been testing the Attribute Node but I didn't got it.
    Thanks in advance for your help!.
    Francisco Javier Fernandez Luna
    Ingeniero Tec. Industrial en Electronica.
    Tel: 619 81 98 31
    E-mail:[email protected]
    ó [email protected]
    "Let's make things better" (PHILIPS)

    try to use property node of the chart and connect an empty array to
    "history data" field
    Paco Luna a écrit dans l'article
    <01beae87$7fe22e60$[email protected]>...
    > Hi LabView Masters!
    >
    > Can I Clear a WaveForm Chart Programmatically?
    > I know that I can clear the chart clicking with the mouse, but I need to
    > clear it when a particular variable is high. (Programmatically)
    >
    > I have been testing the Attribute Node but I didn't got it.
    >
    > Thanks in advance for your help!.
    > --
    > Francisco Javier Fernandez Luna
    > Ingeniero Tec. Industrial en Electronica.
    > Tel: 619 81 98 31
    > E-mail:[email protected]
    > ó [email protected]
    >
    > "Let's make things better" (PHILIPS)
    >

  • How to pass parameter into cursor for loop ?

    Hi Experts,
    I want to pass parameter l_bom_header_tbl(i).assembly_item_name into the for statement below How to achieve this?
    for j in 1 .. l_bom_components_tbl.COUNT LOOP
    Thanks

    Maybe i failed to describe in detail,so here i go:
    I have two for loops:
    for i in 1 .. l_bom_header_tbl.COUNT LOOP --1st For Loop
    V_bom_header_tbl.organization_code :='DSC';
    V_bom_header_tbl.assembly_item_name:= l_bom_header_tbl(i).assembly_item_name ;
    k:=1;
    I want to pass parameter l_bom_header_tbl(i).assembly_item_name into the for statement below: How to achieve this?
    for j in 1 .. l_bom_components_tbl.COUNT LOOP *2nd For Loop*
    v_bom_components_tbl(k).Assembly_Item_name := l_bom_header_tbl(i).assembly_item_name ;
    k := k + 1;
    end LOOP;
    end loop;
    end;
    I want to pass a paramter into second for loop in such a way that it accepts from the first for loop
    for j in 1 .. l_bom_components_tbl.COUNT LOOP -2nd loop
    Edited by: ILovePlSql on Mar 22, 2010 12:25 PM

  • How Does the Waveform Chart Allocate Memory in LabVIEW?

    I am not understanding the Memory allocation concept in chart. When it will be happened? If it is in run time, I am getting the exception before running the application itself. Can you help me on this?

    > I am not understanding the Memory allocation concept in chart. When it
    > will be happened? If it is in run time, I am getting the exception
    > before running the application itself. Can you help me on this?
    This depends a bit on the datatype. For all charts except those with
    the waveform datatype wired up, all memory is preallocated when the VI
    loads or compiles. Some datatypes, like the 2D array can add plots at
    runtime, and obviously the chart history will need to reallocate when
    that occurs.
    If the chart has a waveform or array of waveforms wired to it. It has no
    way of knowing how many points are in a waveform and will need to
    allocate them as they arrive. It has a top array of waveforms that is
    preallocated.
    I answered your question a
    bout the chart, but I'm not sure if this is
    what is causing your problem. If you are setting the chart history to a
    very large number, you might try smaller numbers and see if that is part
    of the problem. Otherwise it might be some other part of your diagram.
    Greg McKaskle

  • How to use waveform chart for slow data

    For slow data acquisition (e.g. 1 sample / sec) in the case of using DMM, how to display those data in a chart / graph?
    For this sampling rate, there will be only 1 point in the chart. 
    How to buffer them and display them in a sequence?
    Or, any other method?
    thanks

    Here is a quick example showing chart, graph and XY graph.  All YOU need to do is use a chart and wire your DMM reading right to it.  Charts have their own built in history (you can change the buffer size by right-clicking > Chart History Length)
    For more info see the Examples...  Building User Interfaces > Displaying Data > Graphs and Charts
    Using LabVIEW: 7.1.1, 8.5.1 & 2013
    Attachments:
    MultiGraphs.vi ‏17 KB

  • How to pass a 'one of' parameter value to a sub-report

    I'm using CRXI.
    If I have a parameter which is a 'one of', what are my options for passing the values of that parameter to a subreport?
    Specifically I would like to know:
    Is this a good solution: convert the 'one of' parameter to multiple formulas(one forumula for each of the possible values), and then link the subreport to the main report on each of those values?

    Thanks for responding, but I dont think you understood my question.
    Let me ask the question again a little differently, here are my assumptions, maybe they are incorrect.
    1. Parameters are passed to sub reprots by setting the parameter equal to a forumla, and then linking the sub report to main report through the formula.
    2. If the Parameter is a 'one of' (ie can be multiple values), it can only be set equal to a forumula if you make the forumula an array.
    3. You cant link a sub report to a main report on two formulas which are arrays.
    4.Therefore how do you handle this situation?

  • Can i pass the values by declaring the continer in sub seq and calling in main seq

    hi,
    In sub seq, i have created the contianer (under parameter) and the continer has array of numbers and array of strings.....
    My question is
    Similar to parameter can i call these container in main seq and can pass the values through these arrays?
    How to find no of elements of array of string or number which is delcared under contianer?
    Pls let me know
    thanks,
    chethan

    I made a small mistake in the previous example, the subsequence calls itself instead of calling it from the mainsequence, please use the attached example.
    Attachments:
    Sequence File 1.seq ‏5 KB

  • Open waveform chart in other screen.

    Hello to all!
    I have a front panel with two indicators, the value of those two indicators goes to waveform chart.
    My problem is that I need to call from run_time_menu to waveform chart and that it is opened in a screen different, appearing only waveform chart with titlebar.
    I have proved with a property node_visible of waveform char, but waveform is in front panel and not in one second screen.  Another problem is that if I use a subvi to have another screen, the values of waveform are not updated.
    Thanks.
    G.Garrigos.

    There are lots of ways to achieve this.
    One of the approaches is as shown in the attached VI.
    Go through teh block Diagram of Main VI. Here you will see that a sine pattern is written to a chart.
    Observe that I have placed a sub VI inside the "sub VI" event of the main VI.
    Click on the sub VI icon. In its drop down menu,go to 'sub Vi node set up'. Here you will see that i have selected select 'show front panel when called' and 'close afterwards if originally opened'
    This link will teach you how to pass values to a sub VI by using Connector Pane: http://zone.ni.com/reference/en-XX/help/371361A-01​/lvhowto/selecting_a_connector_pane/
    Run the main VI, and click on "show sub VI" to dispay the graph shown in mainVI on the SUB VI's graph
    Any doubts, do ask
    regards,
    Dev
    Message Edited by devchander on 03-29-2006 06:31 AM
    Attachments:
    main.llb ‏41 KB

  • How to pass importing parameter of super class method to subclass method?

    hi all,
    i have defined  a class
    CLASS CUST_REPORT DEFINITION.
      PUBLIC SECTION.
        METHODS:DATA_RETRIVE IMPORTING  CUSTID_LOW  TYPE ZCUSTOMER-ZCUSTID
                                       CUSTID_HIGH TYPE ZCUSTOMER-ZCUSTID.
        DATA:IT_CUST TYPE TABLE OF ZCUSTOMER,
             WA_CUST TYPE ZCUSTOMER.
    ENDCLASS.                    "cust_report DEFINITION
    The method DATA_RETRIVE   in this class  has two importing parameters named CUSTID_LOW   and CUSTID_HIGH.
    then i have defined subclas of this clas.
    LASS CUST_ORD DEFINITION INHERITING FROM CUST_REPORT.
      PUBLIC SECTION.
        DATA:IT_ORD TYPE TABLE OF ZORDER.
        METHODS:DATA_RETRIVE  REDEFINITION,
               DISPLAY.
    ENDCLASS.                    "cust_ord DEFINITION
    Method DATA_RETRIVE   is redefined.
    So how to pass importing parameteres of super class method to sub class method with the same name.
    Thanks and Regards,
    Arpita

    Hi,
    I tried like this.
    METHOD DATA_RETRIVE.
    CALL METHOD SUPER->DATA_RETRIVE
          EXPORTING
            CUSTID_LOW  = I_CUSTLOW
            CUSTID_HIGH = I_CUSTHIGH.
    ENDMETHOD.
    But  parameters I_CUSTLOW and I_CUSTHIGH are not getting values after call to method.
    Thanks and Regards,
    Arpita

  • How can I display more than 1 loop iteraction in a waveform chart?

    Using DAQmx, I am inputting a signal at a rate of 10k with 1k samples inside a while loop. I want the first 3 seconds of data to display on a waveform chart without having to change the rate or number of samples. Is there a way to stop the waveform chart from clearing after every loop iteration so that I can display more than 0.1sec of data? Thank you for any help you can provide!

    The default history length of a chart is 1024. To make it longer is a right click option.

Maybe you are looking for