Data Logging Elapsed Time

I have a program that monitors a pressure reading from a transducer.  The initial readings are logged at 10 second intervals until the pressure is increased by a set value and the logging interval increases to 100 points per second.  Currently, when I graph the data, the elapsed time on the x-axis is inaccurate because the computer doesn't know when the 10 second stopped and the 100 points per second began.  Is there a way to keep track of the time the points are being logged?  Some sort of method of having the elapsed time between points logged so this can be used to create the x-axis?
Thanks in Advance!!
LabVIEW 2012 - Windows 7
CLAD

Hello,
It sounds like you'd like to have two plots on the same graph, but the x-axis scale and values are different for your two plots.  You can control how data is plotted to a waveform graph by bundling the array of data you are plotting with an x0 (initial value) and a delta-x (distance between samples).  The order for the bundle (into a cluster of course) should be, x0 value, delta-x value, y-array of data.
I have attached an example to illustrate this by allowing you to change the x0 and delta-x for two plots dynamically (the Generate Sine Pattern.vi is used as a subVI, where the other is the top level VI); I think this is exactly what you are looking for!
I hope this helps!
Best Regards,
JLS
Best,
JLS
Sixclear
Attachments:
Example1.zip ‏28 KB

Similar Messages

  • When using historical datalogging, is it possible to hide the elapsed time between tag updates when viewing on a graph?

    When my process stops, I am reading an array of tags(datapoints) and writing the max and average to memory tags for data logging. However, when viewing the data, the elapsed time between cycles spreads the data out unevenly. It could be 90 seconds between cycles or maybe two hours or longer. Is there a way to convert the time axis data to be just consecutive datapoints?? It would be like logging data based on a particular condition happening rather than time-based trending. Should I try to use the data set logger examples instead?? I would prefer to use the built-in datalogging features rather than writing to databases.

    You could export your data to a spreadsheet file and then actually write then again in a second database using this example program in the devzone
    http://zone.ni.com/devzone/conceptd.nsf/webmain/5A921A403438390F86256B9700809A53?opendocument
    Using this program (if you don't want to modify it, which would take a reasonable amount of time specially if you are not familiar with VI-Based Server) You would have to generate a collum in your spreadsheet file to be the timestamp, it would be a artificial timestamp.
    What you could do in your application is to first save the data to file and then read from file, substitute the collum timestamp for the "artificial one" and then write it to the database, again, with that you would not need to modify this program.
    However if you have the time and is willing to work with VI-based server you could try to modify the example program to be adapted for your purposes.
    I hope it helps
    Good Luck
    Andre Oliveira
    Applications Engineer
    National Instruments

  • How do I control a data log session with period and sample time?

    I need a data logging system where the operator can select 2 logging parameters: Log Period and Sample Time. I also need a START and STOP button to control the logging session. For example, set the log period for 1 hour and the sampling time for 1 second. (I may be using the wrong jargon here.) In this case when the START button is clicked, the system starts logging for 1 second. An hour later, it logs data for another second, and so on until the operator clicks the STOP button. (I will also include a time limit so the logging session will automatically stop after a certain amount of time has elapsed.)
    It’s important that when the STOP button is clicked, that the system promptly stops logging. I cannot have the operator wait for up to an hour.
    Note that a logging session could last for several days. The application here involves a ship towing a barge at sea where they want to monitor and data log tow line tension. While the system is logging, I need the graph X-axis (autoscaled) to show the date and time. (I’m having trouble getting the graph to show the correct date and time.) For this application, I also need the system to promptly start data logging at a continuous high rate during alarm conditions.
    Of course I need to archive the data and retrieve it later for analysis. I think this part I can handle.
    Please make a recommendation for program control and provide sample code if you can. It’s the program control concepts that I think I mostly need help here. I also wish to use the Strip Chart Update Mode so the operator can easily view the entire logging session.
    DAQ Hardware: Not Selected Yet
    LabVIEW Version: 6.1 (Feel free to recommend a v7 solution because I need to soon get it anyway.)
    Operating System: Win 2000
    In summary:
    How do I control a graphing (data log) session for both period and sample time?
    How do I stop the session without having to wait for the period to end?
    How do I automatically interrupt and control a session during alarm conditions?
    Does it make a difference if there is more than one graph (or chart) involved where there are variable sample rates?
    Thanks,
    Dave

    Hello Dave,
    Sounds like you have quite the system to set up here. It doesn�t look like you are doing anything terribly complicated. You should be able to modify different examples for the different parts of your application. Examples are always the best place to start.
    For analog input, the �Cont Acq&Chart (buffered).vi� example is a great place to start. You can set the scan rate (scans/second) and how many different input channels you want to acquire. This example has its own stop button; it should be a simple matter to add a manual start button. To manually set how long the application runs, you could add a 100 ms delay to each iteration of the while loop (recommended anyway to allow processor to multi-task) and add a control that sets the number
    of iterations of the while loop.
    For logging data, a great example is the �Cont Acq to File (binary).vi� example.
    For different sample rate for different input lines, you could use two parallel loops both running the first example mentioned above. The data would not be able to be displayed on the same graph, however.
    If you have more specific questions about any of the different parts of your application, let me know and I�ll b happy to look further into it.
    Have a nice day!
    Robert M
    Applications Engineer
    National Instruments
    Robert Mortensen
    Software Engineer
    National Instruments

  • SIT Real-time data logging and passing data

    Hello all,
    I am pretty new to LabView real-time, so I just want to confirm a few things. I am also using the Simulation Interface Toolkit.
    Let's take the Sinewave.vi from the SIT examples. I have modified it to use sinewave.dll, and run on PXI-8101. If my understanding is correct, when I click "Play", the entire Sinewave.vi is deloyed into PXI-8101, and therefore the entire VI is running at the same pace. The front panel I see on my desktop is slower snapshots of what is actually happening?
    1) Let's pretend now that the sinewave model is time critical and must run every 10ms. How do I do that? I have noticed that within the "SIT_Indicator_Indices" loop, there is a Wait 50ms block. Is that accurate?
    2) I have also added a time elapsed block that will change the Frequency and Amplitude inputs as a function of time. I made them update every 2ms. What clock are we running on? If my sinewave.mdl suddenly calculate integration (time dependent), can I use that elapsed time block as my timer to pass into the model?
    3) How fast is the sinewave.vi running anyways?
    4) Let's say I want a log of the sinewave output (a data point every 10ms). I don't need the log in real-time, I just want to do some analysis on it later. How do I do it?
    Thanks.
    Attachments:
    Sine Wave.vi ‏104 KB

    Hi Bladhart,
    When running the in the Development Environment (pressing the run button on the Real-Time vi) there will be an extra thread to handle the front panel you see. This thread will be handled just like any other thread in Real-Time and will take processor time, thus slowing down your entire application to a certain extent.  
    1. You would need to make sure everthing inside the loop can execute within 10ms and change the wait time to 10ms. Or you can use a timed loop set to run every 10ms and get rid of the wait time but again you would need to ensure everything in the loop can execute in under 10ms.
    2. The elapsed time should be running off the Real-Time system clock. 
    3. The time that the Sinewave.vi is running is system dependent, there is no set speed.
    4. You can log the data by saving to a *.tdms file. You can then use the data from the *.tdms file to do processing later. 
    <Brian A | Applications Engineering | National Instruments> 

  • How can I perform data logging for a specific time??

    hello everyone,
    I am quite new in labview and I have a basic question regarding data logging. Currently I am using a cRIO9074 and doing some data logging for my test. The data logging it self works ok so far.
    But my problem is I would like to write my datas in a text file either for a specific time interval (ex)10 seconds) or for a specific amounts of data (ex)500 Samples). Can anyone give me some help regarding my problem?? Attached you can find my RT.vi 
    I would appreciate for anyhelp!
    Regards
    Yun 
    Attachments:
    BP250 Encoder Position & Velocity (Host).vi ‏92 KB

    Run your loggging program for that time. When your program terminates then it will write all the logged data so far in text file.
    Kudos are always welcome if you got solution to some extent.
    I need my difficulties because they are necessary to enjoy my success.
    --Ranjeet

  • Query Execution/Elapsed Time and Oracle Data Blocks

    Hi,
    I have created 3 tables with one column only. As an example Table 1 below:
    SQL> create table T1 ( x char(2000));
    So 3 tables are created in this way i.e. T1,T2 and T3.
    T1 = in the default database tablespace of 8k (11g v11.1.0.6.0 - Production) (O.S=Windows).
    T2 = I created in a Tablespace with Blocksize 16k.
    T3 = I created in a Tablespace with Blocksize 4k. In the same Instance.
    Each table has approx. 500 rows (So, table sizes are same in all the cases to test Query execution time ). As these 3 tables are created under different data block sizes so the ALLOCATED no. of data blocks are different in all cases.
    T1  =   8k  = 256 Blocks =  00:00:04.76 (query execution time/elapsed time)
    T2  = 16k=121 Blocks =  00:00:04.64
    T3 =   4k =  490 Blocks =  00:00:04.91
    Table Access is FULL i.e. I have used select * from table_name; in all 3 cases. No Index nothing.
    My Question is why query execution time is nearly the same in all 3 cases because Oracle has to read all the data blocks in each case to fetch the records and there is a much difference in the allocated no. of blocks ???
    In 4k block size example, Oracle has to read just 121 blocks and it's taking nearly the same time as it's taking to read 490 blocks???
    This is just 1 example of different data blocks. I have around 40 tables in each block size tablespace and the result are nearly the same. It's very strange for me because there is a much difference in the no. of allocated blocks but execution time is almost the same, only difference in milliseconds.
    I'll highly appreciate the expert opinions.
    Bundle of thanks in advance.
    Best Regards,

    Hi Chris,
    No I'm not using separate databases, it's 8k database with non-standard blocksizes of 16k and 4k.
    Actually I wanted to test the Elapsed time of these 3 tables, so for that I tried to create the same size
    tables.
    And how I equalize these is like I have created one column table with char(2000).
    555 MB is the figure I wanted to use for these 3 tables ( no special figure, just to make it bigger than the
    RAM used for my db at the db startup to be sure of not retrieving the records from cache).
    so row size with overhead is 2006 * 290,000 rows = 581740000(bytes) / 1024 = 568105KB / 1024 = 555MB.
    Through this math calculation I thought It will be the total table size. So I Created the same no. of rows in 3 blocksizes.
    If it's wrong then what a mes because I was calculating tables sizes in the same way from the last few months.
    Can you please explain a little how you found out the tables sizes in different block sizes.Though I understood how you
    calculated size in MB from these 3 block sizes
    T8K =97177 BLOCKS=759MB *( 97177*8 = 777416KB / 1024 = 759MB )*
    T16K=41639 BLOCKS=650MB
    BT4K=293656 BLOCKS=1147MB
    For me it's new to calculate the size of a table. Can you please tell me then how many rows I can create in each of
    these 3 tables to make them equal in MB to test for elapsed time.
    Then I'll again run my test and put the results here. Because If I've wrongly calculated table sizes then there is no need to talk about elapsed time. First I must equalize the table sizes properly.
    SQL> select sum(bytes)/1024/1024 "Size in MB" from dba_segments> 2 where segment_name = 'T16K';
    Size in MB
    655
    Is above SQL is correct to calculate the size or is it the correct alternative way to your method of calculating the size??
    I created the same table again with everything same and the result is :
    SQL> select num_rows,blocks from user_tables where table_name = 'T16K';NUM_ROWS BLOCKS
    290000 41703
    64 more blocks are allocated this time so may be that's y it's showing total size of 655 instead of 650.
    Thanks alot for your help.
    Best Regards,
    KAm
    Edited by: kam555 on Nov 20, 2009 5:57 PM

  • Data Blocks and the Elapsed Time

    Hi,
    I have created 3 tables with one column only. As an example Table 1 below:
    SQL> create table T8k( x char(2000));
    So 3 tables are created in this way i.e. T8k,T16K and T4K
    T8 = in the default database tablespace of 8k (11g v11.1.0.6.0 - Production) (O.S=Windows).
    T16 = I created in a Tablespace with Blocksize 16k.
    T4K = I created in a Tablespace with Blocksize 4k. In the same Instance.
    Each table has 290,000 rows and all the 3 tables have equal size of 555MB (2006(rowsize with overhead) * 290,000/1024/1024 = 555MB) to test Elapsed Time (set timing on).
    As these 3 tables are created under different block sizes so the allocated no. of data blocks are different as below:
    T8K = 97177 BLOCKS= 00:41:20.21 (Elapsed Time)
    T16K=41639 BLOCKS= 00:44:11.59
    BT4K=293656 BLOCKS=00:37:29.06
    Please note the difference. First table i.e. 8k block size, allocated blocks are 97177 and taking around 41 mins. Third table i.e. BT4K (in a 4k block size tablespace), allocated blocks(293656 ) are almost 3 times bigger, taking around 37 mins to execute the query. I mean the difference is only 4 mins hardly and blocks difference is 3 times.
    In case of any doubt, I've created these tables bigger than the memory used for my db(memory_max_size 408M) i.e. 555 MB that If Blocks are already in cache then reading the blocks and counting the rows will nearly be the same regardless of the block sizes or the number of blocks.
    Need solid suggestions and if possilble, links also which has some serious discussions regarding my issue.
    Bundle of thanks.
    Best Regards,

    Because I was not completely satisfied with the things last time. It doesn't seem so simple to me as people said
    I thought may some guru have a look today, not just to point out that i have created it again.
    And I have compact my question to avoid confusion.

  • Oracle Performance 11g - Warning: log write elapsed time

    Hello ,
    We are facing quite bad performance with our SAP cluster running Oracle 11g .
    In the ora alert file we are having constant message for "
    Thread 1 cannot allocate new log, sequence xxxxxx
    Private strand flush not complete"
    However , this seems to be quite old as we have recently started facing the performace issue.
    Moreover , in the sid_lgwr_788.trc file we are getting warning for log write elapsed time as follow.
    *** 2013-07-25 08:43:07.098
    Warning: log write elapsed time 722ms, size 4KB
    *** 2013-07-25 08:44:07.069
    Warning: log write elapsed time 741ms, size 32KB
    *** 2013-07-25 08:44:11.134
    Warning: log write elapsed time 1130ms, size 23KB
    *** 2013-07-25 08:44:15.508
    Warning: log write elapsed time 1161ms, size 25KB
    *** 2013-07-25 08:44:19.790
    Warning: log write elapsed time 1210ms, size 10KB
    *** 2013-07-25 08:44:20.748
    Warning: log write elapsed time 544ms, size 3KB
    *** 2013-07-25 08:44:24.396
    Warning: log write elapsed time 1104ms, size 14KB
    *** 2013-07-25 08:44:28.955
    Warning: log write elapsed time 1032ms, size 37KB
    *** 2013-07-25 08:45:13.115
    Warning: log write elapsed time 1096ms, size 3KB
    *** 2013-07-25 08:45:46.995
    Warning: log write elapsed time 539ms, size 938KB
    *** 2013-07-25 08:47:55.424
    Warning: log write elapsed time 867ms, size 566KB
    *** 2013-07-25 08:48:00.288
    Warning: log write elapsed time 871ms, size 392KB
    *** 2013-07-25 08:48:04.514
    Warning: log write elapsed time 672ms, size 2KB
    *** 2013-07-25 08:48:08.788
    Warning: log write elapsed time 745ms, size 466KB
    Please advice to further understand the issue.
    Regards

    Hi,
    Seem the I/O issue, Check the metalink id
    Intermittent Long 'log file sync' Waits, LGWR Posting Long Write Times, I/O Portion of Wait Minimal (Doc ID 1278149.1)

  • How to view data in total elapsed time while recording in LabVIEW signalexpress

    Im trying to record temperature over time and would like to view the data over the total elapsed time.  It would be a great help if anyone could help me out with this.
    Much thanks,
    Daniel

    This is the LabVIEW board. You need to post your question to the SignalExpress board.

  • How to calculate elapsed time(including time and date)?

    Hi all,
    I want to realize a function that can calculate the elapsed time which include time and date.Below is my thought:get the current time and date and store it to a .txt file then using the latest time and date subtract the time and date stored in the .txt file.how can realize it using the simplest way?I'm using LV7.1.

    Hi Idragon,
    you can do it like this.
    Mike
    Attachments:
    DateTime.PNG ‏12 KB

  • Date Utility - calc age, elapsed time...

    I need to calculate elapsed time between 2 dates, for example calc age based on DOB and Today. There must be a utility out there somewhere (free!). I'm sure I'm not the first one with this requirement.

    try this
    import java.util.*;
    public class DateSub {
      public static void main(String [] args) {
        Calendar cal = Calendar.getInstance();
        cal.set (1970,0,1);
        long age = cal.getTime().getTime();
        age = System.currentTimeMillis() - age;
        System.out.println ("age = " + age + " milliseconds" );
        age /= 1000;
        System.out.println ("age = " + age + " seconds" );
        age /= (3600*24);
        System.out.println ("age = " + age + " days" );
        long years = age/(365);
        long days = age % 365;
        System.out.println ("age = " + years + " years " + days + " days");
    }

  • Lookout Warning - logged data out of time sequence

    Hello,
     what mean a warning :You have logged data out of time sequence. Repeated instances of logging "backwards" in time can result in overly large database files, and even data corruption.
    When we use Lookout 6.1 and the Logger object to write data to citadel DB.
    Pavel Rucka. 

    For example, last time you logged value 10 at 10:00:00, then now you log a new value at 9:58:00, you will get the warning.
    If the time datamember of Logger is not set, it will use the system time when it logs. The warning will happen when your system time is set back.
    This is just a warning. The data will still be logged.
    Ryan Shi
    National Instruments

  • Can you get an elapsed time stamp into excel that is good to a mSecond. Time since 1904 is only good to 15 msec.

    I'm try to log data at a fast rate and I'm using the 1904 time stamp. I've noticed that the system clock only updates every 15 msec. I'm logging data every 5 msec. So when I plot the data I have three readings per time slice.

    I don't know what the true update time is it exactly it looks to be around 15msec to 16 msec. If I sync to nist I will get an accurate time stamp but I'm still stuck with the slow 15msec update rate of the system clock. The time stamp accuracy isn't that important but the elapsed time from start of the test is. You can see some times you get 3 readings at the same time stamp and some time 4. To get elapsed time what I did is put time stamp value into excel then subtract that value from all values taken after that point (= D4-$D4$). Since the number of reading at each time stamp varies I can use my simple excel formula. Thank you both for you replies.
    elapsed time voltage 1 voltage 2
    0 5.432934 7.762001
    0 5.437446 7.765869
    0 5.443248 7.764257
    0.014989853 5.44486 7.762646
    0.014989853 5.438413 7.762646
    0.014989853 5.448083 7.762968
    0.014989853 5.442603 7.766836
    0.014989853 5.441314 7.76329
    0.030990124 5.436802 7.761034
    0.030990124 5.450017 7.760389
    0.030990124 5.43938 7.763935
    0.030990124 5.443893 7.765547
    0.046999931 5.44486 7.760389
    0.046999931 5.440347 7.762323
    0.046999931 5.446149 7.766836
    0.046999931 5.44905 7.767158

  • Comparing two elapsed timer readings

    Hi everyone,
    I'm a new user of Labview, so I'm teaching myself as I go along really. I've come up against a problem though. I'm trying to compare two timer readings from elapsed timers. Eventually I am hoping to swap these timers for a pair of light beams inputted through a DAQ chassis. Initially though I wanted to get the content of my program correct, without having to have the equipment connected to my laptop.
    I have attached my progress so far, apologies if my query has an obvious solution. As I say I'm a bit of an beginner! How would I take the two elasped timers log the times found off the timers, compare which one has a greater value and consequently start a new timer depending on this. I would then like to log this time in data form.
    I've tried to compare the two elasped timers with greater than booleans etc but I cant seem to get it to work?
    As I say I hope to use this idea in a time gate sort of application where depending on which light beam is broken first depends on which timer is started. Hope my explanation is clear.
    Any help is much appreciated,
    Thanks very much!
    Attachments:
    FYP.vi ‏15 KB

    PT-
    Looking at your code you have a few problems that you will need to address.  Read the LabVIEW help section titled "Caveats and Recommendations when Using Events in LabVIEW."  You have some latching booleans controls that are incorrectly placed.  The terminals should be in the event case that handles the value change event.  
    Why two event structures?  One structure is a better Idea you can handle all your events with 1 loop (and avoid stopping the loops independantly- this can lead to a condition where the vi becomes unresponsive.
    The lower loop compares the start times to two different timestamps.  This is introducing potential errors since there is timing relationship between the calls to the system timer.  and the lower case structures are rather insane- in english they resolve to "if started return how long its been since started else return 0"  Check the NI website there is a CLD practice exam solution (Car Wash) that has a pretty good example and discussion of using the elapsed timer express vi.  It might point you in a better direction than where you are going.
    Why not use the time terminals in the event structure?  thats the time the event fired.  But, you might want the time the event was handled I don't Know-  (hint-comment your code and write SOMETHING in the vi documentation.  Eventually you'll be writing more complex code so start developing good habits now)  (good habits--)  
    Come on back when you've looked at some of the examples and I'ld be glad to help you more.  
    Jeff

  • Calculate elapsed time with VBS/PowerShell

    I'm trying to calculate MDT task sequence execution time. What could be the best method for this? It can be PowerShell or VBS code.
    Plan is to execute a script at the beginning of a task sequence that stores a start time in variable and at the end of task sequence execute another script that reads that start time from variable and calculates total time taken and saves it to another variable.
    I have tried few VB scripts but I have had some odd results some times with them. We are using 24 hour clock and it might have caused some problems for my previous scripts.

    I think you can enable monitoring and then validate from a console the elapsed time.  It's a slow morning so I also wrote something that would work in powershell for fun -
    param($start, $stop)
    $file = $(get-date -f mmddyyyy) + '_timer.log'
    $filepath = "$env:temp\$file"
    function Start-Time {
    if(test-path $filepath){
    Remove-Item -path $filepath -force
    else{
    New-Item -ItemType File -Path $filepath
    function Calculate-Time {
    if(!(Test-Path $filepath)){
    Write-Error "Calculate-Time: ERROR - Timer file was not found at path $filepath. Please validate you are running this script with the -start parameter before running with the -finish parameter."
    else{
    $fileinfo = gci $filepath
    $stime = $fileinfo.CreationTime
    $etime = (Get-Date)
    $time = New-TimeSpan -start $stime -end $etime
    return "Time from creation of file to finish is $time."
    function Main{
    if($start){
    Start-Time | Out-Null
    if($stop){
    Calculate-Time | Out-Null
    else{
    return "Main: You must provide a parameter to use this tool. Parameters are -start to start the timer or -stop to end the timer and calculate time elapsed."
    Main
    You can modify filepath at the top to set where it saves the file.  What it does is creates a file in the environment temp directory and then uses that file creation time against current date/time to give you a duration.  Parameter -start creates
    the file starting the timer and parameter -stop finds that file and calculates the difference in time between creation and current time.  Either way I needed to get some powershell practice and maybe this will help you. 
    Ryan

Maybe you are looking for

  • I need help with my mapping - CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV

    hi, guys, i need help with my mapping, i dont know this error (i not speak english) <Trace level="1" type="B">CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV</Trace> <Trace level="2" type="T">......attachment XI_Context not found </Trace> <Trace level="3" type="T"

  • Invisible client data MAM30

    hi all, we want to use MAM30: Backend: ERP 2005 Middleware: NW2004s (MI 7.0) SP 15 Client: MI 70 SP 15 Patch 1, DB2e, XMAM30_LAPTOP_SR05 our problem is, that we cannot see any data in the XMAM30 - application. but: with http://localhost:4444/XMAM30_L

  • OSD: SCCM 2012 collection which should exclude Windows 7 clients (query not working fine)

    Hi, We have an SCCM 2012 collection to which we deploy Windows 7. Vista clients get a SCCM 2012 client in SCCM 2007 and once they have it, they get a Windows 7 deployment. The group is populated by an AD query and that works fine. However, when we tr

  • Crystal Reports Logon Error ("Security Plugin Error")

    Hi there, I have an issue that I haven't been able to resolve for the past couple days.  I had to reinstall Crystal Reports XI on a user's computer, and now we can't log into the BusinessObjects Enterprise server from it using LDAP.  I have successfu

  • Token Handle Leak in RDPShell.exe on 2012 R2 (does not occur in 2008)

    I have several Terminal Services farms running both 2008 and 2012 R2. Only those farms running 2012 exhibit the problem of excessive token handles in RDPShell.exe On 2008, the handle count is around 210 (a mix of Desktop, Directory, ETWRegistration,