Saving data with automatic time intervals

Hi everyone
I am a new user with LabVIEW (I just started using it 3 weeks ago) and I am having a problem with data recording and saving.
Basically, what we want to do is to monitor data for four different variables countinuosly but saving them in automatic and specified time intervals. Specifically, we would like to save data countinuosly only for five minutes each hour. After the 5 minutes, only the saving function must be stopped for 1 hour then return to record for 5 minutes without shutting the major loop. Additionally, we would like to collect all the data in this way in one exel file per day for three weeks or more, so instead of creating a data file for each recording we would like to collect them in only one file per day.
Finally, if its possible, we would like to extract the mean of the data for one day in a single file.  We are not interested in modifying the rate of data aquisition, we only want to focus on the saving rate. We tried many timed function (as Elapsed time, Time delay, Wait) and timed loops but it was impossible for us to syncronize different loops or to set up timing function for the saving issue without blocking the main loop work.
Data are collected throught the "write to measurement file" function.
any kind of help will be really appreciated!
Here we submit our front panel and block diagram of our VI.
Best regards
Solved!
Go to Solution.
Attachments:
Hypoxia 21-05-2014 Monitoring.vi ‏451 KB

Use a shift register to keep track of your start time.  If the difference between the start time and the current time is less than 5 minutes, save the data.  If the time difference is an hour, save the new time as the start time.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines

Similar Messages

  • Help!!coll​ect data at particular time intervals/​cycles

    Hello,
             I have to write a program to collect data at particular time intervals/cycles. We collect data at 100 points per cycle for 5000 cycles. But due to the huge volume of data I have to collect at certain intervals ( say cycles 1-10, 29-31,49-51 .... 3999-4001 .. 4999-5000). I would appreciate if anyone could please help me with this program.
    Thanks and bext regards
    lax

    Hello,
              Thanks for your reply. I have just started with LABview and the program I am dealing with was written by someone else. Anwyays, we are using  a NI PCI 6259 data aquisition card and NI SCXI (these are data aquisition for each channel I guess). We collect the load and deformation data (using LVDTs), which is the primary purpose of the project. We apply a load for 0.1s and rest for 0.6s. We collect the data at 100 points per second for the whole test (which runs for either 90minutes or 5000 cycles). We just start the test and collect data all the way through and the rate of collection remains the same throughout the test.
              As for finding out when exactly the cycle starts and ends. We will have to find that with time I guess. We plan to collect data for the first 100 cycles, then for 2 to 3 cycles every 50 or 100 cycles (which may increase towards the end of the test, i.e. we might jump from 3000 to 4000cycles).As for collection we collect the data 1sample at a time.
             I have attached a part of the program which measures all the data (which is part of another program). Some VI's might be missing (DAQmx start task, DAQmx stop task, DAQ mx read). Please let me know if you have any solution. Thanks again.
    Regards
    lax
    Attachments:
    Measure_All_FastData_queue.vi ‏51 KB

  • I have a string 2012-05-22T23:23:42.263-07:00. so i want to convert in date with indian time zone   can any one help me out

    i have a string 2012-05-22T23:23:42.263-07:00. so i want to convert in date with indian time zone   can any one help me out

    What does this have to do with iPhone tech support?

  • Save waveform data with corresponding time array to spreadsheet file

    Hello to all
    I am looking for a possibility to save voltage data acquired and displayed continousely to a spreadsheet file. Acquiring and displaying is not a big problem, but I have troubble to save the data with the corresponding timestamp with more than seconds accuracy. I am acquiring the data at 1000 Hz and read packages of 500 samples. The recording time should not be limited, it will be started and stopped manually. In fact the acquired voltage data first has to be scaled and than saved. If I use the 'WRITE WAVEFORM TO SPREADSHEET' VI the time column is in seconds' accuracy and that is not what I need. If I create my own time array from the waveform parameters I have timing problems. The accuracy in time should reflect the sample rate. I will attach one of my not very successful trials for better understanding.
    please help a newcomer!
    Thanks in advance
    Thomas
    LV 7.1
    Attachments:
    display & record forces v.1.0.vi ‏181 KB

    I usually follow a simple method to generate time stamp
    I keep sampling rate and number of samples to read as equal and do as shown in the attached VI
    I also remember building a VI with a small modification to this time stamp generation logic to cater to acq, where number of samples to read is half/one fourth/one tenth of sampling rate specified, but cannot find that VI.
    Hope this helps
    Regards
    Dev
    Attachments:
    Acq_DAQmx_filesave_time stamp.vi ‏121 KB

  • Creation & saving PO with Automatically spool

    Dear Expert,
    I wanted to generate PO out put spool upon creation & afterward saving of PO.
    I have tried with all means but not succeeded. Output type ( NACE) with Dispatch time 4 instead of 3.
    Kindly let me know the exact changes to be incorporated in PO output type in NACE
    Rgds,
    Manoj

    Hi
    See SAP Note 201830 - Calculation of the net price of an item. Although it's for SD, I think that it could help you to understand how to do in MM (so, change V/06 by M/06, ie: pricing condition, V/08 by M/08 ie: pricing procedure).
    I hope this helps you
    Regards
    Eduardo

  • How to combine sql.Date with sql.Time into one?

    I have a database where I keep dates and times separately, and getting date only and time only out of a java.util.Date is no problem thanks to the classes java.sql.Date and java.sql.Time. However, I need to read these values back in, put them back together, and then do date comparisons with java.util.GregorianCalendar. I tried just adding the millisecond long values together but that didn't seem to work, and I've tried setting the year, month, date, hours, minutes and seconds individually into a GregorianCalendar but I haven't figured that out yet. Certain queries work out better keeping the date and time separate in the database and it takes less bytes than a timestamp, so please don't suggest I use a timestamp!
    Thanks for your help!
    Stephen

    You can add the milliseconds (ms), but you need to use just part of it. For this example, let X be one more than the maximum number of units in time and also the minimum number of units in date. If we were using hours instead of ms X would be 24.
    t = total ms from time
    d = total ms from date
    T = new combined time
    T = ((d / X) * X) + (T % X);Add (the date, rounded to the nearest day) and (the portion of time which is less than a day).

  • Saving Data with Indicator

    Hello.
    I have this VI which saves data. Kindly see the attached. In actual application I am saving a lot of data. I want to create an Indicator that when I push the SAVE button, an Indicator will pop-up and will tell the user how many percent is being saved, i.e. 10%....35%.....80%....100% Complete.....
    This is just to make sure that the data being stored in the memory is completely saved.
    Thanks for any advise.
    regards,
    Attachments:
    saving data.vi ‏53 KB
    Default.txt ‏1 KB

    Hi
    Sorry for the late reply. I dont really know where and how to use the Microsoft Active-X Control. I wish someone can send me an example VI for my guide.
    Instead, I just made a pop-up Time Indicator (Thanks to NI.). Please see the attached. In this example the the user needs to wait for about 10 seconds while the data is being save or updated. This VI is not the Actual status or actual progress while the data is being written to the file. This is what i hope to learn.
    Attachments:
    saving data2.vi ‏61 KB
    Progress bar.vi ‏16 KB

  • Denormalization with overlapping time intervals

    The table keeps statuses for objects, along with times each status started and ended. Like:
    ID   From   To   Status
    ===  ====   ==   ======
    23   T1     T2    S1
    23   T3     T4    S2
    23   T5     T6    S3The statuses may start and end at arbitrary moments of time, and each object may have several statuses at the same time. So the time intervals in the above table may look like this:
    T1------------T2
        T3----------------------T4
             T5----------T6So, for example, from T! to T3 the object has only S1, while from T5 to T2 it has all 3: S1, S2, and S3.
    I need to denormalize the table and show in the same line all statuses the object is having at different time intervals, that is
    ID   From   To   Status1  Status2  Status3
    ===  ====   ==   ======   =======  =======
    23   T1     T3    S1
    23   T3     T5    S1       S2
    23   T5     T2    S1       S2       S3
    23   T2     T6    S2       S3
    23   T6     T4    S2

    SQL> with t as (select trunc(sysdate) dt from dual),
      2       t1 as (select 23 ID, dt From_dt, dt+10 To_dt, 'S1' Status from t union all
      3              select 23 ID, dt+3 From_dt, dt+18 To_dt, 'S2' Status from t union all
      4              select 23 ID, dt+7 From_dt, dt+14 To_dt, 'S3' Status from t)
      5              select * from t1
      6  /
            ID FROM_DT     TO_DT       STATUS
            23 04.08.2007  14.08.2007  S1
            23 07.08.2007  22.08.2007  S2
            23 11.08.2007  18.08.2007  S3
    SQL>
    SQL> with t as (select trunc(sysdate) dt from dual),
      2       t1 as (select 23 ID, dt From_dt, dt+10 To_dt, 'S1' Status from t union all
      3              select 23 ID, dt+3 From_dt, dt+18 To_dt, 'S2' Status from t union all
      4              select 23 ID, dt+7 From_dt, dt+14 To_dt, 'S3' Status from t),
      5       t2 as (select id,from_dt begdt from t1
      6               union all
      7              select id,to_dt from t1),
      8       t3 as  (select t2.*, lead(begdt) over(partition by id order by begdt) enddt from t2)
      9       select t3.*,
    10              (select status from t1 where t3.id=t1.id and greatest(t1.from_dt,t3.begdt)<least(t1.to_dt, t3.enddt) and t1.status='S1') Status1,
    11              (select status from t1 where t3.id=t1.id and greatest(t1.from_dt,t3.begdt)<least(t1.to_dt, t3.enddt) and t1.status='S2') Status2,
    12              (select status from t1 where t3.id=t1.id and greatest(t1.from_dt,t3.begdt)<least(t1.to_dt, t3.enddt) and t1.status='S3') Ststus3
    13               from t3
    14        where enddt is not null
    15        order by 2
    16  /
            ID BEGDT       ENDDT       STATUS1 STATUS2 STSTUS3
            23 04.08.2007  07.08.2007  S1             
            23 07.08.2007  11.08.2007  S1      S2     
            23 11.08.2007  14.08.2007  S1      S2      S3
            23 14.08.2007  18.08.2007          S2      S3
            23 18.08.2007  22.08.2007          S2     
    SQL>PS
    there's a problem in vizualization on the forum.
    all GREATEST() < LEAST()

  • Multiple channel data with different time stamp logging

    I have peaks and valleys from multiple channels with different time stamp but I am not able to log to a single file. Any idea on how to do this?
    Attachments:
    Single Point Peak Valley Log.vi ‏53 KB

    Hi Dennis,
    Sorry for that I have modified the VI.
    Because the peak and valley of every channel will occur at different time and I want to log the peak/valley with the time stamp.
    How can I log them on the same file.
    Attachments:
    Single Point Peak Valley Log_Mod.vi ‏53 KB

  • Can you recover saved data on a Time Capsule that has died?

    I came home today to find that the green light to my Time Capsule was off.  Did all the usual fixers...and after going to the several posts on a DEAD TC...I guess I have latest one.  In addition to backing up my PC...I had a bunch of saved documents also.....can these be recovered or should I just can the TC?
    Thanks for any responses!

    With power supplies on ebay for $25 it is just as cheap and easy to unplug the power supply as it is to remove the hard disk and buy a cradle for it.
    Power supply. Replacement left sitting next to the old one right. The covers have been removed and replaced.. Just make sure you get the 34W supply for the 2TB drive. The early supply was 30W and could not handle it.
    Pull out the supply.. 3 plugs.. Mains in, Sata power and board.. and plug the new one in.
    Only because these are fairly plentiful and much cheaper now.. it might not even last long.. but at least to recover your data and erase and sell as a working unit that is fair enough.
    (not sure how long the post will last with pics of open TC??)

  • Create waveform from a set of points with differtent time intervals

    Hello,
    I would like to create a waveform from a set of points like this
    Time           Data
    0                 0
    0,5              1
    0,6              2
    1                 1
    2                 0
    5                 1
    The problem is that the time interval between each points are not the same.
    The only idea I found was to create a waveform for each doublet of points with the same rate (100ms) and than to append them together.
    Does anybody have a better idea?
    Regards,
    Risotto.

    If you use a Wave From data type, re-sampling is not required.
    When using a WF datatype the chart (graph) will pick-up the X value from the t0 of the waveform.
    The trick is to just build an array of the single update value and make sure the t0 value is correct.
    Re-create this example
    and try it for yourself.
    Ben
    Note: make sure the data you pass is consistant with the data already displayed. If you post a t0 value that is older than what is already displayed, the chart will clear the display and start over.
    Message Edited by Ben on 09-15-2006 11:49 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    WF_Datatype.JPG ‏59 KB

  • Trouble with saving data with 1 to 0..1 relation

    I have following simple data model: a parent entity which has 2 relations to 2 child entities called ChildA en ChildB. The type of relation is 1 to 0..1.
    I have a (saved) record which has only a childA relation and execute following code (with button when record is shown):
    screen.Parent.ChildA.deleteEntity();
    screen.Parent.setChildB(new myapp.ChildB);
    screen.Parent.ChildB.BProp1 = "test";
    screen.Parent.ChildB.BProp2 = "test";
    screen.Parent.ChildB.BProp3 = "test";
    screen.Parent.ChildB.deleteEntity();
    screen.Parent.setChildA(new myapp.ChildA);
    screen.Parent.ChildA.AProp1 = "final";
    screen.Parent.ChildA.AProp2 = "final";
    When I hit save afterwards, I get:
    What am I doing wrong?
    This is what's going over the wire:
    --batch_1c90-fa5c-f201
    Content-Type: multipart/mixed; boundary=changeset_0c72-4e38-ea49
    --changeset_0c72-4e38-ea49
    Content-Type: application/http
    Content-Transfer-Encoding: binary
    POST ChildAs HTTP/1.1
    Content-ID: 1
    DataServiceVersion: 3.0
    Accept: application/atomsvc+xml;q=0.8, application/json;odata=fullmetadata;q=0.7, application/json;q=0.5, */*;q=0.1
    Content-Type: application/json;odata=verbose
    MaxDataServiceVersion: 3.0
    {"AProp1":"final","AProp2":"final"}
    --changeset_0c72-4e38-ea49
    Content-Type: application/http
    Content-Transfer-Encoding: binary
    MERGE Parents(13) HTTP/1.1
    Content-ID: 0
    DataServiceVersion: 3.0
    If-Match: W/"X'000000000000273C'"
    Prefer: return-content
    Accept: application/atomsvc+xml;q=0.8, application/json;odata=fullmetadata;q=0.7, application/json;q=0.5, */*;q=0.1
    Content-Type: application/json;odata=verbose
    MaxDataServiceVersion: 3.0
    {"ChildA":{"__metadata":{"uri":"$1"}}}
    --changeset_0c72-4e38-ea49
    Content-Type: application/http
    Content-Transfer-Encoding: binary
    DELETE ChildAs(13) HTTP/1.1
    Content-ID: 2
    DataServiceVersion: 3.0
    If-Match: W/"X'000000000000273D'"
    Accept: application/atomsvc+xml;q=0.8, application/json;odata=fullmetadata;q=0.7, application/json;q=0.5, */*;q=0.1
    MaxDataServiceVersion: 3.0
    --changeset_0c72-4e38-ea49
    Content-Type: application/http
    Content-Transfer-Encoding: binary
    DELETE Parents(13)/$links/ChildB HTTP/1.1
    Accept: application/atomsvc+xml;q=0.8, application/json;odata=fullmetadata;q=0.7, application/json;q=0.5, */*;q=0.1
    MaxDataServiceVersion: 3.0
    --changeset_0c72-4e38-ea49--
    --batch_1c90-fa5c-f201--
    paul van bladel ==independent enterprise application architect== http://blog.pragmaswitch.com

    Hi Paul,
    It is unusual for you to be posting a question you normally answer them :)
    I decided to run some tests based on your example out of curiosity.
    I got to test 'C' here is a workaround but crucially also not a single transaction.
    myapp.AddEditParent1.TestEditC_execute = function (screen) {
    var parent = screen.Parent,
    child = parent.ChildA;
    child.deleteEntity();
    screen.details.dataWorkspace.ApplicationData.saveChanges()
    .then(function (res) {
    var childA = new myapp.ChildA();
    childA.AProp1 = "final-C";
    childA.AProp2 = "final-C";
    childA.AProp3 = "final-C";
    parent.setChildA(childA);
    That got me thinking that actually the result of you code is an update in the end really ;)
    myapp.AddEditParent1.TestEditD_execute = function (screen) {
    screen.Parent.ChildA.AProp1 = "final-D";
    screen.Parent.ChildA.AProp2 = "final-D";
    screen.Parent.ChildA.AProp3 = "final-D";
    So that was test D which obviously worked!
    I think it is a bug.
    Cheers
    Dave
    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

  • Update table from SM30 with automatic Time Stamp

    Hi,
    I have created a table maintenance generator for updating table from SM30.
    Now there are fields in my table which are CRETING TIME and CHANGING TIME. Both being TIMESTAMP field (datatype: RSDDTZNTSTMPS).
    Is it possible while user updates records/create new record in the table from SM30, these time stamp field to automatically get populated.
    Also is there any F4 help available for TIMESTAMP field?
    ags.

    Hi,
    You need to do two things inorder to get the desired results.
    1) Go to Screen Layout of the Screen created by table maintenance generator and make the date/time columns to DISPLAY ONLY. This will ensure that user is not able to modify the values at runtime
    2) Write the code in PAI of the Module pool program to populate the values at runtime using Sy-datum/sy-uzeit. (Hint : Search for INSERT/MODIFY statements which will show the location before which you need to write your logic)
    Regards,
    Kshitija

  • Merge my new MBPr data with old time machine back up

    Got a new Macbook Pro retina, can I merge my old data (from my old imac using time machine ) with my new macbook retina data without loosing data from my MBPr?
    I used my MBPr during holidays without having the opportunity to restore my backup from my old imac and now I have information/data I do not want to loose. If I just restore my back up from time machine (of my old imac) won't I loose any new information on my MBPr that I have not backed up (e.g iphoto or imovie data) ?
    PS: I havent yet backed up my MBPr as I am afraid of overriding my old imacs back up

    Put all of your data from your 'old' user into your Shared folder - accessible by any user. Then you can copy it into your new user folder(s) and delete the old user if you wish.
    Good luck,
    Clinton

  • 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

Maybe you are looking for

  • How to encrypt file on linux using Gnupg command in Java Embedding in BPEL.

    Hi All, I am trying to invoke a command script using the java embedding in BPEL Process.I am using the below code to execute the particular command to encrypt the file :- try {             Runtime rt = Runtime.getRuntime();     Process pr = rt.exec(n

  • Embedded HTML interfere with Business Catalyst site editing

    Hi, It seams that an embedded Google Fusion maps interfere with the the site editing in Business Catalyst - has anyone els had this problem? Can you please let me know how i can solve this problem. The Fusion Map is an essential par of the site and i

  • Where is the setting to have a search request open in a new tab?

    This is the search box in the toolbar and not on the page that is open at the time.

  • Borerless printing observations

    Hi gang, I am in the process of sending off an Aperture book to one of the non-Apple services. It was recommended that I make the page size 8.5x11 borderless in the print settings dialog box. Unfortunately, my laptop did not seem to list borderless a

  • Export to Flickr

    I use the new version of iPhoto. When I want to export a picture I invariably get the export option trying to open my Flickr account. This option which I have not selected will continue indefinitely until I use Force Quit to get out of iPhoto. Clearl