Xy -Graph with timestamp

Hi forum,
i need help again. I have a .csv file from labview where the first row is a timestamp:
08/10/201423:45:53.871
 the other rows are floating data.
I would like to read this data and plot it with timestamp on the x-Axis. How i could do this in labview.
Thanks and best
Martin
Attachments:
Capture.PNG ‏22 KB

 Hi Martin,
sorry for delay, but next time you should save your VI in LV2011…
See this:
- read in the text file and convert to array of strings
- get columns (instead of rows!) and convert each column depending on its datatype to timestamp and float
- plot data on XY graph
You went wrong on
- the format specifier for SpreadsheetStringToArray
- indexing rows instead of columns
- the whole process of data conversion: after converting to float you convert back to string to finally (trying) to convert back to timestamp…
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome

Similar Messages

  • Display saved lvm file to graph with timestamp

    Hi,
    I'm having headache displaying my data with proper time-stamping. There are so many methods to save data. here I've decided to save it as a text delimited file format as lvm. a segment of my vi screen shot is attached. I want to use this way instead of other methods is the flexibilty it offers. I will be able to add on more data to store as I develop the vi. (So I'm storing data from DAQ assistant and my calculated values.) I attached a the screenshot of the file I read too.
    I would like to use another vi to open this file and plot it to a graph/chart to display as a trending of the data acquired. Can someone pls advise mi on what is a better way for mi to do it?
    Thanks alot!
    Poh
    Solved!
    Go to Solution.
    Attachments:
    datalogging vi.JPG ‏82 KB
    logged data.JPG ‏76 KB

    Hi Krisna,
    Sorry for the late reply, I was rushing to complete my project, wasn't able to reply.
    Yes, I managed to solve it. Anyway I used such high rate in the DAQ assistant is to allow continous mode acqusition & use a software filter instead of hardware filter. however writing to file in this way - writing string into .lvm, max is 10 samples/sec. unless I use tdm (I'll then log everything).
    I wasn't able to display proper time-stamping was due to the fact that I didn't add in the start-time timestamp that's required in displaying of timestamp in waveform. I'll not be able to go down to my lab, & my machine do not have LabVIEW, so what I can do is to extract portions of my report to share.
    For the portion that I used to display graph (can be seen from the attachment), I deleted the 1st column, which is the timestamp (for spreadsheet viewing), but extracted the 1st element - the converted to DBL timestamp when I start logging in the DAQ vi (written together with the header).
    This extracted (could be seen as a bunch of numbers in the lvm file) and and converted back to timestamp type and wired to build waveform block, providing the start-time of the waveform.
    Next, I replace the use of chart with graph, as graph is suitable for plotting data acquired, and chart is better for run-time display of data. now it seemed to work fine for me, except for loading time may take a while for larger files.
    Thanks for your participation in this thread!
    Cheers!
    Poh
    Attachments:
    display graph.JPG ‏39 KB
    data.JPG ‏171 KB

  • Waveform graph with timestamp

    I have 5 arrays of data, 4 are data values and 1 is the UTC seconds.  I want to use a waveform graph as it smooths the plots so the traces look
    more rounded compared to an XY Graph.  I have experimented with bundle and build waveform setups but the best  I have been able to do is to get the timestamp along the X axis but no data shows up in the graph  or all the data shows up as but it looks like the axis is swapped but the timestamp is still at the bottom.
    Does anyone know why the waveform graph plots are smoother than the XY Graph plots.  If I knew this answer I could use the XYGraph instead.
    Thanks
    Tim C.
    1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!

    I don't notice a difference between an XY Graph and a Waveform Graph if the dt on both are the same and assuming all of the other attributes (interpolation, point style, range, etc.) are the same as shown below. To create a waveform graph and assuming that the dt is constant in your time array, you can do something like the other image. An XY graph is normally used only when the intervals on the x axis are not constant. If you see a difference, you should post your VI (with data in the arrays) so that someone can look at it.
    Message Edited by Dennis Knutson on 09-15-2007 09:38 AM
    Attachments:
    Waveform Graph versus XY Graph.PNG ‏21 KB
    Build Waveform.PNG ‏8 KB

  • Plot excel data onto X-Y graph with time stamp

    Dear all, I have the same set of data but it is saved in excel format instead of text file now. However i think the column data are separated by tab, i have tried to write some codes but it dont seem to plot out the graph properly. I have no problem ploting out data in text file but not this excel file. Can anyone help out to plot this graph with timestamp?
    Attachments:
    test4.txt ‏1 KB

    I still don't understand your comment 'I have no problem ploting out data in text file'. The Read From Spreadsheet by default uses a tab separator so you should have no problem reading the file. Post the code you have already written so someone can see where your problem is.

  • Problem with timestamp in query

    I have problem with timestamp in JPA query.
    I wonna select all data from database where difference between two timestamps is more than 3 month.
    Database:
    ID timestamp1 timestamp2
    1 20008-11-19 15:02000 20008-08-19 15:02000
    2 20008-11-19 15:02000 20008-11-14 15:02000
    @Column(name = "timestamp1", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date timestamp1;
    @Column(name = "timestamp2", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date timestamp2;
    sql query works:
    select id from table where
    MONTH( DATE(timestamp1) - DATE(timestamp2) ) > 3
    but how I can write in Java?
    I't doesnt wrk:
    Query query = em.createQuery("SELECT f.id FROM Foo f WHERE MONTH( DATE(f.timestamp1) - DATE(f.timestamp2) ) > 3 ")
    error:
    ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method .
    Exception data: <openjpa-1.0.2-r420667:627158 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: An error occurred while parsing the query filter 'SELECT f.id FROM Foo f WHERE MONTH( DATE(f.timestamp1) - DATE(f.timestamp2) ) > 3'.
    Error message: <openjpa-1.0.2-r420667:627158 nonfatal user error> org.apache.openjpa.kernel.jpql.ParseException: Encountered "MONTH (" at character 438, but expected: ["(", "+", "-", ".", ":", "", "=", "?", "ABS", "ALL", "AND", "ANY", "AS", "ASC", "AVG", "BETWEEN", "BOTH", "BY", "CONCAT", "COUNT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "DELETE", "DESC", "DISTINCT", "EMPTY", "ESCAPE", "EXISTS", "FETCH", "FROM", "GROUP", "HAVING", "IN", "INNER", "IS", "JOIN", "LEADING", "LEFT", "LENGTH", "LIKE", "LOCATE", "LOWER", "MAX", "MEMBER", "MIN", "MOD", "NEW", "NOT", "NULL", "OBJECT", "OF", "OR", "ORDER", "OUTER", "SELECT", "SET", "SIZE", "SOME", "SQRT", "SUBSTRING", "SUM", "TRAILING", "TRIM", "UPDATE", "UPPER", "WHERE", <BOOLEAN_LITERAL>, <DECIMAL_LITERAL>, <IDENTIFIER>, <INTEGER_LITERAL>, <STRING_LITERAL>].
    at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.parse(JPQLExpressionBuilder.java:1665)
    at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.<init>(JPQLExpressionBuilder.java:1645)

    The error is indocating improper formatting of your JPQL string. MONTH is not understood. I would recommend using your SQL string in a createNativeQuery(...) call instead.
    Doug

  • How to create ONE graph with a growth trend ($ and %)?

    I would like to create a graph with a growth trend.
    The graph should have figures on one side reflecting $ values and on the other % growth.
    I cannot make a trend on the same graph and usually spend ages adding another graph to show the trend. I end up making 2 graphs instead of one.
    Please refer to the following really basic graph that will give you an idea.
    ex : http://www.tellurideareahomes.com/images/graph1.jpg
    Can anyone show how to do that?

    What you want requires a bit of trickery.
    Chart the bar graph
    Chart the trend
    then move the trend one above the bar one after setting its background to none.
    If this workaround is not OK for you,
    _Go to "Provide Numbers Feedback" in the "Numbers" menu_, describe what you wish.
    Then, cross your fingers, and wait _at least_ for iWork'09 (possibly for iWork '99)
    Yvan KOENIG (from FRANCE mercredi 19 novembre 2008 11:18:45)

  • I would like to know how i can create a bell graph with out using sub VIs, the data that i created consists in 500 readings with values of 0 to 100, i calculated the mean value and standard diviation. I hope some one can help me

    I would like to know how i can create a bell graph with out using sub VIs, the data that i created consists in 500 readings with values of 0 to 100, i calculated the mean value and standard diviation. I hope some one can help me

    Here's a quick example I threw together that generates a sort-of-bell-curve shaped data distribution, then performs the binning and plotting.
    -Kevin P.
    Message Edited by Kevin Price on 12-01-2006 02:42 PM
    Attachments:
    Binning example.vi ‏51 KB
    Binning example.png ‏12 KB

  • Is it possible to create graph with in the table / Pivote table.

    Is it possible to create graph with in the table / Pivote table.
    Emp# Emp Name % Bonus Pay Amt
    111 AAA $28276
    222 BBB $78878
    In the place of Bonus I have to display Bar (Chart) instead of number.
    Is it possible in OBIEE? I know we can display chart and table next by next but my user want display just like above.
    Please help me on this issue
    Thank you very much for your time

    hi,
    it is better for 2 different questions,make 2 differents threads...
    You used the 2ond solution(google???),put in the dashboard...html enabled...and check your pdf again.
    Moreover,printing pdf with answer is discouraged...always prefer Xml Publisher.
    Last,there are 2 fst files which configure the *.pdf files , check them,
    http://obiee101.blogspot.com/2008/09/obiee-pdf-controls-fst-files.html
    hope i helped....
    http://greekoraclebi.blogspot.com/
    ///////////////////////////////////////

  • CRYSTAL REPORT GRAPH WITH DATE AND TIME

    Post Author: Dino Dentone
    CA Forum: Charts and Graphs
    Dear forum,
    I am developing a Visual Studio .net 2005 Windows Form,i have a sql table with 2 field:1) DATA (date and time)2) Temperatura (numeric)I have to make a line graph with numeric data axes.I have insert two parameters' to customize the filtering, so i can have a graph of the temperature between to date and time.If i choose two date's and time (parameters) like 20/04/2008 00:00:00 trought 20/05/2008 00:00:00 i have no problemBut if a choose a range minor of 1 day (some hours like from 15/05/2008 00:00:00 trought 15/05/2008 08:00:00) i have no graph.It sound like it don't use the time values?Thank's for the Help.

    There is some debugging info on the website. I've had problems getting the text to work. It was generally that I installed either the wrong 'version' of ImageMagick (the recommended one works for me--I'm running Vista x64 and one time installed the x64 version and it didn't work). I also installed Ghostscript to get the font list to work correctly. At one time I installed the x64 version of Ghostscript and it didn't work with the plug-in, either.
    I installed two items:
    ImageMagick: ImageMagick-6.4.9-3-Q16-windows-dll.exe
    Ghostscript: gs863w32.exe
    I don't know if it is necessary but I also added the fonts from
    ghostscript-fonts-std-8.11.tar.gz to the c:\Program Files (x86)\gs\fonts directory. Some, none, perhaps all, may already be installed just by installing ghostscript--it has been so long that I don't remember exactly. I do know that the contents of the gs fonts directory contains all the files in the .gz, I just don't remember if I put them there separately or as part of the gs install :)
    You need to make sure the font size is large enough. I usually use about 2-4% of height and export a single photo to make sure I see the text correctly.
    Tim does respond to email when he can so if you can't get it to work you can always drop him a line.

  • Xy graph with dynamic number of plots

    I've got an XY Graph with some dynamic number of plots to graph. Once I know this number, I change the LegPlots property and plot the data from an array containing all the plots. The data is displayed correctly, but I get overlapping colors. Say I'm only trying to graph 3 plots. I get three lines (good) but then the three lines have 29 colors (bad), as if it's plotting all possible plots at the data points of the three. The legend updates to only show three (good), but am I missing something else? Does the LegPlot property not govern that, but only governs the legend itself?

    If the problem is the code then I'll take a look at my mess of wire, I just wanted to see if it was the LegPlots property first.
    Here's what it looks like, just in case
    Attachments:
    toomanycolors1.JPG ‏25 KB

  • XY Graph with two Y inputs

    I need to know how to graph a XY graph with two values of Y. I need to it to compare to different angles and I also would like to make them graph different colors. Currently i have an XY graph with one Y input using the XY Graph express VI. I found out how to set up for two simultaneous plots by editing the properties for the graph but I don't know how I can input another Y value to plot using the XY Graph express VI.
    Thank You,
    Phil

    I never use the express functons but I think what will work is to use the merge signal function. Try merging the two x inputs together and merging the two y inputs together. I made a modification to the shipping example called Lissajous.vi  to try a quick test.
    Attachments:
    lissajous_mod.JPG ‏54 KB

  • LabVIEW crashes when you run a VI that contains a mixed signal graph with a multi-plot cursor.

    Hello, LV 8.2.1 notes indicates the following bug fix:
    43SAIR2A  Fixed an issue where LabVIEW crashes when you run a VI that contains a mixed signal graph with a multi-plot cursor.
    I am running this version, and still have this behavior.  Is there anything I may be missing, and/or certain circumstances that may still be causing this?
    thanks in advance,
    Darren

    Darren:
    I looked at the CAR ID that you mentioned and the issue has been resolved in LabVIEW 8.2.1. To verify something similar, I ran the attached VI and things worked just fine. Please feel free to send me the steps to follow to reproduce the issue you are running into in 8.2.1.
    Regards,
    Rudi N.
    Attachments:
    MixedGraphs.vi ‏15 KB

  • Exporting from a 2D line graph with .jpeg extension

    Is there any way to export from an ordinary 2D line graph with .jpeg extension so that with using this image i will improve my result of exporting excel.
    e.g. i have found and example and added a button as you will see when you run this code.I will click this button and it will export this line graph with extension .jpeg so that i will see it as an ordinary image at my home directory.
    Thanks for any helpful comment
    Regars,
    Serhat
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    * @author led1433
    import java.awt.*;
    import java.awt.font.*;
    import java.awt.geom.*;
    import javax.swing.*;
    public class LineGraph
        public static void main(String[] args)
            int x1 = 1000,y1 = 0;
            JFrame f = new JFrame();
            JButton exportToJPegButton = new JButton("EXPORT WITH JPEG");
            exportToJPegButton.setToolTipText("Exports Graph with extension *jpeg");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            exportToJPegButton.setSize(200,25);
            f.add(exportToJPegButton).setLocation(x1, y1);
            f.getContentPane().add(new GraphPanel());
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    class GraphPanel extends JPanel
        final int
            HPAD = 60,
            VPAD = 40;
        int[] data;
        Font font;
        public GraphPanel()
            data = new int[] {
                120, 190, 211, 75, 30, 290, 182, 65, 85, 120, 100, 101
            font = new Font("lucida sans regular", Font.PLAIN, 16);
            setBackground(Color.white);
        protected void paintComponent(Graphics g)
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            g2.setFont(font);
            FontRenderContext frc = g2.getFontRenderContext();
            int w = getWidth();
            int h = getHeight();
            // scales
            float xInc = (w - HPAD - VPAD) / 11f;
            float yInc = (h - 2*VPAD) / 10f;
            int[] dataVals = getDataVals();
            float yScale = dataVals[2] / 10f;
            // ordinate
            g2.draw(new Line2D.Double(HPAD, VPAD, HPAD, h - VPAD));
            // tic marks
            float x1 = HPAD, y1 = VPAD, x2 = HPAD - 3, y2;
            for(int j = 0; j < 10; j++)
                g2.draw(new Line2D.Double(x1, y1, x2, y1));
                y1 += yInc;
            // labels
            String text; LineMetrics lm;
            float xs, ys, textWidth, height;
            for(int j = 0; j <= 10; j++)
                text = String.valueOf(dataVals[1] - (int)(j * yScale));
                textWidth = (float)font.getStringBounds(text, frc).getWidth();
                lm = font.getLineMetrics(text, frc);
                height = lm.getAscent();
                xs = HPAD - textWidth - 7;
                ys = VPAD + (j * yInc) + height/2;
                g2.drawString(text, xs, ys);
            // abcissa
            g2.draw(new Line2D.Double(HPAD, h - VPAD, w - VPAD, h - VPAD));
            // tic marks
            x1 = HPAD; y1 = h - VPAD; y2 = y1 + 3;
            for(int j = 0; j < 12; j++)
                g2.draw(new Line2D.Double(x1, y1, x1, y2));
                x1 += xInc;
            // labels
            ys = h - VPAD;
            for(int j = 0; j < 12; j++)
                text = String.valueOf(j + 1);
                textWidth = (float)font.getStringBounds(text, frc).getWidth();
                lm = font.getLineMetrics(text, frc);
                height = lm.getHeight();
                xs = HPAD + j * xInc - textWidth/2;
                g2.drawString(text, xs, ys + height);
            // plot data
            x1 = HPAD;
            yScale = (float)(h - 2*VPAD) / dataVals[2];
            for(int j = 0; j < data.length; j++)
                y1 = VPAD + (h - 2*VPAD) - (data[j] - dataVals[0]) * yScale;
                if(j > 0)
                    g2.draw(new Line2D.Double(x1, y1, x2, y2));
                x2 = x1;
                y2 = y1;
                x1 += xInc;
        private int[] getDataVals()
            int max = Integer.MIN_VALUE;
            int min = Integer.MAX_VALUE;
            for(int j = 0; j < data.length; j++)
                if(data[j] < min)
                    min = data[j];
                if(data[j] > max)
                    max = data[j];
            int span = max - min;
            return new int[] { min, max, span };
    }

    GraphPanel stays the same.
    public class JpegExport {
        public static void main(String[] args) {
            final GraphPanel graphPanel = new GraphPanel();
            JButton exportToJPegButton = new JButton("EXPORT WITH JPEG");
            exportToJPegButton.setToolTipText("Exports Graph with extension *jpeg");
            exportToJPegButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    exportToJpeg(graphPanel);
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(exportToJPegButton, BorderLayout.NORTH);
            f.getContentPane().add(graphPanel, BorderLayout.CENTER);
            f.setSize(400, 400);
            f.setLocationRelativeTo(null);
            f.setVisible(true);
        private static void exportToJpeg(GraphPanel graphPanel) {
            try {
                int w = graphPanel.getWidth();
                int h = graphPanel.getHeight();
                BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
                Graphics2D g2 = image.createGraphics();
                graphPanel.paint(g2);
                g2.dispose();
                ImageIO.write(image, "jpeg", new File("export.jpg"));
            } catch (IOException e) {
                e.printStackTrace();
    }

  • Formating Line thickness for lines in graphs with more than 6 lines.

    I have a line graph with more than 6 lines on it and I'm trying to make them all 1px.
    I can specify a line thickness for the first 6 lines but after that, the lines go back to the default thickness.
    Is it possible to change the default line thickness for a graph or format the line thickness for the 7th line and more?

    Good news! I found out how to format more than 6 lines of data and it's really simple to do!
    In the bottom left hand corner of the Format Chart Data, next to the Clear All button, is a button marked ADD.
    If you click this button, another row is added allowing you to format the 7th line of data.
    Click again and you get a row for the 8th line and keep clicking to add more lines.
    I'm making a note of it here in case it is useful to someone out there who searches on this problem in the future.
    Edited by: user2052587 on Jan 6, 2010 2:45 PM

  • How do I create a graph with two different y-axis variables with the same x-axis (therefor having two curves)?, How do I create a graph with two different y-axis variables with the same x-axis (therefor having two curves)?

    How do I create a graph with two different y-axis variables with the same x-axis (therefor having two curves)?, How do I create a graph with two different y-axis variables with the same x-axis (therefor having two curves)?

    Hi Libby,
    Select all three columns of data. All three must be 'regular' columns, not Header columns, and the X values must be in the leftmost column.
    Click the Charts button and choose the Scatter chart.
    The resulting chart will initially show only the first and second columns of data, and the selection will have been reduced to show this.
    Click the gear icon at the top left of the selection and choose Share X Values.
    You should see a result similar to this:
    Notes:
    The values on my sample table contain a random element, so they have changed from thhe first image to the second.
    The chart is as created by Numbers, with two edits:
    Data points have been connected with curves, using the Chart nspector.
    The curves were selected and their stroke increased to 2pts, using the stroke formating button in the format bar.
    Regards,
    Barry

Maybe you are looking for

  • GL account needs to block for local currency & another cur. needs to post

    Hi, I need GL account that should block for posting in local currency, it should post other(forgien) currencies. how can i handle this scnerio. if there is any balance,is it possiable to maintain validation.could you please let me know,how i can reso

  • Geocaching Live Nokia E7-00 Belle

    Since Belle I can't install my favorite geocaching Java App. Nokia E7-00 Belle On Anna it was not a problem. When I try to install it I get an internal error "java.lang.SecurityException: METS_INF/LIVE.SF  has invalid digest for v.class in E:\Install

  • How to change the languaje in Audition?

    How to change the languaje in Audition?

  • Deactivate DW CS3 / email support

    Hi, I'm trying to deactivate DW CS3 on an Mac (10.4) to be able to use it on my new Mac, but the deactivation does not work. I go to Help > deactivate, but all I get an error (194:1). As I'm in Germany I phoned the German custom support. They can't h

  • [Solved] Samsung SCX-4300 Printer Problem

    Hi everyone. I installed Arch Linux today. Everything is fine except printer. I am using Samsung SCX-4300 printer and scanner. Scanner works fine but CUPS doesn't see the printer. I can't see anything on CUPS web interface's Local Printers area. Here