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

Similar Messages

  • 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

  • How do get particular date of total time

    this is our java code
        private static PreparedStatement preparedStatement;
        private static ResultSet rs;
        public static void main(String[] args) throws NamingException, SQLException
            int objectId;
            int clientId;
             DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            // String gpstime = null;
             PreparedStatement preparedStatement = null;
             Connection conn=null;
             long mill;
             long diffSeconds=0;
             long diffMinutes=0;
             try
              Class.forName("com.mysql.jdbc.Driver");
            Connection conn1=DriverManager.getConnection("jdbc:mysql://108.108.8.4:3306/navl?","root", "ajmani@%");
            preparedStatement = conn1.prepareStatement("select gpstime from xydata a inner join fm4features f on a.ID=f.ID where a.objectId= '18'  AND a.clientId = '1' AND a.gpstime > '2010-05-11 00:00:00'  AND a.gpstime < '2010-05-13 23:59:59' AND f.DataId='1' AND f.value = '1'");
            rs = preparedStatement.executeQuery();
            int a = 0;
            int b=0;
             int b1=0;
             int b2=0;
             int x=0;
             float secs = 0;
            Set<String> dates = new HashSet<String>();
            ArrayList<Integer> l=new ArrayList<Integer>();
              Timestamp t1 = null;
              Timestamp t2 = null;
              int count  = 0;
              while ( rs.next() )
                    String gpstime = rs.getString("GpsTime");
                 if (dates.add(gpstime) )
                     //System.out.println(rs.getTimestamp(1));
                     t2 =   rs.getTimestamp(1);
                     count++;
                   if (t1 == null )
                       int nano = t2.getSeconds();
                         System.out.println(nano);
                       System.out.println(nano);
                       System.out.println(t2);
                       System.out.println(count);
                  else
                        mill= (t1.getTime() - t2.getTime())/-1;
                        //System.out.println(mill);
                        diffSeconds = mill / 1000;
                        diffMinutes = mill / (60 * 1000);
                        long diffHours = mill / (60 * 60 * 1000);
                        long diffDays = mill / (24 * 60 * 60 * 1000);
                        //System.out.println("\nThe Date Different");
                        //System.out.println("Time in milliseconds: " + mill+ " milliseconds.");
                        System.out.println("GPSTime " +gpstime+ " Time in seconds: " + diffSeconds+ " seconds.");
                        //System.out.println("Time in minutes: " + diffMinutes+ " minutes.");
                        //System.out.println("Time in hours: " + diffHours+ " hours.");
                        //System.out.println("Time in days: " + diffDays+ " days.");
                  t1 = t2;
                //System.out.println("Time in minutes: " + diffSeconds+ " seconds.");
                if(diffSeconds < 80)
                  b=(int) diffSeconds;
                  System.out.println(b);
                  l.add(b);
                 else if(diffSeconds > 80)
                    b2=(int)diffSeconds%60;
                    System.out.println(b2);
                    l.add(b2);
                 a++;
              for (int i=0; i<l.size();)
                  secs+=l.get(i);
                  i++;
                 System.out.println(secs);
                 int hours = (int) (secs / 3600),
                 remainder = (int) (secs % 3600),
                 minutes = remainder / 60,
                 seconds = remainder % 60;
                    String disHour = (hours < 10 ? "0" : "") + hours,
                    disMinu = (minutes < 10 ? "0" : "") + minutes ,
                    disSec = (seconds < 10 ? "0" : "") + seconds ;
                    if (count < 2)
                        int se = Integer.parseInt(disSec);
                        String min = (t2.getSeconds() < 10 ? "0" : "") + t2.getSeconds();
                        System.out.println("00" + ":" +  "00" + ":" + min + " hh:mm:ss");
                    System.out.println(disHour +":"+ disMinu+":"+disSec+ " hh:mm:ss");
             }catch(Throwable th)
               Logger.getLogger(testing1.class.getName()).log(Level.SEVERE, null, th);
             }finally
               if(preparedStatement!=null)
                   preparedStatement.close();
               if(conn!=null)
                   conn.close();
    }this is output
    GPSTime 2010-05-13 20:16:13.0 Time in seconds: 60 seconds.
    60
    GPSTime 2010-05-13 20:17:10.0 Time in seconds: 57 seconds.
    57
    GPSTime 2010-05-13 20:18:10.0 Time in seconds: 60 seconds.
    60
    GPSTime 2010-05-13 20:19:10.0 Time in seconds: 60 seconds.
    60
    GPSTime 2010-05-13 20:20:10.0 Time in seconds: 60 seconds.
    60
    GPSTime 2010-05-13 20:21:11.0 Time in seconds: 61 seconds.
    61
    GPSTime 2010-05-13 20:22:11.0 Time in seconds: 60 seconds.
    60
    GPSTime 2010-05-13 20:23:11.0 Time in seconds: 60 seconds.
    60
    GPSTime 2010-05-13 20:24:11.0 Time in seconds: 60 seconds.
    60
    GPSTime 2010-05-13 20:25:11.0 Time in seconds: 60 seconds.
    60
    GPSTime 2010-05-13 20:26:11.0 Time in seconds: 60 seconds.
    60
    GPSTime 2010-05-13 20:27:11.0 Time in seconds: 60 seconds.
    60
    GPSTime 2010-05-13 20:28:12.0 Time in seconds: 61 seconds.
    61
    GPSTime 2010-05-13 20:29:12.0 Time in seconds: 60 seconds.
    60
    GPSTime 2010-05-13 20:30:12.0 Time in seconds: 60 seconds.
    60
    GPSTime 2010-05-13 20:31:12.0 Time in seconds: 60 seconds.
    60
    GPSTime 2010-05-13 20:32:12.0 Time in seconds: 60 seconds.
    60
    GPSTime 2010-05-13 20:37:46.0 Time in seconds: 334 seconds.
    34
    GPSTime 2010-05-13 20:38:46.0 Time in seconds: 60 seconds.
    60
    GPSTime 2010-05-13 20:47:22.0 Time in seconds: 516 seconds.
    36
    GPSTime 2010-05-13 21:12:54.0 Time in seconds: 1532 seconds.
    32
    GPSTime 2010-05-13 21:13:54.0 Time in seconds: 60 seconds.
    60
    GPSTime 2010-05-13 21:14:55.0 Time in seconds: 61 seconds.
    61
    GPSTime 2010-05-13 21:37:08.0 Time in seconds: 1333 seconds.
    13
    GPSTime 2010-05-13 21:38:09.0 Time in seconds: 61 seconds.
    61
    31169.0
    08:39:29 hh:mm:ssi am getting the total time for all date
    i need only the particular date of total time
    2010-05-11-->total time
    2010-05-12->Total time
    2010-05-13->total time
    how do i change the given code to get the above output
    please help me anybody having idea

    Bakthavachalam wrote:
    i am getting the total time for all date
    i need only the particular date of total timeIn which case your while(rs.next()) loop needs to process 1 day at a time and print its results when the date changes (assuming your Timestamps come in in date sequence; if not, you'll have to sort them first).
    I suspect you'll also have to decide what you want to do with
    GPSTime 2010-05-13 23:59:59.0
    followed by
    GPSTime 2010-05-14 00:00:01.0
    Do you still need to calculate the difference? And if so, which "date" does it go in, or is it split?
    Your logic seems incredibly convoluted for such a simple task. What exactly are you trying to do?
    Winston
    BTW: TimeStamp.getSeconds() is deprecated, which means you use it at your peril.

  • 'Overlapping Time Intervals' error while loading the Master Data

    Guys,
              Need you help with this. I am trying to load the Master Data (attribute) for InfoObject 0FMD_FRSITM using DTP from DataSource 0FMD_FRSITM_ATTR and am getting an error 'Overlapping Time Intervals'.
    This is happening due to overlapping Valid From/Valid To date's for the same Financial Statement Item (0FMD_FRSITM) with different Editions.
    If I select the option 'Ignore Duplicate Records' while loading the data, it is successful. But not all the records are loads and Editions are missing.
    Below is an example of how the data looks like.
    FRSITM         Valid To                  Valid From                 Edition
    1001             12/31/9999             04/01/2010                2010.1.1
    1001             01/31/2010             03/01/2010                2010.1.2
    1001             12/31/9999             02/01/2010                2010.1.3
    In the above scenario, the Valid To Data for record 1 and record 3 is the same (12/31/9999) and the record 3 is being ignore when I select the option 'Ignore Duplicate Records'.
    And also I see that the Edition is not the Key Field.
    Any suggestions or ideas? Appreciate your help.
    Thanks.

    FRSITM Valid To Valid From Edition
    1001 12/31/9999 04/01/2010 2010.1.1
    1001 01/31/2010 03/01/2010 2010.1.2
    1001 12/31/9999 02/01/2010 2010.1.3
    1. While selecting ignore duplicate, make sure to-date is not part of symantic key.
    2. if system comes across two same records it picks up the latest one.
    3. It shall merge the timelines is overlap is found.
    4. I hope Edition is time dependent attribute
    I believe infoobjet key is FRSITM Valid To.
    In your case because first record has more period and may be the latets record system ignore the earlier one with the same time interval.
    have a look at Q table and you shall be able to figure out for your self.
    Hope it helps
    Vikash

  • How do i find out the tables (data)effected in a schema after a particular time stamp

    how do i find out the tables (data not structure)effected in a schema after a particular time stamp?
    pls email in [email protected]

    You can't do that. That would be a real security risc.
    /KAj

  • HT201299 Is there an App which switches on Cellular data at a Particular time of day and switches off as well? if not someone should make an app

    Is there an App which switches on Cellular data at a Particular time of day and switches off as well? if not someone should make an app for that

    No, there are no apps that can do that, as no app would have access to the necessary API's to perform such a task.

  • DTP got failes due to overlapping time intervals of data records

    Hi,
    Can any one suggest me how to solve this issue....
    the problem is when iam loding Master Data DTP, the DTP is showing error message that Overlapping time intervals of data records.I mean the start data and end data for these error records are same.
    Eg: For some employees the start date and end data are same.
    Please advice , what can be done...
    Immediate reply is realy appreciated.

    Hi Shaik,
    By checking this check box ...
    You won't get any duplicate records, before loading the data DTP removes the duplicate records and loads into Master data.
    So, you can avoid the duplicate records by checking this.
    Regards,
    Ravi Kanth

  • 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?

  • Can someone help with a previous post labeled "Writing to a data file with time stamp - Help! "

    Can someone possibly help with a previous post labeled "Writing to a data file with time stamp - Help! "
    Thanks

    whats the problem?
    Aquaphire
    ---USING LABVIEW 6.1---

  • To measure and save the data of an instrument for a particular time

    Hello frds
    the problem might be simple for expertise. However, i am relatively new in labview. I need to measure the data of an optical power meter for some time. for e. g 5min and store this measurment on. txt file. I made a VI. But, I am seeing data in  real time waveformchart. donot getting an idea about how to store this chart data (x and y) in a file . The labview version in our lab is 7 which donot have data logging.
    pls help me

    Hi,
    You may want to include 'Time-stamp' along with every data-point (sample from the instrument) you read. And after the desired period (in this case 5 minutes), you need to save both in a file (binary or text). Then on reading that file, you'll be able to display the data-points on a 'X-Y Graph'.
    The code will look like:
    Don't forget to customize the appearance of 'X-axis' display property as shown below.
    As you're using LabVEIW version 7.0, I've saved the same code in version 8.0 (I can't further downgrade the code)
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.
    Attachments:
    Sample with Time-Stamp.vi ‏27 KB

  • Date Picker Incorrect time! URGENT HELP NEEDED

    Hello
    We have an application. In the application when you click a date picker the time is an hour forward. Where does the date picker get its time from?
    We have alot of date pickers and we are not wanting to set them by a query.
    The OS the machine application server is on is the correct time.
    Even if I create an item and select sysdate from dual the time is correct.
    Please help.

    From the SQL Reference manual:
    "The difference between this function and LOCALTIMESTAMP is that CURRENT_TIMESTAMP returns a TIMESTAMP WITH TIME ZONE value while LOCALTIMESTAMP returns a TIMESTAMP value."
    In your query, you're chopping off the timezone of CURRENT_TIMESTAMP (as it's of data type TIMESTAMP WITH TIME ZONE).
    Perform these two queries in SQL Commands:
    select current_timstamp from dual;
    select localtimestamp from dual;I'll bet you a million dollars that the query against LOCALTIMESTAMP is off by one hour from what you expect.
    Joel

  • HT2292 Have upgraded to itunes 11.0.1.12 start itunes and it is closed, message reads I tunes closed to help protect computer, data execution prevention has closed itunes. windows Vista 32bit

    Have upgraded to itunes 11.0.1.12. Start itunes and it is closed with the message itunes closed to help protect computer data execution prevention has closed itunes. operating system is ms vista 32 bit. I have followed the procedures that I can find on the itune support site.

    You're welcome. Glad you got things sorted out.
    (No problem about not spotting the solutions ... the most common causes of this sort of message changes over time, so it's not straightforward to be able to tell when a given piece of advice still applies to the symptoms. Definitely worth posting to try to get a current heads-up on the likely contemporary causes of a particular error message.)

  • Transaction should run at a particular time once in a day.

    I have a transaction and an Xacute query.  I am fetching data from local database, and posting a measuring document in SAP R/3. Right now i have to run the transaction manuallly to post the document.
    I want that my transaction should run automatically at a particular time once in a day (at the end of the day), and document should get posted in R/3 at the end of the day.
    Can you help me out, how to go ahead for the same.

    Ashish,
    In SAP MII Menu, In Left side Navigation,Go to
    Business Logic Services---> Schedule Editor. In that window,select the transction you want to run and select the time pattern how fequently you want to run the transaction.
    For more details : http://help.sap.com/saphelp_xmii120/helpdata/en/index.htm  (for MII 12.0)
    In above link select the System Mangement--> Shedule Editor.
    http://help.sap.com/saphelp_xmii115/helpdata/en/index.htm  (for MII 11.5)
    in above link Business Logic Services---> Schedule Editor.
    Hope this helps you.
    -Suresh

  • Recording data at particular iterations and writing to text file

    Hi all,
    this is my first time posting on the NI boards. I'm running into a couple problems I can't seem to figure out how to fix.
    I'm collecting data using a LabJack U3-HV daq. I've taken one of the out-of-the-box streaming functions that comes with the LabJack and modified it for my purposes. I am attempting to simply save the recorded data to a text file in columns, one for each of my 4 analog strain gauge inputs, and one for time. For some reason when the 'write to measurement file.vi' executes it is puts everything in rows, and the data is unintelligible.
    The 2nd issue I am facing, which is not currently visible in my vi, is that I am running my test for 60,000 cycles, which generates a ton of data. I'm measuring creep/fatigue with my strain gages so I don't need data for every cycle, probably for the first 1000, then the 2k, 4k, 6k, 8k, 10k, 20k, etc. More of an exponential curve. I tried using some max/min functions and then matching the 'write to measurement file.vi' with a case structure that only permitted it to write for particular iterations, but can't seem to get it to work.
    Thanks in advance for any help!
    Attachments:
    3.5LCP strain gages v2.vi ‏66 KB

    Hey carfreak,
    I've attached a screenshot that shows three different ways of trying to keep track of incrementing data and/or time in a while loop. The top loop just shows a program that demonstrates how shift registers can be used to transfer data between loops. This code just writes the iteration value to the array using the Build Array function.
    The first loop counts iterations in an extremely round-about way... the second shows that really you can just build the array directly using the iteration count (the blue "i" in the while loop is just an iteration counter).
    The final loop shows how you can use a time stamp to actually keep track of the relative time when a loop executes.
    Please note that these three should not actually be implemented together in one VI. I just built them in one BD for simplicity's sake for the screenshot. As described above, the producer-consumer architecture should be used when running parallel loops.
    Does that answer your question?
    Chris G
    Applications Engineer
    National Instruments
    Attachments:
    While Loops and Iterations.JPG ‏83 KB

  • How to read from DAQ in different time intervals

    Hello,
    I am currently using LabVIEW 2010. I am new to LabView.
    I have 9 thermocouples I want to record the temperature from and create a graph.
    For one graph I want to graph the data every second for the duration of about 1.25 hours. For the other I want to record and graph the data every 2 minutes for a duration of 30 minutes. The temperature then would be ramped up in an oven and set to a higher temperature. When it is stabilized, recording of the data again will begin again at intervals of 2 minutes for the duration of 30 minutes.
    The first is only to see the real time temperature variation while the program is recording and running. The second graph and data is what I will use to analyze.
    What I need help in is finding out how you can read from the DAQmx at two different time intervals. I tried two parallel loops with each one graphing the two separate graphs I need with a delay time. Those two parallel loops where then surrounded by another while loop. The result is that the outside loop waits until both loops are finished so I do not get the correct results for the real time data graph.
    Is there a way to call on the DAQ data you need at the time interval you desire? Any suggestions to solve this problem? Thank you for your time and help.

    You are on the right track.  Sample the data at the fastest rate and send it to the 1st graph.  For the slower graph, take a sample from the faster data at your desired time interval.  You could use a timer and a case structure for something quick and easy and still have everything run in the same loop.  You could use two loops running at different speeds, it is just a little more involved and a few other things to consider. 

Maybe you are looking for

  • K8n neo4 platinium, any hope for a software controll of SB fan ?

    Hello there Like some other peoples here i have a k8n neo4  platinium and think than its northbridge fan is REALLY noisy. What is the trick with this Northbridge fan ? I have to buy a normal one that doesn't  rotate at 23235564rpm, when i already pay

  • Tips & Tricks On Iphone 5s 7 Iphone 5c

    Hi My Name Is Anthony So Today Im Going To show You Some Tips On your Phone I Like doing This Because One Day I wanna work at Apple So lets Do This!                         First Tip: Turn Off Bluetooth when you dont need it                          

  • Acrobat freezes when I OCR pdf files.  How do I fix this?!?

    I just downloaded Adobe Acrobat 11 yesterday onto my MacBook Air. When I try to OCR documents Abobe semi-freezes, meaning that it won't let me save what it has just OCR'd, it won't let me close, it won't even let me minimize the window.  I say "semi-

  • Acknowledgment through Idoc ALEAUD

    Hi all, I'm receiving an invoice from a third-party system in SAP ECC through the Idoc INVOIC01. I have configured the Idoc ALEAUD01 to confirm to the 3rd-party system if the invoice has posted correctly. This Idoc sends out the idoc number of the in

  • Packaged jdbc modules and multi datasources

    Is it possible to configure a multi-datasource within a packaged jdbc module within an application ear? It appears to me that multi-datasources are only supported as system datasources.