Strip chart time stamp x-axis

Hello,
I have a strip chart and want to set the x-axis to current time from system.
How to do it please?
Thanks

Give this a shot:
http://digital.ni.com/public.nsf/allkb/6F0054EEABA​FE4B886256F2700012142
Mark P.
Applications Engineer
National Instruments
www.ni.com/support

Similar Messages

  • Waveform graphic / chart time display (x-axis) is wrong?

    Why the time is incorrect in waveform graphic / chart? How to solve it?
    When I run the program, I find that waveform graphic/chart show 0 to 20 (time/x-axis) but actual is running 30 second.

    The Build Waveform is on the Waveform palette. You can use it to set the dt. It's a fancy cluster. The dt is your loop rate in seconds. I would assume you have some wait or delay function that you are using to set the loop rate.
    You can also use a property node - XScale.Range. Offset and Xscale.Range.Multiplier. Look at the example called Real Time Chart.

  • How do I add a time stamp to the moving "Major Grid Lines" of a Waveform Chart?

    Hello
    I am using LV 8.5.1
    I am using a Waveform Chart and I have turned on the "Major Grid LInes" using the properties tab of my waveform chart. (properties-->scale->grid lines)
    When the code executes, I want to attach  a time stamp to each moving yellow grid line.
    So as the grid lines move from right to left, there is an associated time stamp for each.
    Can someone help!
    thanks
    J
    Solved!
    Go to Solution.
    Attachments:
    how do I add time to the yellow grid lines.vi ‏16 KB

    hova2010,
    If you right click on your graph and go to X Scale >> Style >> and then choose one of the 3 styles on the far left you shoul see timestamps for those grid lines.
    Ben Sisney
    FlexRIO V&V Engineer
    National Instruments

  • How to read multiple Digital samples and plot a chart with time stamps

    Hi,
     Could anyone send me a code that:
    1. Reads 'multiple samples(lets say 4) from single digital input' 
    2. 'plot digital data as a chart with time stamps'
    3. Find frequency
    4. Log data into file with time stamps
    I have attached the code which i tried.
    Thanks,
    LK
    Attachments:
    DigitalNSample.vi ‏27 KB
    DigitalNSample.vi ‏27 KB

    Hi,
     Could anyone send me a code that:
    1. Reads 'multiple samples(lets say 4) from single digital input' using NI USB 6009 or NI USB 6251.
    2. 'plot digital data as a chart with time stamps'
    3. Find frequency
    4. Log data into file with time stamps
    I have attached the code which i tried.
    Thanks,
    LK
    Attachments:
    DigitalNSample.vi ‏27 KB

  • Time stamp on Waveform Charts

    I'm making an application where I sample data every 5 seconds. I use the Time Delay VI to obtain the sampling interval, and then set the chart options using chart properties/format and precision/relative time. The chart is adding a point every 5 secs as it should, scale looks ok. However, the time scale on the graph is incrementing only one second at the time (although actual time elapsed is 5 secs). The log file gives the time stamps just as it should. Is there a way to make the waveform chart give the real time (other than the obvious solution of sampling 1 pt/sec)?

    I'm just directly passing scalar values to the chart. The total acquisition time is about an hour, and the idea is to display data as they vary with time.

  • Stack strip chart x axis

    Hi y'all
    is there a way, besides just putting one strip chart on top of another strip chart and have it aligned just right to hide the x axis and be on the same x scale as the others. For example: Schart #1 represents the pressure in the system, Schart #2 current , Schart #3 voltage.
    Now I could have all these on one strip chart but while acquiring data it is hard to determine one line from another when you have 16 channels scrolling past on the same strip chart.
    What I am looking for is something like the digital graphs where you have multiple views on the same x axis. 
    Is there a way to do this besides stacking strip charts on top of one another?
    Are there any proposed changes coming that would include this?
    Thanks

    As far as I know there is no possiblity to obtain your goal other than stacking more charts one on top of each other. The digital graph is lot more simple as digital signals can have only 0 or 1 value, so it is possible to plot them on the same graph with some y-offset without losing the real meaning of the signal itself. With analog signals this is considerably more complex, as each of them must reference to an analog scale.
    Alternative ways to address your situation are to use the secondary Y-axis to hold some of the plots or to use the legend to permit hiding/showing individual plots to make easy to the user to read the chart.
    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?

  • Graph plot with time stamp

    Hello All,
    In my attached VI I am facing some issues.
    My loop rate is 100ms and in chart plot data is not appering as per the x-scale(Time stamp). Values are just plotting in the chart without time. I am trying to implement a graph program that should show values according to time loop rate can be different. 
    In attached VI I have chart and XY graph both. Please have a look and suggest me the valuable modifications.
    Thanks and Regards
    Himanshu Goyal | LabVIEW Engineer- Power System Automation
    Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
    It Only gets BETTER!!!
    Attachments:
    Graph.vi ‏14 KB

    Hello Ben,
    Thanks for your valuable inputs.
    I don't have waveform data from the field, its only RS232 communication and each and every 100 ms interval I am getting only one value from the device. Now in current program I am using the chart function. But the value(Y-Axis) and the time(X-Axis) sync in not proper. To avoid this i am planning to implement this using XY Graph so I develop this sample VI. Here if you browse and observer in the code I have both chart and XY graph, in chart you can see my current implementation. If you run this code for few seconds you will get some difference in Y-Axis and X-Axis values plot time difference.
    Now If I am talking about XY graph on X axis I can send my system time with the field value to avoid this chart issue. (I am trying to implement same in XY Graph)
    Today I achieve the target by done offset and some chart property settings. Now I am looking for same in XY Graph.
    Thanks and Regards
    Himanshu Goyal | LabVIEW Engineer- Power System Automation
    Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
    It Only gets BETTER!!!

  • Date/Time on X-Axis with JFreeChart

    Hi guys,
    I've asked this question on the JFreeChart forums, but got no response.
    If anyone has any experience with JFreeChart, help would be most appreaciated.
    I am drawing a XY Line Chart to display CPU usage retrieved from a database. The user can search with specific dates/times (eg: from: 24/2/2005 to: 16/4/2005) - and then these results would be graphed.
    My question is, how do I use dates/times on the X-axis using JFreeChart?
    The results I am getting from the DB would be a time-stamp and CPU usage.
    Here is my current code, but it wont work with a time-stamp:
    public static class ChartTest   {
        public ChartTest()
            // create a dataset...FOR LOOP
            XYSeries dataSet = new XYSeries("CPU Usage");
            TimeSeries closing = new TimeSeries( "Closing Value", Day.class );
         for(int h=0; h < newArray[0].length; h++)
            for(int i=0; i < newArray.length; i++)
               dataSet.add(newArray[i][h], newArray[i][h++]);
            XYDataset xyDataset = new XYSeriesCollection(dataSet);
            // create a chart...
            JFreeChart lineGraph = ChartFactory.createXYLineChart
                        ("Mitch's CPU Usage Test",  // Title
                          "Time",           // X-Axis label
                          "CPU Load",           // Y-Axis label
                          xyDataset,          // Dataset
                          PlotOrientation.VERTICAL,        //Plot orientation
                          true,                //show legend
                          true,                // Show tooltips
                          false               //url show
            // create and display a frame...
            ChartFrame frame = new ChartFrame("CPU Usage Test", lineGraph);
            frame.pack();
            frame.setVisible(true);
        }

    The JFreeChard demo should give you the idea
    package demo;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.text.SimpleDateFormat;
    import javax.swing.JPanel;
    import org.jfree.chart.*;
    import org.jfree.chart.axis.DateAxis;
    import org.jfree.chart.plot.XYPlot;
    import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer;
    import org.jfree.data.time.*;
    import org.jfree.data.xy.XYDataset;
    import org.jfree.ui.*;
    public class TimeSeriesDemo1 extends ApplicationFrame
        public TimeSeriesDemo1(String s)
            super(s);
            XYDataset xydataset = createDataset();
            JFreeChart jfreechart = createChart(xydataset);
            ChartPanel chartpanel = new ChartPanel(jfreechart, false);
            chartpanel.setPreferredSize(new Dimension(500, 270));
            chartpanel.setMouseZoomable(true, false);
            setContentPane(chartpanel);
        private static JFreeChart createChart(XYDataset xydataset)
            JFreeChart jfreechart = ChartFactory.createTimeSeriesChart("Legal & General Unit Trust Prices", "Date", "Price Per Unit", xydataset, true, true, false);
            jfreechart.setBackgroundPaint(Color.white);
            XYPlot xyplot = (XYPlot)jfreechart.getPlot();
            xyplot.setBackgroundPaint(Color.lightGray);
            xyplot.setDomainGridlinePaint(Color.white);
            xyplot.setRangeGridlinePaint(Color.white);
            xyplot.setAxisOffset(new RectangleInsets(5, 5, 5, 5));
            xyplot.setDomainCrosshairVisible(true);
            xyplot.setRangeCrosshairVisible(true);
            org.jfree.chart.renderer.xy.XYItemRenderer xyitemrenderer = xyplot.getRenderer();
            if(xyitemrenderer instanceof XYLineAndShapeRenderer)
                XYLineAndShapeRenderer xylineandshaperenderer = (XYLineAndShapeRenderer)xyitemrenderer;
                xylineandshaperenderer.setDefaultShapesVisible(true);
                xylineandshaperenderer.setDefaultShapesFilled(true);
            DateAxis dateaxis = (DateAxis)xyplot.getDomainAxis();
            dateaxis.setDateFormatOverride(new SimpleDateFormat("MMM-yyyy"));
            return jfreechart;
        private static XYDataset createDataset()
            TimeSeries timeseries = new TimeSeries("L&G European Index Trust", org.jfree.data.time.Month.class);
            timeseries.add(new Month(2, 2001), 181.8);
            timeseries.add(new Month(3, 2001), 167.3);
            timeseries.add(new Month(4, 2001), 153.8);
            timeseries.add(new Month(5, 2001), 167.6);
            timeseries.add(new Month(6, 2001), 158.8);
            timeseries.add(new Month(7, 2001), 148.3);
            timeseries.add(new Month(8, 2001), 153.9);
            timeseries.add(new Month(9, 2001), 142.7);
            timeseries.add(new Month(10, 2001), 123.2);
            timeseries.add(new Month(11, 2001), 131.8);
            timeseries.add(new Month(12, 2001), 139.6);
            timeseries.add(new Month(1, 2002), 142.9);
            timeseries.add(new Month(2, 2002), 138.7);
            timeseries.add(new Month(3, 2002), 137.3);
            timeseries.add(new Month(4, 2002), 143.9);
            timeseries.add(new Month(5, 2002), 139.8);
            timeseries.add(new Month(6, 2002), 137.0);
            timeseries.add(new Month(7, 2002), 132.8);
            TimeSeries timeseries1 = new TimeSeries("L&G UK Index Trust", org.jfree.data.time.Month.class);
            timeseries1.add(new Month(2, 2001), 129.6);
            timeseries1.add(new Month(3, 2001), 123.2);
            timeseries1.add(new Month(4, 2001), 117.2);
            timeseries1.add(new Month(5, 2001), 124.1);
            timeseries1.add(new Month(6, 2001), 122.6);
            timeseries1.add(new Month(7, 2001), 119.2);
            timeseries1.add(new Month(8, 2001), 116.5);
            timeseries1.add(new Month(9, 2001), 112.7);
            timeseries1.add(new Month(10, 2001), 101.5);
            timeseries1.add(new Month(11, 2001), 106.1);
            timeseries1.add(new Month(12, 2001), 110.3);
            timeseries1.add(new Month(1, 2002), 111.7);
            timeseries1.add(new Month(2, 2002), 111.0);
            timeseries1.add(new Month(3, 2002), 109.6);
            timeseries1.add(new Month(4, 2002), 113.2D);
            timeseries1.add(new Month(5, 2002), 111.6);
            timeseries1.add(new Month(6, 2002), 108.8);
            timeseries1.add(new Month(7, 2002), 101.6);
            TimeSeriesCollection timeseriescollection = new TimeSeriesCollection();
            timeseriescollection.addSeries(timeseries);
            timeseriescollection.addSeries(timeseries1);
            timeseriescollection.setDomainIsPointsInTime(true);
            return timeseriescollection;
        public static JPanel createDemoPanel()
            JFreeChart jfreechart = createChart(createDataset());
            return new ChartPanel(jfreechart);
        public static void main(String args[])
            TimeSeriesDemo1 timeseriesdemo1 = new TimeSeriesDemo1("Time Series Demo 1");
            timeseriesdemo1.pack();
            RefineryUtilities.centerFrameOnScreen(timeseriesdemo1);
            timeseriesdemo1.setVisible(true);
    }

  • Waveform chart time sometimes decreases

    I have a waveform chart with three plots vs time with update mode set to strip chart.  It is demonstrating strange behavior which I have never noticed before.  The time sample numbers at the extents of the axis sometimes decrease and the plots shift to the right instead of always left as I have always expected.  Can anyone offer a plausible reason why this situation might occur?

    the following applies only to charts that are Waveform data types, otherwise disregard.
    Check the validity of the t0 values in the WF. If the timestamp is earler than the latest value plotted, the chart will reset.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Waveform with time stamps randomly separated

    Folks,
    I'd like to get your advice on the following task.
    A spectrometer takes data at arbitrary, not foreseeable instants. To each new point a time stamp is attached. The data shall be displayed in a waveform graph with the data coordinate on the y-axis, the data points being appropriately spaced with the correct time stamps on the x-axis.
    How can I do this? How can I create a waveform with arbitrarily spaced time lag between the points?
    Thanks for any hint,
    Peter

    Hi Ben,
    you don't have excuse, it's a nice example.
    So I learned something new: how to trick a waveform chart to display values without fixed dt
    (Even when it needs some conversion routines when you collect your data in arrays...)
    Message Edited by GerdW on 08-23-2007 02:18 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to plot contour using time stamp

    Hello,
    I need help on the following:
    I acquire size distribution data each minute from a particle counter. I would like to plot the data as a contour plot using time stamp on the x-axis, the size bins on the y-axis and the 2D data on the z-axis. I cannot get the contour functionality in LV 2011 to accept the time stamp format. I did change the format of the x-axis to "absolute time" but it still doesn't work, see simplified diagram below.
    Any advice on reformatting a time stamp to something the contour plot understands??!?
    Thanks a lot,
    Claus
    Attachments:
    countour.png ‏20 KB

    Milan R wrote:
    Hi Mogensen!
    You could use the "To Double Precision Float" vi to convert the timestamp to a double prescion number as mentioned in this forum post "time stamp to number function". As mentioned in that forum, the number is based on the LabVIEW epoch date so you can use it to compare values taken at a specific time.
    I can't look right now but will that work?
    I thought the 3D stuff was single and the magnitude of the time stamp would swamp the difference in time stamps.
    Just thinking out loud.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Reading from a .txt and displaying in XY graph with time stamp

    Hi,
    I am a newbie to LAbView. I need to read from a text file having two columns, one carrying the temp value and other the time stamp. I need to plot this in XY graph on a real time basis. Please help as how can I do this..
    I am attaching my files for your reference.
    Thanks in advance
    Ratnesh

    Shidla wrote:
    So what is the question about... I have to use XY graph in my program. It is used in Loop while cycle. It shows the statistic of a variable. I am using cursors in this graph to check the actual value of a variable in different period of time. But there are 7 variables and it is extremely hard for user to check each value independently. So I tried to make them moving on the X axis (TIME) together using the property node (cursors reading the position (only X axis, Y axis status lock to plot) of the major cursor and follow it... Everything looks great? But it did not work when I am trying to move the major cursor manually on graph... It works only when I am using the cursor movement buttons... But they work very slowly when there is a lot of data in graph.
    I want to find out is it possible to make seven coursers mouthing together By the X axe and be Locked each at its plot by Y axe manually (Using mouse moving on a graph). Is it possible? If it is than how to do it?
    Hello Shidla,
    The attached VI should help give you an idea of how to create a VI that allows all cursors to move together. The main idea is to keep track of the current location of all cursors and move all of them when you see a change in one's position.
    Good luck with your development.
    -Matt F
    Keep up to date on the latest PXI news at twitter.com/pxi
    Attachments:
    cursors.vi ‏164 KB

  • Retaining AVI date/time stamp during capture to pre 9.

    I have pre 9. When capturing DV from my camcorder, how do I get pre 9 to add the clips  time and date to the avi file properties like it does for jpg's. What I get is the date I captured it to the computer. If I add "date taken" to the properties shown, it remains blank.
    I realize the time/frame stamp changes throughout the clip but it should be able to show the initial date/time stamp, for example. I sort these travel clips by oldest date first and need to be able to match them to their itinerary locations. I have a small freeware app that will strip the date/time stamp from the meta data and then I can adjust the time/date in "Organizer" but I have 100's of clips so I'd rather not go that way. I know there app's that will encode the date/time stamp visibly on the image during capture but I don't want that as I make DVD's from the clips. Do you have any advice or suggestions? I have Win 7, 64 bit, 3.2 ghz, 2 core. Thanks, Rob.

    Premiere Elements won't do this.
    You'll need a third-party program called DV Date, downloadable from the web.

  • Writing arrays to text data with continious time stamp

    Hi Friends,
    I have the following problem.
    I want to create a text file looking like this:
    12,30,10, 10:30:00     12.05.2007
    12,31,10, 10:30:00,1  12.05.2007
    12,32,10, 10:30:00,2  12.05.2007
    12,33,10, 10:30:00,3  12.05.2007
    12,34,10, 10:30:00,4  12.05.2007
    12,35,10, 10:30:00,5  12.05.2007
    12,36,11, 10:30:00,6  12.05.2007
    12,37,12, 10:30:00,7  12.05.2007
    12,38,13, 10:30:00,8  12.05.2007
    12,38,16, 10:30:00,9  12.05.2007
    12,39,18, 10:30:01,0  12.05.2007
    12,39,18, 10:30:01,1  12.05.2007
    12,39,18, 10:30:01,2  12.05.2007
    the first 3 values are read from a file ,recorded as array and than plotted in chart.
    the beginning time (e.g 10:30:00  12.05.2007) is also read from a file and set as beginning of the chart with a property node. The problem is here , after I set the beginning time to the Chart I have nothing to do with it for the rest values, since samples/sec is also sent to chart.
    So how can I write the a txt file including the time stamp with ms incrementations?
    Thanks alot for your responces.
    john

    Hi John.
    I would use a Time Stamp and "Format Into String" with e.g. %<%.1X>T.
    Syntax details are in the LabVIEW Help - Search for "Format Specifier Examples".
    Regards, Guenter

  • How to append time stamp to TDMS file

    hello all, i would like to append time stamp to a tdms file as the 1st column of the file... the pattern should look like this.. can anyone suggest how to create such a file?
    Time
    Data
    0.001
    2.5545
    0.002
    2.653
    0.003
    1.215
    0.004
    2.6586
    Now on LabVIEW 10.0 on Win7

    I got the below oepratin to do.. i used a Write to Measurement File.vi and selected tdms format and it worked out... however, when i read the same file using read measurement file.vi and selected tdms option in ti, i am observing that on the x-axis graph, i get real-time stamp instead of decimals... i want x-axis as decimals instead of timestamp, and when i selected decimals in waveform graph properties --> display format--> x-axis, i could not select decimal instead of time-stamp... can anyone please let me know how to get what i intend to do?
    Now on LabVIEW 10.0 on Win7
    Attachments:
    Untitled 2.vi ‏68 KB

Maybe you are looking for