Coordinates of intersection of waveform

i have two arrays plotted on the same graph. I am looking for the coordinates where these two graphs intersect. The information about the exact graph is given in the attached VI.
thanks a lot for your help. I have a feeling that this is quite trivial but would really appreciate any help.
Attachments:
find intersection.vi ‏83 KB

an easy method is to find the shortest distance between the array points |Ya-Yb|.  The closest value will give you an approximation (assuming the waveforms share a T0 and dT).  You can speed this up with a binary search.  This assumes that the graphs have one and only one intersection.  Interpolation can give you a more exact value.  Sloving the functions for the forms also will give you an answer assuming that you have the functions defining the curves (through curve fitting)
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA

Similar Messages

  • Intersection of hyper-rectangles

    Hi,
    If I define two hyper-rectanges in n-dimentional space by specifying their coordinates of lower-left corner and upeer-right corner, how can I determine if these two recs intersect with each other?
    Any hint appreciated!
    Thanks.

    If two h-rects intersect, there must be at least one point that is in that intersection and thus is in the interior of each one.
    To be in the interior of an h-rect means that you have a point, p, where the value of each coordinate landed in the range between the UpperLeft and the LowerRight for that coordinate.
    So to get a point in the intersection, for each coordinate, the intersection point must have a value that is simultaneously in the range for the first h-rect as well as for the second h-rect.
    This means that the two h-rects must have overlapping ranges in every single coordinate.
    So if the two h-rects have an overlapping range in every single coordinate then they intersect, otherwise they do not.

  • Reading coordinates in waveform chart graph

    hello!
    i have a problem using the labview, and i hope someone could help me.
    so, i have a project for a class, and for that project, i have to read the coordinates on the waveform chart.
    in vissim, there is a simple command, if you click the right mouse button on plot, you have an option "read coordinates".
    basically, i didnt found that or similar option in labview.
    if someone knows how to read the coordinates accurately , i'd appreciate if you would help.
    thanks

    Mouse down event wire click location to Map XY To Coordinates.... ?
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Waveform graph:move cursor automatically to know coordinate

    Good Day
    Can i know how to move cursor automatically in the waveform graph
    example: i have known Y =2 what is the value of  x is...
    which properties in property node should i use?
    attached also my vi (Coordinate of XY data using cursor)
    Best Regards
    Ahmad Tarmimi
    Solved!
    Go to Solution.
    Attachments:
    coordinate XY.vi ‏40 KB

    Good Day
    I was trying to program the cursor automatically but it does'nt seem working for me..
    Can you please advise me on this matter... 
    Attached also my study pupose vi
    Best Regards
    Ahamd Tarmimi
    Spoiler (Highlight to read)
    Attachments:
    cursor adjustment.vi ‏53 KB

  • Changing coordinate updates waveform chart?

    Hi All, hope everyone is having a wonderful 4th of July.
    Alright, so I am new to labview and finding my things around the simple things pretty well, but having never taken any sort of programming interest, Im a bit behind in machine logic, so I figured I would ask here. 
    EDIT: using labview 2009.  Have Vision package
    The research I am doing involves analyzing Electron Speckle Pattern Interferometry (ESPI) images and their fringes to observe fracture points/potential weaknesses in different materials and such.  I have made a simple VI which allows me to draw a line on the ESPI image and output the light intensities to a waveform chart to make it easier to objectively determine the size of the plastic region (area where fracturing is most likely to occur).
    What I would like is to be able to draw or set the coordinates of the line initially, then somehow be able to move it vertically -- using either simply my mouse or a numeric controller -- and have the waveform chart update in real time as i do it. 
    Any suggestions?  Ive attatched my programs, the one called "line.vi" uses numeric input to determine the line coordinates. 
    Also, since i dont sem to be able to attach bitmaps, ive uploaded a sample image here http://img594.imageshack.us/img594/3566/espiimage.png  I dont know why imageshack converted it to a PNG though
    thanks all
    Solved!
    Go to Solution.
    Attachments:
    line.vi ‏50 KB
    light intensity line.vi ‏47 KB

    Hi itschad,
    did you read the context help of the chart? There it is shown what datatype you need to wire to plot more than one curve on the some chart...
    "This made a weird issue where once I select the line, the intensity profile keeps adding itself over and over again onto the end of the chart, so a chart that might initially have been 100 datapoints, just keeps getting longer and longer."
    This is how charts work. They keep a history (that you constantly clear). You can set the size of the history buffer. If the default of 1024 points is too much for you you may decrease this to 100 - it's just a right-click away... Otherwise you should use a graph, as a graph only plots the points that are currently wired to it (it doesn't keep a history of previous values).
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    test horizontal shift.vi ‏48 KB

  • How can the coordinates of an intersection point of a cross

    there is a cross on a chart and i need the coordinates of the intersection point as a reference for further measurements

    The simplest way is pattern matching. Train the routine with the cross, then search for it. It should always be within about 1 pixel of the intersection. You can use sub-pixel accuracy to improve the results sometimes.
    To improve the pattern matching results, you can use edge or peak finding routines to find the horizontal and vertical lines that make up the cross. You can determine the center from these lines.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • Intersection coordinates ?

    Hi,
    Is it possible to get coordinates of the intersection points when I intersect two geometries (e.g. a line with a polygon) using Oracle Spatial ?
    Thanks

    Have you read Re: point of intersection

  • How do you save a Waveform Graph as an X Y chart + be able to save the coordinates at a variable iteration?

    I am trying to do this with an O-Scope VI, and I am very new at LabVIEW, so please excuse any errors, or obvious questions.

    Hi Nick,
    Which specific VI or set of VIs are you using to get this data? In order to put data in an XY Graph you will need to put together a cluster of your X and Y data and feed it to the XY Graph. You prepare the cluster by developing an array of X coordinates and an array of Y coordinates and bundling them (Using a Bundle function) into a cluster.
    By variable iteration do you mean an iteration of the user's choice, or a specific iteration count (like every 10th iteration)? Choosing when to load data into the cluster or when to display new data on the XY Graph can be done by using case structures and a button on the front panel. You could also use the iteration [i] terminal of your loop and some math and Boolean logic to choose when to execute certain commands.
    Some resources that might help a new user:
    http://zone.ni.com/devzone/cda/tut/p/id/5054
    http://zone.ni.com/devzone/cda/tut/p/id/5247
    http://zone.ni.com/devzone/cda/tut/p/id/5243
    http://zone.ni.com/devzone/cda/tut/p/id/7605
    Will
    Certified LabVIEW Architect, Certified Professional Instructor
    Choose Movement Consulting
    choose-mc.com

  • How to query objects intersecting the coordinates

    Hi all,
    I am an Oracle Spatial Newbie. I made a search on the Google but could not find a simple answer for a simple question. I migrated my database from PostGIS to Oracle. I would like to learn the Oracle version of my PostGIS query:
    SELECT * from ykn WHERE ST_Intersects(poly, ST_MakeEnvelope(30.0, 37.792 , 30.1, 37.8,900914));
    All my records are converted to Oracle geometry type using a conversion tool. And also the R-tree index is added. I also would like to know how to query if the query has to be different to use the index.
    I'll be glad if you could help.
    Kindest Regards
    telmessos

    telmessos,
    By the way, what is the A here? I thought it is the table name and replaced A with YKN but got the same message."A" is an alias for the table YKN. You HAVE to use an alias whenever dereferencing the fields of any Oracle object. SDO_GEOMETRY
    is an Oracle object and sdo_srid is a field of that object so, to access its value you have to use an alias.
    Now, the original query - assuming the table sdo_geometry column is called POLY - didn't have an alias which would be confusing:
    select a.poly.sdo_srid from ykn where rownum < 2;
    -- Result
    ORA-00904 - "A"."POLY"."SRO_SRID": invalid identifier.What is missing here is the alias a after the table name YKN as in the following:
    select a.poly.sdo_srid from ykn a where rownum < 2;So, what we have is a rule
    Whenever accessing the fields / methods of an SDO_GEOMETRY we must:
    +1. Alias the table+
    +2. Use the alias when accessing column methods or fields eg <alias>.<column>.<field/method>+
    An example:
    select a.geom.sdo_gtype, a.geom.sdo_srid, a.geom.sdo_point.x, a.geom.sdo_point.y, a.geom.get_WKT() as wkt
      from projpoint2d a
    where rownum < 3;
    -- Results
    GEOM.SDO_GTYPE GEOM.SDO_SRID GEOM.SDO_POINT.X GEOM.SDO_POINT.Y WKT
    2001           NULL          363088.42        5405618          POINT (363088.42 5405618.0)
    2001           NULL          363202.85        5407375.46       POINT (363202.85 5407375.46)Note: All column above are fields of sdo_geometry except get_WKT() which is a method of sdo_geometry but still needs an alias to execute.
    HTH
    regards
    Simon

  • How to find intersection point between a lineseries and a vertical line.

    I have a lineseries chart (refer the screenshot). As I move the spend slider shown in the attachment, a vertical line is drawn in the chart. (I did this using the cartesian canvas as annotation element - using canvas.moveTo(), canvas.lineTo() functions)
    I want to find out the intersection point(y value) where the vertical line meets the lineseries. Can someone help me on this. It will be really helpful.
    Thanks,
    Jayakrishnan

    Here are a few functions I wrote years ago for common chart transformations... the function you're going to focus on for your solution is chartToScreen...
    *  Converts the screen position to chart value position
    *  @param thePos - Number - The position you want to convert
    *  @private
            private function getChartCoordinates(thePos:Point):Object
                   var tmpArray:Array = dataTransform.invertTransform(thePos.x, thePos.y);
                   return {x:tmpArray[0], y:tmpArray[1]};
    *  Takes a non-numeric chart value and returns a proper numeric value
    *  @param inValue - String - The display name of the instance showing on the axis (eg. if we're showing months, it might be 'Sep - 06'
    *  @param theAxis - IAxis - The axis on which we're looking
              public function getNumericChartValue(inValue:String, theAxis:IAxis):Object
                   var axisCache:Array = new Array({inValue: inValue})                 
                   if(!(theAxis is LinearAxis))
                        theAxis.mapCache(axisCache, "inValue", "outValue", true);
                        return {numericValue: axisCache[0].outValue}
                   else
                        return {numericValue: Number(inValue)};
    *  Converts the chart values into screen coordinate values
    *  @param chartX - Number - The display name of the instance showing on the axis (eg. if we're showing months, it might be 'Sep - 06'
    *  @param chartY - Number - The axis on which we're looking
              public function chartToScreen(chartX:Number, chartY:Number, theSeries:Series):Point
                   var tmpCache:Array = new Array({chartX:chartX, chartY:chartY});
                   if(theSeries)
                        theSeries.dataTransform.transformCache(tmpCache, "chartX", "screenX", "chartY", "screenY");
                   else
                        dataTransform.transformCache(tmpCache, "chartX", "screenX", "chartY", "screenY");
                   return new Point(Math.round(tmpCache[0].screenX), Math.round(tmpCache[0].screenY));
    *  takes a point in mouse position, and runs it through converting to chart coordinates, converts chart coordinate to numeric value if needed
    *  and then back into mouse position to get the nearest axis snap point
    *  @param thePoint - Point - The position we're converting
    *  @private
              private function getSnapPosition(thePoint:Point):Point
                   var chartPoint:Object = getChartCoordinates(new Point(thePoint.x, thePoint.y));
                   //if either of the axis chart results is not in numeric format, we get the numeric equivalent of it
                   var chartX:* = chartPoint.x;
                   var chartY:* = chartPoint.y;
                   chartX = getNumericChartValue(chartPoint.x, CartesianChart(this.chart).horizontalAxis).numericValue;
                   chartY = getNumericChartValue(chartPoint.y, CartesianChart(this.chart).verticalAxis).numericValue;
                   return chartToScreen(chartX, chartY, null);

  • [VBA] how to catch the coordinates of a value on a pivot

    Hi to all
    I have a pivot T (i.e. see below)
    Suppose I click inside the  cell with  "16"... I need to have (in VB script) to have the coordinates of the pivot  cell (as well as
    GETPIVOTDATA give in formulas).
    Do you know a way to obtain (in that example) the "CCC", "z","feb" values when I click on number 16?
    I would like to have the text that is written inside the tool tip
    thank you
    Daniele.b75

    I'm sure that there is a better way, but this should work:
    Sub PivotTableReading()
        Dim PT As PivotTable
        Dim PF As PivotField
        Dim PI As PivotItem
        Dim rngC As Range
        Dim strVal As String
        Dim strValName As String
        Set rngC = Selection.Cells(1)
        On Error GoTo ErrHandler
        For Each PT In ActiveSheet.PivotTables
            If Intersect(rngC, PT.DataBodyRange) Is Nothing Then GoTo NextPT
            For Each PF In PT.PivotFields
                For Each PI In PF.PivotItems
                    If Not Intersect(rngC, PI.DataRange) Is Nothing Then
                        strVal = strVal & IIf(strVal = "", "", Chr(10)) & PF.Name & ": " & PI.Name
                    End If
                Next PI
    RHere:
            Next PF
    NextPT:
        Next PT
        If strValName <> "" Then strVal = strVal & Chr(10) & strValName & ": " & rngC.Value
        MsgBox strVal
        Exit Sub
    ErrHandler:
        strValName = PF.Name
        Resume RHere
    End Sub

  • How can I convert an xy graph a waveform graph?

    hi!!
    Everything is in the title!! I've made an XY graph and I would like to convert it into a waveform. To create this XY graph I give only the coordinates of each point.
    Thanks

    Hi
    As far as I know this is not really possible with a built in function, you will have to do it yourself. In a XY-graph, XY-pairs are painted and connected. A waveform is defined by starttime, dt and the y-values. So if you want to make a waveform, you have to find a dt for the data in your xy-graph. This value will replace the x-value, as each y is at a defined x (yi = t0 + dt*i). In addition to that, you will have to set the y-values at the correct index, which obviously results in an array with zeros between the given values. To avoid this, you will have to interpolate the y-values between your given y-values.
    Just an example:
    xy-data (x/y): (0/2),(1/4),(1.5/3),(2.5/0)
    This would result in the following waveform:
    t0 = 0
    dt = 0.5
    y (before interpolation) 2,0,4,3,0,0,0
    Interpolate the missing y values and you should get this waveform:
    to = 0
    dt = 0.5
    y (after interpolation) 2,3,4,3,1.5,0
    Hope this helps.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...

  • How do I Get the value from a mouse click - on a waveform graph?

    If I have made a plot into a Waveform Graph and later want to do a zoom of my data
    (Not zoom into the Waveform Graph, but regenerate the data). How do I read the mouse
    coordinate if I click on the graph window. I know how to put up the horiz and vert
    cursors but don't know how to just read the mouse click. I would really like to
    follow the windows standard that identifys a rectangle by clicking and draging and then
    be able to read the corners of the rectangle. Thanks, Rick
    PS: Using Labview 6i

    I would recommend to 'translate' your graph in a picture and dislay it in a picture control (see picture examples in LV6).
    Once you did it, pictures have an extremely useful property called Mouse that returns the mouse coordinates and click events when you place the cursor on the picture.
    By this you can re-arrange the graph on picture appearance.
    There are also other methods such as using a Window's API that returns the mouse position referred to the whole screen window, but I believe this would be much more difficult to implement.
    Let me know if this was clear and if you need an example vi.
    Good luck,
    Alberto

  • How can I label the peak in the waveform graph!

    Hello, my question is a little vague. I try to narrate it clearly.
    Thank you for your patience!
    I work with Labview 7.1. At a word, My question is how to label the
    peaks when using the while loop and the event structure with
    the dobule click event!
    1.Open the Why.VI and execute it.
    2.Click in the 'Acquire signal', then you will find two modes to upload
    the signals, press the 'Read' button and ignore the 'Sample',since 'Sample'
    mode need the support from the hardware, while 'Read' mode just upload file
    from disk,  select the 'Signal.txt'(inluded in the attachment), you will
    find two waveform shown in waveform graph,just like 'Pic1.jpg'. Up to now,
    there is no problem.
    3.Press on the 'Analysis' button and enter a new interface. Amplify the plot
    and selet the the a piece of waveform between about 3.02 and 3.06. Set the
    x coordinate of the 'Cursor 0' as 3.03 and set the width as 0.01. Move the cursor
    you will find two cursors(one vertical lines in yellow and another in blue).
    Double click the graph and select 'valley', two x coordinate values corresponding
    to the x coordinate of the two valleys are listed in the listbox. All above
    mentioned is shown in 'Pic2.jpg'.
    4.Let me explain my idea and my question now. What I have done is plot the waveform
    when clicking in 'Analysis' interface;then, amplify the waveform, select
    a certain area and move the cursors;at last, double click the graph, the waveform
    between the two cursors are selected and the peaks are identified.But, what I need
    next is to label the peaks in the graph as soon as I double click the graph,I
    can not realize this idea because the waveform is out of the while event, the coordinates
    of the peaks can not output until the while event is stopped. If I move the graph
    into the while loop,the selected area can not be keeped because the while loop will
    run continuously and will renovate the plot area to original area, but I want to keep
    the selected area for got the peaks conveniently. In short, My question is about how
    to label the peaks in the graph and keep the seleced area freely.
    This problem has puzzled me for a long time. May anyone give me some advice.
    Thank you for patience and really appreciate your help!
    BTWlease let me know if the VI can not run well!
    Attachments:
    Calculate velocity.vi ‏271 KB
    why.llb ‏389 KB
    Acquire.vi ‏213 KB

    Sorry, I try to compress the files in '.rar' ,but it is compatible with the web,I have to
    upload them in reply file.
    Attachments:
    signal.txt ‏684 KB
    Save file.vi ‏103 KB
    Get Waveform Time Array(0).vi ‏46 KB

  • Calculating intersection of circles giving NaN first 'round'.

    See attachment.
    When I give the correct parameters as input, the output is always NaN.
    However, when I run the VI again, the correct x,y coordinates are returned.
    Obviously this is not correct behaviour I want in my VI. What did I do wrong here?
    Thanks,
    Marvin
    Solved!
    Go to Solution.
    Attachments:
    Calculate Intersection Circles.vi ‏32 KB

    marvin117 wrote:
    What's the point of local variables if they don't work that way?
    Although local variables are often demonized, there are proper uses for them.  Coming from a text-programming background, you're used to using variables and, presumably, not accustomed to things happening in parallel.  The first thing I noticed, which is certainly not obvious to anyone, is that your local variables are read in every frame of the Sequence structure immediately, but the indicators aren't written until the calculations happen in the first frame.  In this way, the Sequence structure is highly non-intuitive.  National Instruments owes you an apology for that.
    The second thing I noticed was, in your second frame, that you were using the results of calculations with a local variable in the same frame.  You'll never be able to know that the calculations will happen before the locals are read.  There's your classic race condition.
    I (almost) only use local variables to update front panel control values.  If I find myself using them to read control values, I hang my head and wish I had designed my code better.  Try to think in terms of "The wire is the variable."  It's almost always the right way to think about data, and data flow.
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

Maybe you are looking for

  • Adding field in material master

    Hi All, I am trying to add field manufacture part number in material master. In field selection Manufacture part number (mara-mfrpn) field is optional. I checked the field selection group at material type level, transaction code field selection group

  • Read_image_file command does works on Linux application server

    Hello! I have a form with a new_form_instance Trigger I wrote the read_image_file trigger to read a GIF file in an image item.It works fine on windows XP(development machine).I copied the GIF file to the same location where my fmx files are there in

  • Converting a text box to graphic

    I'm trying to copy a text box into Preview to handle it as an image. I thought I used to be able to simply copy an image from Pages, go into Preview, Open New, and paste from the clipboard. This time it's not working. In Preview, New From Clipboard i

  • Material Master--Item CAt. group.

    Dear SAP Guru's I need clarification on the following points. 1. In the Materail MAster MM02 Creation screen    In SALES org 2 : What is the diff. of General Item category group and Item category group. 2. I have a scenerio where I have out sourced m

  • Could not start Layout Designer

    When i press layout button in adobe forms (SFP) i am getting the following error.. LONG TEXT: Could not start Layout Designer (see long text) Message no. FPUIFB086 Diagnosis The forms design tool for developing the form layout could not be started; e