Plotting three variables

Hello!
I am using a XY graph to plot a time series together with some measurement data. However, I want to include a third variable in the plot. This variable is a constant (straight line), but the XY graph doesn't seems to accept more than two variables? Any idea how this can be fixed?
Greetings
Kristoffer
Solved!
Go to Solution.

Hi Sjefsgjogleren,
                            Have a look at this:-
                            http://zone.ni.com/devzone/cda/epd/p/id/4322
Thanks as kudos only
Attachments:
203598.vi ‏22 KB

Similar Messages

  • How do I plot two variables when neither are time?

    I know how to plot a variable against time, but how do I plot two variables when neither one of them are time against each other. For example if I want to plot say force against distance what is the best approach to use?
    Thank you.
    Solved!
    Go to Solution.

    Use an XY graph. Use Context Help to see the expected datatype, and refer to examples. Consider the following, remembering to rename the Scale Labels and Plot Name:
    a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"] {color: black;} a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"]:after {content: '';} .jrd-sig {height: 80px; overflow: visible;} .jrd-sig-deploy {float:left; opacity:0.2;} .jrd-sig-img {float:right; opacity:0.2;} .jrd-sig-img:hover {opacity:0.8;} .jrd-sig-deploy:hover {opacity:0.8;}

  • Way to plot two variables on a chart by selecting the two variables on the front panel?

    Hello,
    I have created a VI to control a tensile tester which controls/outputs the following variables: time, load components in 6 directions, tensile displacements, displacements measured by a capacitance sensor.  
    Is there a way such that there would be only one plot on the Front Panel, and there will be buttons on the front where I can select the variable for the x and y axis when the program is running?  
    I only know how to make a plot using Chart Buffer using only two fixed variables.  The only way I think of doing this is making a plot for every single permutation of variables, then put those plots in Tab Control...is there an easier way?
    Thanks! 

    I have done this a lot in applications to save realestate and simplify the UI.  Basically, I create an enum (or typedef) describing the x or y-axis values I would like to display on a graph.  Using an event structure, you can watch for a change in these selector and re-plot your graph.  You store your data somewhere (possibly in an array) and simply index into that array based on what you want to show.  I attached a short example to illustrate this implemenation.  Hope this helps.  (LV2009)
    -cb
    Attachments:
    Select from multiple curves and axis to plot.vi ‏19 KB

  • Comparing two SharePoint Lists, three variables in each

    I have a data set in a SharePoint list, Column 1, 2, 3,4.
    I have a second data set in a SharePoint list, with the same columns 1-3 in it.
    I would like to create a workflow (I think) that when a new record is added to the first data set, it checks the second data set to see if there is a record with the same matching three records. If there is a match it would change column 4 in the first file
    to "TRUE".
    Looking for some help here... I know how to do a look up for one value, and even a lookup to look at two different values independently, but this lookup needs to make sure that all three columns in the record are a match.
    Thanks

    Hi,
    I'm assuming you mean for List 1 you have four fields and an additional field with the date (MyDate for example).
    And that in List 2 you have three fields plus two more date fields (EffectiveDate and ExpirationDate for example)
    For this scenario I would create 2 workflow variables:
    1. Combined (string) - same as before that builds up the three fields in List1
    2. List2Id - that gets the ID of the List Item in List2 that matches (if none match then List2Id will be 0) using the following settings:
    Data source: List2
    Field from source: ID (As List Item Id - IMPORTANT)
    Field: Combined
    Value:Variable:Combined
    Then use an if condition to check:
      If Variable: List2Id not equals 0
    then within this if condition create another sub if condition to check the following:
      If Current Item:MyDate is greater than or equal to List2:EffectiveDate
      AND Current Item:MyDate is less than or equal to List2:ExpirationDate
    If both conditions are true then update field four in List1 to True.
    Settings to get List2:EffectiveDate are below:
    Data source: List2
    Field from source: EffectiveDate (As Date/Time)
    Field: ID
    Value:Variable: List2Id (Return field as: Item Id - IMPORTANT)
    Settings to get List2:ExpirationDate are below:
    Data source: List2
    Field from source: ExpirationDate(As Date/Time)
    Field: ID
    Value:Variable: List2Id (Return field as: Item Id - IMPORTANT)

  • How do I plot three 1-D vectors into a surface plot?

    Hi everyone,
    I have programming experience but am completely new with LabView.
    I have data files that contain the same wavelength range on the first column, light intensities on the second column, and each new text file is at a different angle. The respective angles are written as headers for each file.
    I've extracted wavelength, intensity, and angle into distinct 1-D vectors and want to plot them all on a 3-D graph.
    I've tried using scattered plots in vector form, contour plots, plot3Dmesh, etc, and I've googled extensively and have found similar questions but no answers.
    Does any one know where I can view specific examples or how to go about this?
    Any help would be greatly appreciated!
    -Michael
    Solved!
    Go to Solution.

    Hi Joe,
    Thank you! That worked. It enlightened me a bit more about shift registers as well.
    The reason I'm taking both the angles and wavelengths from the same column is because the angles are the first value on the numerical header. The wavelengths (and intensities) all begin from row 3 so I just set the read from measurement file VI to start there.
    There's one odd thing about the plot. Everything looks fine up until it hits ~340 on the wavelengths. All the angles are read and intensities for wavelengths between 260-340 nm. But the wavelengths range from 260-680 nm. I've been playing around with the shift registers insert into array functions, but I can't figure out what's stopping it from plotting the remaining intensity curves after 340 nm. I suspect it has to do with the number of times the for loop runs, but I thought the list folder files function took care of that. I tried wiring the file count output to N on the for loop but it didn't make a difference. Any thoughts on this?
    Note: there are 176 angles, from 0-175. there are around 400 wavelengths, from around 260-680 nm.
    Thank you so much!
    -Michael

  • Plotting a variable number of curves on different XY Graphs

    Is it possible to plot any number of curves on different XY Graphs?
    In my case, sometimes I need to plot 3 curves, sometimes 4, sometimes 6, etc. Generally, it is between 2 to 6 plots on different XY Graphs.
    How can I go about doing this? 
    What I am thinking so far is to have six XY graphs on the front panel, but somehow programmatically activate the first 2, 3, 4, 5 or however many plots I need to make.
    I am really at a loss here.

    YIKES! Don't make 6 graphs. Just make one graph, and the graph can take an array of clusters, where each cluster element is an array.
    For example, cluster element 1 is the x data array, cluster element 2 is the y data array. Then you build an array of these clusters. See below:
    CLA, LabVIEW Versions 2010-2013
    Attachments:
    graph.png ‏5 KB

  • Adding Three Variables using Standard Action?

    I'm attempting to create an expression using a standard action. However I'm finding that it will only allow me to enter two variables (NOT 3) for the total.  (total 1) + (total 2) = data_targetmonthly (as shown below). I need the expression to be: (total 1) + (total 2) + (total 3) x 1.3  = data_targetmonthly.
    Please see attached. Should I be using an equation at this point instead?

    I've been pulling my hair out on this one and I've gone through the Rapid Learning blog, your site and the Lynda.com training as well as searched throughout youtube and the community forums and still can't find the answer I'm looking for.
    I have four text entry boxes in one column where the student enters in an item they'd like to have. Each item goes into its own TEB.
    EX: Ford Mustang
    In the middle column I have a cost for that item that they enter in (variables labeled as: cost_1, cost_2, cost_3, and cost_4). They manually enter it in - there are no preset values that they enter from a list on the screen or that I can have them select from a drop-down menu or anything.
    EX: $300/mo
    In the third column I calculate how much that item would cost over the course of a year.
    EX: $4680
    The Action to determine the $4680 value would be:
    COST_ITEM1: SUM_ITEM1 = COST_1 * 1.3
    Now if I stopped there with one item - EVERYTHING WORKS GREAT! But here is where I run into trouble....
    I want to follow this procedure for all four items and then create a GRAND TOTAL for the entire list using the same formula as above. But when I do so, the value always comes up as "0".
    I had created a variable called "total_1" and the following action:
    12_TOTAL: total_1 = COST_ITEM1 + COST_ITEM2
    and then created the following as well:
    34_TOTAL: total_2 = COST_ITEM3 + COST_ITEM4
    Then I created an action entitled:
    FINAL_TOTAL > YEARLYCOST: 12_TOTAL + 34_TOTAL
    This gives me the "0" total. Again. It's driving me NUTS. Can you point me to where I'm going wrong? Am I correct in lumping together the FINAL_TOTAL figure as 2 totals? I wish there was a simpler way - by adding multiple totals (more than 2) into one variable.

  • 2d contour plot with variable x,y spacing

    Hi
    How do I create a 2d contour plot with the the x-y values spaced at irregular intervals? Intensity plots appear to require equally spaced data.
    Any ideas
    Thanks
    Willem

    Hi Willem,
    You are correct in saying that intensity plots require regularly spaced data.
    The easiest way to get round this is by padding out your data so that it is regular.
    Does your data have a common multiple, if so you can simpley scale it by that factor to make your data regular.
    Emma R
    NIUK & Ireland

  • 3D Isosurface plot

    Hi,
    is there a vi for isosurface graphs in LabView? I have a 3D matrix and would like to have a surface plotted that intersects points of equal intensity. If not, is there a way to use a parametric 3D-graph for this?
    Thanks in advance,
    Matthias

    Hi Matthias,
    I am not sure if I am helping or not. You wrote;
    Hm, I use LabView 7.0, but it looks like you do a surface graph with x and y being related to azimuth and elevation and z being measured data. The array is 3D, but essentially it is a function of two variables, azimuth and elevation. I have a function depending on three variables.
    1) The code illustated should be the same in LV 7.0 as is illustrated.
    2) That example is using multiple plots to achieve the final result.
    The first "For Loop" is plotting multiple curves by passing three 1-d arrays where coresponding values of each array represt a triplet (X-Y-Z values) for each point the curve should pass through. The result curve is plotted starting with the first triplet (first element in each array) to the last. The "W" vector is omitted because I wanted each curve to have a unique color to make it easy to distinguish between the curves.
    After competing all of the curves I then add another plot that that is a parametric surface. In this case the dat is presented as 2-d array and I alos specify the W vector so that I can control the color of the surface.
    THe "2d" array (like the 1d array) contains quadruplets (? X-Y-Z-W) values for each point on the resulting surface. The arrangement of the quads within the 2-d array tells the 3-d graph which quads are adjacent to each other. If you viewed the surface as a grid with lines connceting adjacent points you would see a line from (X00, Y00, Z00, W0) [where X00 is the 0,0 element of the X-Matrix] to (X01, Y01, Z01, W01) and another connected to (X10, Y10, Z10, W10) etc. So the 2-d array only helps the 3d graph figure what points in scace should be connedted to each other.
    I hope this is helping!
    Ben
    Message Edited by Ben on 07-20-2006 11:50 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How can I represent more than one plot in an only one chart?

    Hello everyone,
    i got a code where I don't understand how to represent more than two plots, with different scales each, in the same waveform chart.
    As brief review:
    * 2 adquisition data wired to Bundle
    * wire from Bundle to waveform chart.
    * options of th chart: stack plots.
    I've tried to expand the Bundle but the problem is that I'm wiring a 3 element cluster to a 2element cluster chart. I don't understand how to upgrade the chart...
    (there's the two plots in each chart)
    (there's the code, where I've already tried expanding any bundle and wiring other signals, then wiring the bundle's output to the chart)
    I think if I could add more scales, it will be possible to plot three plots on the same chart.
    Thank you for your time
    Marcelo A J

    Since you are dealing with waveforms already, I think you actually want to have an array of waveforms to go into your chart.  You also need to map the plots to the scale that you want to use.  You can do that in the plot tab of the properties window.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Printing OUT variables from a Stored Procedure

    Hi all,
    I'm running an SQL command that calls a Stored Procedure and passes in some value. I've pasted in the important parts of it below. What I am trying to do is access the OUT variables that have been assigned to the DECLARED variables. I come from a SQL Server background and there we can do "SELECT @variable" which will print it to screen. I'm trying to do something similar here.
    I need to access the contents of the three variables declared at the top of the script.
    Thanks in advance.
    DECLARE
    l_error_value NUMBER;
    l_error_product VARCHAR2 (10);
    l_CE_DOC_ID number;
    BEGIN
    PEM.create_enquiry   
         (      ce_cat => 'COMP'
                   , ce_class => 'FRML'
                   , error_value => l_ERROR_VALUE
                   ,error_product => l_ERROR_PRODUCT
                   , ce_doc_id => l_ce_doc_id
    END;

    Ah yes I see. Sorry I misunderstood what you were suggesting. I'm currently working on a test script that uses an approach similar to the one you mentioned, but I'm having trouble resolving foreign key relationships with test data.
    I've no access to the tables or anything so it's proving to be a time consuming task!!
    Is it required that all fields are given a value, even if they have a "DEFAULT" defined for them within the procedure. At the moment I'm using a rather cumbersome approach to this:
    i.e.
    With cmmAddRequest
        .ActiveConnection = strConnect
        .CommandType = adCmdText
        .CommandText = strSQL
        .Parameters(0).Direction = adParamInput
        .Parameters(1).Direction = adParamInput
        .Parameters(2).Direction = adParamInput
        .Parameters(3).Direction = adParamOutput
        .Parameters(4).Direction = adParamOutput
        .Parameters(5).Direction = adParamOutput
        .Parameters(0).Value = "COMP"
        .Parameters(1).Value = "FRML"
        .Parameters(2).Value = "1"
        .Execute
        WScript.Echo(.Parameters(5).Value)
    End With

  • Hiding variables in WebI report

    Hi,
    We have generated an Universe based on a BW query which has 5 user entry variables with user exit logic coded for each one.
    Based on this Universe we wish to create 2 WebI reports.
    However, for the both the reports all the 5 variables are displayed.
    Is there a way to hide the variables, so that on the first report we see two variables and on the second WebI report we are able to see the remaining three variables.
    For all 5 variables, we have some logic on the BW user exits and hence we want to leaverage the BW variables and not opt for the WebI variables.
    Rgds

    Hi Free Will,
    How did you manage to hide the variable, we have a similar issue,  I have created a BW variable that is populated by Customer Exit. The problem is, for the query to be filtered in the Webi Report it the variable has to be defined as "input ready", and this allows the users to change the data in the variable which I don't want them to do. If I don't make it input ready the WebI Report is not filtered.
    If we could hide the variable it would solve our problem
    Thanks in advance
    Lucien

  • SSIS: How to use one Variable as Input and Output Parameter in an Execute SQL Task

    Hello,
    i need your help,I'm working on this issue since yesterday and have no idea how to deal with it.
    As I already said in the tilte i want to start a stored procedure via a Execute SQL Task which has around 15 prameters. 10 of these should be used as input AND output value.
    As an example:
    i have three  Variable:
    var1    int        2
    var2    int     100
    var3    int     200
    the stroed procedure:
       sp_test
          @var1 int
          @var2 int output
          @var3 int output
       AS
       BEGIN
            SET @var2 = @var2 * @var1
            SET @var3 = @var3 + @var1
       END
    So in the Execute SQL Task i call the Stored Procedure as follwos:
        Exec sp_test  @var1 = ?, @var2 = ? output, @var3 = ? output
    (I use an OLE DB Connection)
    The parameter mapping is as follows:
    User::Var1        input                   numeric              0                 -1
    User::Var2        input/output         numeric              1                 -1
    User::Var3        input/output         numeric              2                 -1
    Now my problem. If i set  Var2 and Var3 as Input parameter the values are still the same after running the package. If i set them to a output value the are both Null because the procedure doesnt get any values.
    I already tried to list them a second time - like
        User::Var2        input                  numeric              1                 -1
        User::Var2        output                 numeric              1                 -1
    or i use a new variable
        User::Var2                  input                  numeric              1                 -1
        User::Var2Return        output                 numeric              1                 -1
    but i alwas get the error
    "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done."
    Has anybody an idea how I can solve this problem?
    Thanks a lot.
    Kind Regards,
    Alice

    Hi Alain,
    thx for your answer.
    I have around 15 procedures called one after the other to calculated and modify my values. Each procedure is responsible for an other but overlapping set of variables. So i thought it would be a good idea to call them one after the other with the needed variables via a execute sql task.
    So if i use a result set, how i get my stored procedure to return 10 values? I would have to use a Function instead of a procedure, wouldn't i?
    As if i have 15 procedures this would be a lot of work.
    But thanks a lot for the idea. I think an other idea would be to create one function which calls all stored procedures and returns all the calculated values as a result set, wouldn't it?.
    Kind Regards.
    Alice

  • Problem returning variables from dynamic SQL/PLSQL

    Hi, I have a problem I am trying to solve using a very short piece of dynamic SQL or PLSQL but I am having problems getting the variable values out of the dynamic block.
    I have 16 counters whose names are made up of three variable parts - 'scheme', 'contributory category' and 'employment category'
    The 'scheme' can be either 'no1', 'no2', 'off', 'cg' or 'amc'
    The 'contributory category' can be either 'cont' or 'noncont'
    The 'employment category' can be either 'ft' or 'pt'
    (There are only 16 because only 16 combinations are possible)
    For example the total counter name could be 'v_cg_noncont_ft_count'
    I have created a variable by concatenating the various elements called v_incr_count_name which holds the name of the counter I want to increment.
    I am running this whole thing within an anonymous PLSQL block so I cannot use global variables meaning that my variables are not visible within a dynamic PLSQL block.
    I believe this means that either I need to bind the variables within a PLSQL block or use a SELECT FROM INTO SQL block.
    I have tried a few solutions with no luck such as the following PLSQL:
    v_incr_count := 'v_'||v_scheme||'_'||v_cont_cat||'_'||v_emp_cat||'_count';
    sql_stmt := 'BEGIN :a := :a + 1; END;';
    EXECUTE IMMEDIATE sql_stmt USING v_incr_count_name;
    Unfortunately I am getting the 'IN bind variable bound to an OUT position' error which I believe is because it is trying to return a value into v_incr_count_name which has been defined by default as an IN variable. The problem is that I need to store the returned value into the variable whose name is stored in v_incr_count_name.
    Another solution I tried is:
    v_incr_count_name := 'v_'||v_scheme||'_'||v_cont_cat||'_'||v_emp_cat||'_count';
    sql_stmt := 'SELECT '||v_incr_count_name||' + 1 FROM DUAL';
    EXECUTE IMMEDIATE sql_stmt INTO v_return;
    This solution gives me an 'Invalid colum error'
    Any help would be greatly appreciated
    Cheers, Dan

    Repost:
    Problem with variables in dynamic SQL/PLSQL

  • Problem with variable in the woorkbook selection screen.

    Hi All,
    I have Problem with Variable in the selection screen. I have four variable in the report in this sequence
    <b>Plant (optional), calendar month (mandatory),  material (optional), Customer (mandatory). </b>
    In Development system, I changed the query to fix the problem for a formula. saved and executed the query. In the selection screen appeared four variables and executed. after executing the query and I saved the work book also. I logged out of the Bex Analyzer. In the RSRT I generated the report by clicking the Generated Report push button. and again logged into the Bex analyzer and ran the work book, now in the selection screen, appeared three Variables only, I am missing the variable <b>Customer</b>.
    The old report which is already  in the Production system is working fine. What could be the mistake I did in the development system.
    It is very urgent, I need to deliver this object as soon as possible.
    Can I anybody help on the same.
    Thanks in advance
    Narendra

    Yunus,
    I did what you said. I removed the variable from characteristic restrictions, saved the query and executed the query, appeared three variables Plant, Calender month and material. executed and saved the work book. disconeted from Bex analyzer, in RSRT Generated Report and logged into Bex analyzer ran the work book for selection Plant, calender month and material and went into change query definition and added the variable for customer which was removed earlier and and ran the query for selections Plant, Calender monmth, Material and customer. saved the work book. disconnected from Bex analyzer and closed all excel sheets and work books. In RSRT Generated Report and again connected to Bex analyzer and ran the work book, now appeared only three variables again missed variable customer.
    Yunus does any missed n the procedure what i did.
    It is helped what Chris was answered.
    Many Many Thaks for your time and replies.
    Thaks in advance
    Narendra

Maybe you are looking for

  • Posting Loan to Vendor Employee

    Dear Experts, We're in 4.7.  We have a requirement where we need to keep track of loan payment of all our individual employees.  Is it possible to post the loan payment in payroll individually to each and every corresponding vendor employees ?  Any i

  • Can a JApplet access a file to be read?

    I think I recall reading or hearing somewhere that a JApplet cannot, for "security reasons", access any files on the computer it is running on unless it is the 'original' or the one where the code is stored. What I would like to do is have a file tha

  • Tweak SharePoint 2013 Discussion Forum

    I have a discussion forum created in SharePoint 2013.  I want to make some minor tweaks, but searched everywhere on how to do it and changing random settings is getting me nowhere.   Add choice column I would like to add a category as a Choice column

  • Can't create loop device for dm-crypt

    I'm trying to set up a disk image to use dm-crypt with, and after using dd from /dev/urandom to create an appropriately sized random file, I modprobed the loop module and ran: losetup /dev/loop0 /home/user/image as specified on the Arch Linux wiki pa

  • How to password protect an existing MobileMe gallery folder?

    I have created quite a few large events and published them on MobileMe, and did not think about restricting access to them. Now I want to password protect some of them, but could not find a place in iPhoto where I could change MobileMe gallery proper