Plotting two graphs in one single graph

Hi.  This is my first time using control and simulation.  I want to plot two graphs within a single graph.  It seems that I have to use bundle and build arrays functions but I just do not know how to plot them.  The x points and y points of (2) are just defined by a single set of points included in the array defined.  The x points and y points of (1) are results of another formula, but both plots would fit in the same location of a single graph.  I hope my question is understandable.  I attach part of the model that I want to be plotted.
Thank you
Solved!
Go to Solution.
Attachments:
two graphs.JPG ‏26 KB

Hi,
You can try something like this. Check the attached VI.
Regards,
Nitzz
(Give Kudos to good Answers and Mark it as a Solution if your problem is Solved)
Attachments:
Untitled 3.vi ‏39 KB

Similar Messages

  • I would like to plot two lines with an xy graph in realtime

    I understand how to plot in real time with an xy graph appending to an array, but I would like to simply put a line so I can see when my first plot crosses a certain value on the y-axis, say at like y=30. So I would like to know how it is you can plot two lines in real time. I'll put in my vi so you can take a look at what I have so far. On my vi the array is shortened to contain only 5 values so as not to take up memory.
    Attachments:
    xygraph.vi ‏47 KB

    Hi,
    I have made certain modifications to your vi so that now it plots two lines with an xy graph in realtime.
    Regards,
    Ankita A.
    Applications Engineer
    National Instruments
    Attachments:
    multiplot_XY_graph.vi ‏55 KB

  • Two waveforms in one xy graph

    Hello,
    I need to put two waveforms in one xy graph. Value of one waveform should be in x axis, and second on y axis. I have no idea how can I do that. Everything I have succeeded is xy graph with both values on y axis and time on y.
    Thanks for Your help!

    Check xy graph.vi example that ships with labview
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.

  • How to open two sockets in one single server

    May I open two sockets with different listening port numbers in a single server? For each socket, the way to deal with the inputstream and outputstream is different. May the thread be like this:
    public class twoSocketServer implements Runnable {
    public twoSocketServer() {
    try{
    SSLServerSocketFactory fact = SSLServerSocketFactory.getInstance(rand, selfPrivateKey, selfCertificate, trustEngine, null);
    serverSocket1 = (SSLServerSocket) fact.createServerSocket(ListeningPort1);
    serverSocket1.setNeedClientAuth(false);
    serverSocket2 = (SSLServerSocket) fact.createServerSocket(ListeningPort2);
    serverSocket2.setNeedClientAuth(false);
    } catch {...}
    public void run()
    while(true)
    try
    SSLSocket socket1 = (SSLSocket) serverSocket1.accept();
    new handler1(socket1).start();
    SSLSocket socket2 = (SSLSocket) serverSocket2.accept();
    new handler2(socket2).start();
    } catch {...}
    class handler1 extends Thread {...}
    class handler2 extends Thread {...}
    Is there something wrong with this idea? If yes, how can I correct it? Thanks.

    try
    SSLSocket socket1 = (SSLSocket)
    serverSocket1.accept();
    new handler1(socket1).start();
    SSLSocket socket2 = (SSLSocket)
    serverSocket2.accept();
    new handler2(socket2).start();
    Is there something wrong with this idea? If yes, how
    can I correct it? Thanks.You can do it.
    In the above code block you are going to need two threads. One for each SocketServer. The accept() method blocks until it recieves a connection. So in your above code it would first wait only for a connection on port 1. Then it would wait only for a connection on port 2. And then start over. That probably isn't what you want.

  • How to concatenate two colums into one single column

    I need some ideas to concatenate two different columns into one single column using a set of distinct values.
    For Example,
    Customer Product Number
    xyz A 1
    xyz B 2
    xyz B 1
    AAA C 7
    AAA A 1
    The result should look like this,
    Customer Value
    xyz A1 B2 B1
    AAA C7 A1
    How would I group this into once value ?
    Thanks in advance ...

    Tom's discussion of writing your own aggregate routines
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:2196162600402
    starts off with a link to the 8i alternatives
    "see
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:229614022562
    for 8i methods (not aggregates)"
    Unforutnately, it's a lot more work in 8i.
    Justin

  • Analytic function - two answers in one single select

    create table atest(eid varchar2(10),ukey varchar2(10),tname varchar2(40));
    insert into atest values ('eid1','ukey1','tname1');
    insert into atest values ('eid2','ukey1','tname2');
    insert into atest values ('eid3','ukey2','tname3');
    insert into atest values ('eid4','ukey2','tname3');
    insert into atest values ('eid5','ukey3','tname4');
    commit;I need one single sql, from which I want to find out 2 things
    1. find out those ukey values for which we have multiple eids (ukey1, ukey2 in our example)
    2. next, once we identify those ukeys with multiple eids, out of those, find those ukeys which have non unique tnames (in our example ukey1)
    I would like to do it using analytic functions, so far tried the following
    select eid, ukey,
    (case when count(distinct a.eid) over (partition by (a.ukey)) >  1 then
    -- do something here, above will give ukey1, ukey2, but how to identify those ukeys with non unique tnames ?
    else
    end) tsource
    from atest a;

    user650888 wrote:
    can the same be achieved with analytics ? Yes, but why? Anyway:
    select  ukey
      from  (
             select  ukey,
                     count(distinct eid) over(partition by ukey) eid_cnt,
                     count(distinct tname) over(partition by ukey) tname_cnt,
                     row_number() over(partition by ukey order by 1) rn
               from  atest
      where eid_cnt > 1
        and tname_cnt > 1
        and rn = 1
    UKEY
    ukey1
    SQL> SY.

  • Display two fields in one single cell in a BEx report.

    In a BEx 7 query, we need to display 'First name' and 'Last name' in one cell/column called "Name". The 'First name' and 'Last name' are two different info objects in the multiprovider on which the query is built. These are navigational attributes for Char - Employee. The entire flow is in 7.0 version.
    Any pointers to how this can be done in the query designer?
    Thanks.

    Hi,
    Follow the following steps:
    1. Create a Variable and in General Tab Set Processing By As Customer Exit.
    2. Now go to CMOD & Write the following code doing some custom changes specific to your requirement:
    WHEN "Variable Name"
    "Here you can write a code to select the value from Infocube table and Loop it in a work area"    
    Loop it_tab INTO wa
         concatenate S_date  s_tstmp into s_val_new separated by space.
          l_s_range-low = s_val_new.
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          APPEND l_s_range TO e_t_range.
    END LOOP
    Note: l_s_range is a structure and holds a single line whereas E_T_range stands for internal table and have multiple values . in customer exit (used for variable ) holds the derived value for the variable .
    You can go to query and there u can drag this Characteristic on which you created this custom exit variable

  • How to make two tables from one single taable

    Hi,
    i have one table with 100 records and i want to create two tables each with 50 records and with no duplicates. if i will do on bases on empno then i have to check the min and max emp no and then divide them in two tables, is there any automate way of performing this task.
    Regards,
    Abida

    Hi,
    A rather quick and dirty solution, but definitely works.
    I used the HR sample schema (employees table) for this.
    hsaprd@706447>create table tab1 as select * from employees where rownum <51;
    Table created.
    hsaprd@706447>select count(*) from tab1;
    COUNT(*)
    50
    hsaprd@706447>create table tab2 as select * from employees where employee_id nnot in (select employee_id from tab1);
    Table created.
    hsaprd@706447>select count(*) from tab2;
    COUNT(*)
    56
    hsaprd@706447>
    Hope this helps!
    -Anand

  • Merging two records in a single record for the same matnr,werks and bwart.

    Hi I have a requirement to merge two records into one single record using the quantity field from MSEG table.
    I am selecting two records from the table MSEG. Now for these two records i have to add the quantity values into one variable.
    Then there should be only one record for the same matnr,werks,bwart.
    Any suggestion would be appreciated.
    Regards,
    Amit

    hi,
    You can COLLECT statement only if all non key fields are numeric.
    This statement Adds all such fields and give us a single record.
    Regards
    Sumit Agarwal

  • Two line graphs in a single chart

    Hello Experts,
    I am having set of values each for one line graph.
    But I want to plot these two graphs in a single chart.(2 line graphs in a single chart)
    Please help me how to plot?
    Regards,
    Apex User

    Hi,
    Your query needs to return data in this format:
    link    label        value1   value2
    null    01-JAN-10    5        6
    null    01-FEB-10    3        6
    null    01-MAR-10    2        5where 'value1' column will be the first series, 'value2' column will be the second series, etc.
    So you SQL query will need to be something like:
    select
    null link,
    created_month label,
    sum(value1) value1,
    sum(value2) value2
    from table
    group by
    created_monthAmanda

  • Hao to display two lines in one Graph

    Hi, I want to display two lines in one graph in different color , what should I do? Thanks.

    Hello Carlos,
    the help window for a waveform graph/chart only mentions "single plot
    with waveform datatype". To get more plots on one graph you have to
    build an 2D-array  of  points. Just look at the help window!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Two Graphs in a single screen

    Hi Experts,
    I want to display two graphs in a single screen. It should be a pie chart.
    Currently I did one pie chart using GRAPH_MATRIX_2D.
    It is working fine.
    But i want to display another PIE Chart within the same screen.
    Can anyone help me sort out?
    Thanks in advance

    Hi Vimal,
    Go throungh the following code. it will help you.
    REPORT Z_3DGRAPH.*structure declaration for performance measurementTYPES: BEGIN OF ty_performance,
          company(15) TYPE c,
          q1 TYPE i,
          q2 TYPE i,
          q3 type i,
          q4 type i,
          END OF ty_performance.*structure declaration for options table
    types : BEGIN OF ty_opttable,
            options(30) TYPE c,
            END OF ty_opttable.*Internal table and work area declarations
    DATA: it_performance TYPE STANDARD TABLE OF ty_performance,
          wa_performance TYPE ty_performance.DATA : it_opttable type standard table of ty_opttable,
           wa_opttable type ty_opttable.*initialization event
    INITIALIZATION.*start of selection event
    START-OF-SELECTION.*clearing the work areas
    CLEAR WA_PERFORMANCE.
    CLEAR wa_opttable.*appending values into the performance internal table
    wa_performance-company = 'Company A'.
    wa_performance-q1      = 78.
    wa_performance-q2      = 68.
    wa_performance-q3      = 79.
    wa_performance-q4      = 80.append wa_performance to it_performance.wa_performance-company = 'Company B'.
    wa_performance-q1      = 48.
    wa_performance-q2      = 68.
    wa_performance-q3      = 69.
    wa_performance-q4      = 70.append wa_performance to it_performance.wa_performance-company = 'Company C'.
    wa_performance-q1      = 78.
    wa_performance-q2      = 48.
    wa_performance-q3      = 79.
    wa_performance-q4      = 85.append wa_performance to it_performance.*appending values into the options internal tablewa_opttable-options = 'P3TYPE = TO'.
    APPEND wa_opttable TO it_opttable.wa_opttable-options = 'P2TYPE = VB'.
    APPEND wa_opttable TO it_opttable.wa_opttable-options = 'TISIZE = 1'.
    APPEND wa_opttable TO it_opttable.*calling the graph function module
      CALL FUNCTION 'GRAPH_MATRIX_3D'
        EXPORTING
          col1      = 'Quarter 1'
          col2      = 'Quarter 2'
          col3      = 'Quarter 3'
          col4      = 'Quarter 4'
           dim1      = 'In Percentage%'
          set_focus = 'X'
          titl      = 'Company Performances'
        TABLES
          data      = it_performance
          opts      = it_opttable
        EXCEPTIONS
          others    = 1.
    Regards,
    Rajesh Kumar

  • How can I plot two sets of data points in 3d graph?

    I am trying to plot two sets of data points in 3d graph. I also need to make a set of data with one color and the other set with a different color. For example, I need to plot 10 (x,y,z) data points in 3d. Maybe 6 points need to be blue, and the other 4 red. Could you tell me how?

    What is your LabVIEW version? (things are a bit different in 8.6).
    Basically, you create multiple instances of the VI that gets placed automatically when you drop the 3D graph and then wire a different number to the plot ID at the bottom.
    You define all the plots (color, style) via the properties dialog.
    Have a look at my example posted here. One plot is "blue dots" and one is a "shaded surface". See how far you get.
    Message Edited by altenbach on 04-23-2009 01:11 PM
    LabVIEW Champion . Do more with less code and in less time .

  • Combine two channels on one graph

    I need to add a second channel, coming from same instrument, to the existing acq&graph Voltage VI (see attachment). I want to get two voltage curves on the same amplitude vs time graph. I configured the second channel and created a task, which also works on a that single channelled VI. Thanks a lot in advance
    Vitaliy
    Attachments:
    Acq&Graph Voltage-Int Clk.vi ‏57 KB

    I have two tasks for each channel. So Im trying to feed those two tasks through one loop and onto a graph. I do have a task named "ai cont multi" in NI-DAQmx Base Config Unility where I can choose two channels, but when I input this task into my VI, it doesn't recognize the resource which is weird cuz It does recognizes single channeled tasks that I created. I think Im missing something fundamental on the block diagram...

  • How can I draw two matrixes in one graph???

    I have to draw two matrixes in one graph.
    Matrix size is 10 X 100, 10 X 100.
    Help me!
    Have a good day!

    You can do this by adding multiple plots to the graph's plots collection and then plotting each matrix on its own plot. The easiest way to add additinal plots to a graph's plots collection is to right-click on the graph in the dialog editor, click on Properties, click on the Plots tab, and then click the Add button to add additional plots.
    Now if you have a member variable for the graph in your dialog class (let's call it m_graph for this example), you could do this:
    // Plot the first matrix
    m_graph.Plots.Item(1).PlotXY(/* Your first 10x100 matrix data */);
    // Plot the second matrix on a different plot, but same graph
    m_graph.Plots.Item(2).PlotXY(/* Your second 10x100 matrix data */);
    - Elton

Maybe you are looking for