Splitting up plots on XY Graphs depending on zero crossing

Hi,
I posted this question earlier and thought I got a solution. Please read the old thread: http://forums.ni.com/ni/board/message?message.uid=1098899#U1098899
Basically, my problem now is that the way its being done now, whenever it crosses the zero axis with a negative slope, it temporarily creates another plot and as soon as it crosses it with a positive slope, it merges those 2 graphs together. So somewhere between the slope going from -'ve to +'ve and crossing the zero, I have an extra plot, and it distorts the colors of my plots, which seems like a bug to the user and may confuse them. I have attached a VI below where you can see this behavior in the 2D array indicator.
Attachments:
XY Example VI.vi ‏18 KB

I don't know what your intentions are with this VI, or what you mean by "temporarily creates another plot".
You've got a lot of array manipulation going on inside those loops.  You are just going to have to sit down, figure out how those loops are currently working, and how to change them if they aren't doing what you want.

Similar Messages

  • How to let the user define the colors for each plots in the graph (I use LabVIEW 7)?

    How to let the user define the colors for each plots in the graph (I
    use LabVIEW 7)?

    Hi,
    Take a look at this example, it uses property nodes to select tha
    active plot and then changes the color of that plot.
    If you want to make the number of plots dynamic you could use a for
    loop and an array of color boxes.
    I hope this helps.
    Regards,
    Juan Carlos
    N.I.
    Attachments:
    Changing_plot_color.vi ‏38 KB

  • Labeling Variable Number of Plots on a Graph?

    I'm loading up an unknown number of files and graphing them. Since it can get a bit confusing, I'd like to be able to take a portion of the file name and label each plot on my graph. Since there is a variable number of graphs, I can't seem to work around how to wire the property node. There are several other things I'd like to do with the graph, but dont know if its possible or not such as having a label pop up if your cursor is over a plot.

    You are going to have to embed the reference node for the graph into a for-loop like the attached example. File names or portions thereof are built as strings and then added into the property node Plot>>Plot Name.
    I'm not sure about how to get a label to pop up if you are over the plot. You might be able to do it with some cursors and associated code.
    Attachments:
    Graph-Names.vi ‏20 KB

  • Read from spreadshee​t and plot multiple XY graph

    I'm trying to read a text file using the "Read from Spreadsheet" function. Next I want to plot the data in it on a single XY Graph.
    The text file contains 4 coloums and the first coloumn is X axis and rest are for Y axis. I'm not able to get the multiple plots. 
    However, I could get it to plot when only a single graph is to be plotted(only 2 coloumn in file). I've attached my VI and a picture here.
    I need help in plotting multiple XY graph from the text file with the 4 coloumns.
    Solved!
    Go to Solution.
    Attachments:
    Test_1.vi ‏13 KB

    Here's a more scalable solution, useful if you have one x and many y columns.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    MultiXY.png ‏5 KB
    MultiXY.vi ‏10 KB

  • Numbers '09 :  How do I split a label in a graph

    How do I split a label in a graph into 2 lines of text. Right now, in the inspector, Axis tab, Category Axis Y, the label is "Asset Value" and shows on 1 line, I want it on 2 lines but there is nothing I can do.
    Is there some sort of code within the label that I have to put?
    Thanks!

    Is this what you want ?
    If it's that, just insert a line break in the header thru option + return.
    Yvan KOENIG (VALLAURIS, France) vendredi 21 janvier 2011 21:02:48

  • Problem Plotting a Line Graph

    I am trying to plot some line graphs on Numbers and am a new user.
    I can't seem to work out an issue. I want the numbers on the X axis to ascend from 0 onwards from left to right but at the moment they are descending from 10 to 0 left to right.
    How can I change this so the graph is plotted logically?
    Thanks in advance

    There are two basic types of X-Y charts.  All but one are "category" charts where the X axis is evenly spaced and the "numbers" are actually text. The data will be presented in the order listed in your table.  The other is a scatter chart. The icon for this chart looks like a shotgun blast.
    If your X axis numbers are evenly spaced (0,1,2,3...) you can use either type of chart.  Sort your table in ascending order and it will chart as you want it to.
    If your X axis numbers are not evenly spaced (such as 1,2,4,5,10) and you want the chart to be a true X-Y plot of the data, you have to use the scatter chart.  In contrast to the category charts where the X axis values must be in a header column/row, a scatter chart requires the X and Y data to be in data cells. You may have to move your data over a column so the X data is not in a header column.

  • Do you know a VI or a mean to remove plots from a graph?

    I'd like to remove plots from a graph and i know their
    x-cordinate do you know a VI or a mean to remove them?
    Thank you for yours answers.

    A graph is just a display of different points in graphical form. You can actually get the points out of the graph, remove the points of the plot you want to take out from the array, and put it back into the graph.
    Another way I've done it is to use the property nodes, and make the color of the line on the graph transparent. That way, the data is still there, but the plot is invisible.
    Mark

  • Two plots on one graph....

    Hi
    I am running a project where I need to follow a plot on a graph. Currently both the plots are being plotted on the graph at the same time (i am using a waveform chart) so it is hard to follow as I have to anticipate where it will be next.What i would like to do is have the plot I want to follow already displayed on the graph and then as I run the VI the new plot is written in real time.
    Is this possible?

    Here's what I had in mind (LabVIEW 8.2)
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    IncrementalPlots.vi ‏14 KB

  • How to plot a log graph using grapher with a given set of data

    hi there,
    im just wondering is it possible to plot a log graph in the grapher software with a given set of data, and also give an error bar and a best-fit line for it?
    so here is the set of data,
    Concentration of BCh (M)
    Mean % Specific Binding (%)
    Standard Deviation
    3 ×10⁻⁹
    71.52
    9.52
    1 ×10⁻⁸
    57.30
    8.56
    3 ×10⁻⁸
    39.15
    9.40
    1 ×10⁻⁷
    24.13
    10.15
    3 ×10⁻⁷
    14.77
    3.31
    1 ×10⁻⁶
    7.22
    2.02
    hope someone could help

    Try these:
    http://y.barois.free.fr/grapher/Bienvenue.html
    http://homepage.mac.com/tlindywizdumb/math/Grapher_index.htm
    http://homepage.mac.com/tlindywizdumb/math/Grapher/Grapher_HowTo.pdf

  • How to build query to give daily balance across bank accounts? (to then plot in a graph)

    How would one build a query to give daily balance across bank accounts? (to then plot in a graph)
    Assumptions:
    * There is a table TRANSACTIONS which includes columns TRANS_DATE, AMOUNT and BANK_ID. It does NOT include a column for balance. So current balance for a bank account is the sum of the AMOUNTs for that BANK_ID for example. Balance on date XX will be the sum
    of all AMOUNTS for that BANK_ID for all TRANS_DATE's prior and including the date XX.
    * There is not necessarily transactions on every day for each bank
    * Table BANKS which has BANK_ID and TITLE
    Would like a query that gives: Supply StartDate and EndDate for the query:
    Date Bank1Balance Bank2Balance Bank3Balance TotalBalance
    1/1/15 $100 $200 $100 $400
    1/2/15 $200 $200 $100 $500
    etc

    You'll find examples of queries for computing balances in various contexts in Balances.zip in my public databases folder at:
    https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169
    If you have difficulty opening the link copy its text (NB, not the link location) and paste it into your browser's address bar.
    The queries in this little demo file return balances per transaction, however, whereas you appear to wish to return balances at close of business per day.  This can easily be done by means of a subquery which sums all transactions to date.  To return
    balances for all dates regardless of whether or not any transactions have been undertaken on the day, an auxiliary calendar table can be introduced into the database to plug the gaps,  The Calendar.zip file in my same OneDrive folder has means of generating
    such a table.
    With the introduction of an auxiliary calendar table into the database a query can then be written to return the balance per customer at close of business per day over the period 2009 - 2012 covered by the data in the Transactions table:
    SELECT CustomerID, Firstname, LastName, calDate,
       (SELECT SUM(TransactionAmount)
         FROM Transactions
         WHERE Transactions.CustomerID = Customers.CustomerID
         AND Transactions.TransactionDate <= Calendar.calDate) AS Balance
    FROM Calendar,Customers
    WHERE calDate BETWEEN #2009-01-01# AND #2012-12-31#
    ORDER BY CustomerID, CalDate;
    Rows for each customer/date are returned by means of the Cartesian product of the Calendar and Customers tables (the latter analogous to your Banks table), and the subquery returns the balance at close of each day by correlating the Transactions table with
    the Customers and Calendar tables, returning the sum of all transactions per customer up to and including the date in question.  In this example credit and debit transactions are expressed as positive and negative values in a single column of course,
    but where separate credit and debit columns are used its merely a case of summing (Credit-Debit), as done in some of the examples in my demo.
    To return the data in a horizontal format per date I'd suggest the use of a report which returns one row per date, and within it a multi-column subreport in across-then down column layout, linking the subreport to the parent report on the date columns.
    Ken Sheridan, Stafford, England

  • Plotting on Log graph

    Good Day,
    I am plotting a semilog graph displayed on the front panel of my program.
    The unit on the x-axis is in frequency(Hz) and the y-axis is in dBc/Hz
    I wanted to program in such a way that the a straight line is plot between points at 10,100,1K,10K and 100KHz.That is to say I only need to key in 5 values.
    My plot now jumps back to zero as all the values set to zero by default when i do not enter value into each array cell. I hope someone out there has solution to this.
    Thank you.
    Regards,
    Daniel
    Attachments:
    Plot Result.GIF ‏37 KB

    You probably want to use an xy-graph. This way you can graph arbitrarily spaced points.
    (If you want to use a waveform graph, you must generate interpolated values for all intermediary array elements).
    LabVIEW Champion . Do more with less code and in less time .

  • Zero crossing, "Triggering" and XY-Graphs

    I'm trying to measure the electrical hysteresis of a sample.  The way in which I do this is by measuring two voltages within a circuit, sending them to my DAQ, and then plotting them in an XY-Graph to view the shape of the curve.  I can somewhat see the hysteresis, but II need to measure the "zero-crossings"; that is to say, the value of one function, when the other is 0, and vice versa.  So when V1 = 0, I want to know what V2 is, and when V2 = 0, I want to know what V1 is.  Seems simple enough, and I have included my VI.
    First I tried the ZeroCrossingPtbyPt, along witha Relay, which never seemed to trigger properly.
    Second, I tried using Trigger and Gate, but that seems to give inflated values.
    This VI can be tested by removing the DAQ assitant and replacing it with two "Generate Signal"(s),  with the same frequency, different amplitudes, and a small phase difference, and this will produce a similar effect without the real signals.
    Next, I am sending the raw voltage signals into a Waveform Graph.  However, it is impossible to get the traces to stay "still" on the graph.  In other words, if this were a real oscilloscope, there would be a "triggering" problem, and if the trigger were set to the proper value, the oscilloscope would be able to track the waveform without it jittering left to right in time.  Any ideas on this?  I've tried to change just about everything in the Waveform Graph with no difference.  Do I need to send in some other signal to get the graph to follow the waveform properly?  This is really important because it will tell me if my sample rate is good enough to capture the signal (a sine wave at 1 kHz).
     Finally, the hysteresis curve on the XY Graph seems to cover many cycles (periods) of the waveform, but I want it to cover only 1 cycle at a time, so it isn't so sketchy-looking.  It's very boxy as well.  So in short, the number of points it is plotting is fine, but it is not plotting them quickly enough, since I'd like all of the points it plots to be over a single period of the waveform.
    Please help!  Thanks in advance.
    Attachments:
    hysteresis.vi ‏176 KB

    As it turns out, the issue was that I was not collecting enough samples at a high enough sample rate from the DAQ.  This is why it worked with "Generate Signals" and did not work with the DAQ Assistant.  Because there were not enough samples, the apparent zero crossing was occuring either too early or too late, leading to an incorrect value.  Therefore, the best solution when it comes to finding zero crossings is make sure your # of samples, and sample rate are high enough to get an accurate measurement.
    As a result, this is why my XY Graph was showing blocky hysteresis loops, rather than nice smooth curve hysteresis loops.  The data being sent to it was not quick enough, and therefore the XY- Graph connected the dots between the points that it was sent, yielding a truncated loop, which appeared blocky or sketchy.
    On the issue of triggering, this can apparently be set within the DAQ Assistant in the "Triggering" tab; the key is chosing the correct channel to trigger from, and a reasonable trigger level.  This was my problem, and this is why my Graph appeared to jitter.  It was not the graph itself, but the DAQ Assistant that did not tell it the proper triggering timing.
    So, in short, I solved my own problems, but I leave this as a record for those who encounter similar problems in the future.
    Thanks.

  • How to measure time difference between zero crossing of a sine wave and rise time of a pulse on a same graph?

    I have a 50Hz sine wave and a pulse signal on a same graph. The phase difference between two is between 0-90 degrees.
    Now I need to calculate the time difference between (when the sine wave crosses zero volts) and (when the pulse rises). The frequency will stay approximately same for both signals.
    The application is for a three phase generator. In simple words, when the time difference between the zero-crossing of sine wave and the pulse rises increases, that means that the load on the generator has increases.
    I am a beginner user of LabView (version 9, 2009), maybe it is a very simple problem but I've been pulling my hair out for the last few days and coudln't figure anything out. Any help would be greatly appreciated. I am using DAQ USB-6008 to measure these voltages and pulse from the generator and a sensor
    I have attached a jpg (a graph that i just made with excel to explain). The time 't' is what I am trying to measure
    Cheers
    Awais 
    Message Edited by awais.h on 03-30-2010 11:20 PM
    Message Edited by awais.h on 03-30-2010 11:21 PM
    Solved!
    Go to Solution.

    Hi
    Thanks for the code but I'm afraid it won't work. Like you said the probability of choosing a value that is on both graphs may not happen. This is something that I would like the code to do automatically.
    But I did use the previous code posted and made some modifications to it and it seems to work perfectly. Now the next thing is to be able to get just that one value that tells you the first time difference.
    Here is what I get using that code.
    As you can see from the t Values. I only need the one that is highlighted. If there is a way to filter out the rest it would be great.
    I was thinking of a while loop and as soon as the value is higher than 3E-5 it would store the number and stop the loop, but I'm not too familiar with arrays in labview.
    Here is the the code modified.
    As you can see, it wasn't that big of a modification and it still is your code.
    I will keep trying.
    Thanks for the help
    Attachments:
    FinalShockSpeed.vi ‏55 KB

  • How to make sure plots in xy graph are present?

    Hi community,
    since updating to LabVIEW 2014 this week I have an issue with code that worked previously (or didn't but the problem was unnoticable).
    As shown in the example llb I created to showcase the issue, I'm filling xy graphs with quiete some data and then programatically colour the plots.
    The problem is that if there are too many plots then the property nodes that are to colour the plots thow errors as if the corresponding plots were not present in the graph yet - even though I used a single frame flat sequence structure to try to make sure data is written to the plot before trying to colour them.
    Maybe this would have happened in LabVIEW 2013 too - but the threshold for the number of plots was higher. All I can say is that I observed this with data sets that worked fine in LabVIEW 2013.
    To reproduce simply run "colour the graphs.vi" with sufficiently high values for "numerisch" and "numerisch 2" (50 on my machine may be more on yours). I left the error out terminals of the property nodes unwired so you get taken to the right position when the error occurs.
    Can I somehow check whether all plots are in the graphs yet? That way I could introduce a delay that makes sure I don't try to colour graphs that aren't there yet - regardless of the speed of the target PC.
    Has xy graph behavior changed in LabVIEW 2014? Or maybe its performance?
    Best regards
    Florian
    Solved!
    Go to Solution.
    Attachments:
    colour.llb ‏194 KB

    Florian,
    i cannot run your example as it requires some VIs from a LAVA-library (which i dont have installed).
    Nevertheless, there are some questions i am stumbling about:
    1. Why do you use a local variable rather the terminal to pass all plots to the indicator?
    2. If you place a wait function in the sequence frame which waits longer than the expected time for passing the data, does the error still occur?
    3. Do you run into the error if you enable panel updates before coloring the plots in order to slow coloring down?
    I can imagine that you have a race condition against the UI thread. The local variable (just like the terminal) has a buffer where the data is copied to. The UI thread will retrieve the data as soon as it is ready. I would expect the coloring to require the data be present in the UI thread already (in order to "acknowledge" the plot). So if, for any reason, the UI thread only cought 98% of all plots when you start recoloring, you race against the transfer of the last 2%.. depending on the UI thread execution speed, you can run into the error or maybe not.
    That is the reason why i want you to test for waiting times or slowing down the coloring.
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Best way to draw (not plot) on a graph?

    Hi -
    I need to alter the appearance of a graph somewhat. The user doesn't want any full grid lines, but he does want a small crosshair (like a plus sign) drawn in each of the four quadrants. The CanvasDrawLine() function would be good for this, if it worked on graph objects, but it doesn't. I guess I could use bit files, but...is there an easier/better way?
    EDIT: after reading a little more on bit maps, it's not clear to me that these will work, either. So...any other ideas at all?
    Thanks.
    Solved!
    Go to Solution.

    Going on the line of wolfgang suggestion, you could also have two graphs one on top of the other. The lower one can have all fixed elements (scales, axes, crosses and so on), while on the upper one, with transparent background, you can draw / erase your data plots. As long as you keep axes for both graphs with the same scale the system works like a charm, and you don't need to struggle with pixel conversion between the graph and the picture.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

Maybe you are looking for

  • Account determination error for Account key

    Hi Everyone, I have maintain one condition manual pricing e.g ZMRG where i m manually putting the margin of sales price this condition is only for calculation and i dont want to post it to account. But at the time of bill it is giving me account dete

  • Interview questions in gems soft sollutions freshers

    hi friends pls tell answers to theese with some sample coding 1.what is the purpose of start of selection .if there  is no start of selection does the report will run ? 2 how to pass data from one report to another report. 3. can we go from 10 th lis

  • ICal Recovery from iPod to Laptop Possible?

    I lost my iCal when my harddrive died -- though I have a recent version of my iCal postings on my iPod Classic. Is there a way to get that data back into my new iCal on my Powerbook G4? I should note that I did have my laptop backed up on an external

  • Question re/ install of Adobe Premiere - error message

    I purchased a 2-disk version of Adobe Elements 10 Photoshop/Premiere.  One disk for Mac the other Windows.  I have Windows xp pro with a 32 bit op system.  Elements install went fine.  Premiere gets hung just before the entry of the serial number.  I

  • IPod Volume Virtually Gone?

    It seems my 30GB white iPod is having some volume problems that I know are not related to the headphones. When the volume goes a little under halfway, it sounds as if it is not playing music. When I turned it down to about a fourth, I can BARELY hear