Rate of Obtaining Data

Hi everyone,
I have recently constructed a VI which obtains data from a DAQmx, and saves it to a log file, a long with the time duration of the test (Hence the Elapsed time VI).
The data saves to a immediatley a file, which can be analysed later using the same software.
The problem i seem to have, is that the data seems to save every 19 msec, yet I need it to be roughly 1msec or quicker. From things i have read on the forum, the constant saving of data directly to a file is what is slowing my code down, yet i can't seem to save the full 30 seconds worth of data to an array and then export that to a file once my data collection has finished.
The max length of a data sample would be 120 secs (ie 120,000 data points).
Here is a snippet of the data aquasition part of my code.
Any help would be greatly appreciated.
Thanks,
Oli
Solved!
Go to Solution.

If you can write to the file after acquiring the data, then that simplifies your solution.
Since you know the number of samples that you expect, you could initialize an array to a size slightly larger than the size to accommodate all your data and then write (insert) into that array.  You would pass the array around the loop using shift registers.  After the While Loop, you would write the entire array to file. 
Place a 1ms delay within the While Loop.  If your loop actually takes 1ms to obtain (read from DAQmx), then a little trick would be to set the value of the Delay to 0ms.  Yes zero.  0ms will still allow the processor to handle other tasks, although the CPU will show high % useage.  It is different than not having a Delay at all...
And get rid of the Elapsed Time..

Similar Messages

  • How to obtain date of creation if image is obtained using getImage()

    When Image is obtained using getImage() method , how to
    obtain date of creation or another header value if image is
    obtained using getImage method.

    Actually, some formats do indeed have creation or modification dates built in. e.g. http://www.w3.org/TR/PNG-Chunks.html#C.tIME. (Of course since most programs save a new copy of the file every time, the two dates are the same.) However, just because formats have this data doesn't mean it's reliable or even present. Your best bet is to pass creation dates in an Applet param tag for applets (assuming you were referring to Applet.getImage()) or to parse out a filename from a classloader URL and use a File object to check (assuming you were instead referring to Toolkit.getImage(URL)). That's the best answer I have without knowing more about what you are trying to accomplish.

  • Is it possible to use an exchange rate of any date  for amounts of a cube

    Hello experts,
    Is it possible or not to use an exchange rate of any date (ex : 23/02/2009) for amounts of a cube where the time are ONLY Fiscal Period.
    Thanks in advance.

    Thanks for the immediate response.
    The situation is..
    We have the cube , that has only FISCAL PERIODS.
    The user want to apply an exchange rate of the date 23/02/2009 (which is NOT the last day of the period !).
    See here the values of the table TCURR,, for the dates between 20/02 and 05/03.
    Normally, the user wants to use the Rate of the 23.02.2009 --> 0.87800
    Currently all the queries gives a calculation based on the rate of 0.89330, which is related to the 1st day AFTER the posting period that correspond to the given key-date.
    1.There are 3 fiscal periods ; 001 / 002 / 003.
    2.The calculated rate (0.89335) correspond to the TCURR rate of 02.03.2009 (value 0.89330)
    which date correspond to the 1st day after the fiscal periods (002) in which the key-date (23/02/2009) was choosen.
    Hence, we can say that the key-date is u2018Recognizedu2019 by the system as a true referenceu2026 (the choosen period correspond to the choosen key-date) ;
    BUT, it seems impossible to get the rate of a specific date, for a cube that has only FISCAL PERIODS.
    I am looking for
    1.looking in the literature whether this case is explained clearly ;
    2.eventually, finding a way to respons to the useru2019s ,needs
    thanks in advance.

  • Error while determ. loc. crcy: exchange rate type M date 01/26/2011 frm SGD

    Hi,
    There is an issue like after order is created,while creating invoice(third party order) after saving there is message as its saved.
    But when trying to go with either vf02 or vf03 there is an update termination as 'Error while determ. loc. crcy: exchange rate type M date 01/26/2011 from SGD to'...so any suggestions on this?

    HI Srilatha,
                 Go to T.code OB08 there position the exange rate Ex: M in you case and valid from 01.01.2011 then give currency if it is INR give 1INR X 1 INR = 1 give according to you document currecy.
    Thanks
    Vinayak

  • How to increase rate at which data is written to file?

    I have a program that reads data at 200kHz and I would like the program to write the data at the same rate. However, the fastest I seem to be able to get my program to write is about 5kHz. I have been using the DAQmx Read and the Format into File functions to read and write the data.
    I have tried moving the write function into a separate loop, so that the data would write to a file after the data collection was complete. However, this did not change the rate at which data was written to a file. Any suggestions for increasing the rate at which data is being to a file? Thanks for looking over my problem!
    Attachments:
    SampleWrite_Read.vi ‏58 KB

    Well, writing to a file is always slower since it takes some time to access the hard drive. I noticed in your program that you are writing into an ASCII file. That is also slower than if you write to a binary file. There are several examples that ship with LabVIEW that allow you to do High-Speed Datalogging (I actually believe that is the name of the examples). Those examples actually come in pairs, one does the datalogging, and another helps you read the file. I will recommend taking a look at them.
    The previous suggestions by Les Hammer is a great idea. Instead of acquiring 1-sample at a time, try acquiring 100 or 1000 samples and write them to the file.
    I hope that helps!
    GValdes

  • BR0083W Compression rates out of date - run BRBACKUP with option '-k only'

    Hi,
    I am getting backup warning in offline backup. i am attaching error log.
    BR0280I BRBACKUP time stamp: 2009-09-21 14.41.55
    BR0319I Control file copy created: /oracle/KBP/sapbackup/cntrlKBP.dbf 9388032
    BR0083W Compression rates out of date - run BRBACKUP with option '-k only'
    OS = IBM AIX
    DB = oracle 10g
    kindly do the needful
    kvl

    Dear KulandaivelS,
    Try this command.
    "brbackup -k only"
    Also check this [Link|http://help.sap.com/saphelp_45b/helpdata/EN/0d/d30b734a0c11d182b80000e829fbfe/content.htm]
    Regards,
    Bhavik G. Shroff
    Edited by: Bhavik G. Shroff on Sep 21, 2009 2:39 PM
    Edited by: Bhavik G. Shroff on Sep 21, 2009 2:44 PM

  • Tell me to get exchange rate on system date?

    hi all,
    plz tell me how to get exchange rate on current date or system date.I am using this query:
    select * from tcurr into table itab where  FCURR = final_tab-waers and TCURR = 'INR' .
    loop at itab where GDATU = sy-datum.
    l_rate  = itab-UKURS.
    endloop.
    In table tcurr format of date is different then that of system adate
    suppose system date is 27.06.2006 but it store like this
           79939372. pl tell me how to convert that date?
    thanx in advance.
    regards,
    hemlata

    Hi Hemlata,
    Its simple use write statement..
    Write:itab-GDATU. * if u want to dipslay on output
    write to var. * if u want to store in variable..
    <b>WRITE</b> will automatically convert to date format..
    Regards,
    sridhar

  • Exchange rate  on billing date- pricing date to be billing date

    Hi All,
    If I create a billing document then the pricing date is coming from sales order.
    Exchange rate is claculated based on sales order pricing date. But my client requirement is to consider the exchange rate on billing date.
    Please reply, points will be rewarded.
    Regards,
    venkat

    Dear venkat
    Go to VTFL, select your billing type and delivery type and click on "Item".  There select your item category and click on magnifying lens on top so that you will be taken to a screen where there is a field "PricingExchRate type".  Maintain "C" there and save.
    thanks
    G. Lakshmipathi

  • Compression rates out of date

    Hello,
    We did an Online Backup in our system. The backup was a success with message:
    <b>BR0053I BRBACKUP completed successfully with warnings</b>
    Since there is a warning, i checked the log and found out about this message:
    <b>BR0083W Compression rates out of date - run BRBACKUP with option '-k only</b>
    i want to know how to correct this and what was the cause of the error?
    Thanks and regards,
    Gelyne'

    Hi Siddhesh,
    Eventhough the warning can be ignored, still i need to eliminate the warnings present in my logs. Actually, i executed the ffg to update the compression rate of the server:
    <b>brbackup -u / -t online -k only -c</b>
    Unfortunately, during the process, there's an error again that occured:
    <i>#FILE..... /oracle/EQ0/sapdata2/sr3_7/sr3.data7  4.9887:1  420379201
    BR0280I BRBACKUP time stamp: 2007-02-03 22.44.30
    BR0063I 34 of 42 files processed - 73240.266 MB of 87249.773 MB done
    BR0204I Percentage done: 83.94%, estimated end time: 23:50
    BR0001I ******************************************________
    BR0201I Compressing /oracle/EQ0/origlogA/cntrl/cntrlEQ0.dbf
    BR0278E Command output of 'LANG=C compress -c /oracle/EQ0/origlogA/cntrl/cntrlEQ0.dbf | /usr/sap/EQ0/SYS/exe/run/brtools -f getcompr -':/oracle/EQ0/origlogA/cntrl/cntrlEQ0.dbf: Invalid argument
    BR0280I BRBACKUP time stamp: 2007-02-03 22.44.30
    BR0279E Return code from 'LANG=C compress -c /oracle/EQ0/origlogA/cntrl/cntrlEQ0.dbf | /usr/sap/EQ0/SYS/exe/run/brtools -f getcompr -': 5
    BR0224E Compressing /oracle/EQ0/origlogA/cntrl/cntrlEQ0.dbf to BRTOOLS failed due to previous errors
    BR0115I Compression rate for all files 4.7555:1
    BR0056I End of database backup: bdunmzdh.cmb 2007-02-03 23.09.19
    BR0280I BRBACKUP time stamp: 2007-02-03 23.09.20
    BR0054I BRBACKUP terminated with errors</i>
    Please help.
    Thanks and regards,
    Gelyne

  • Sample java code to obtain data from ALUI directory

    Hi
    I need to go to the ALUI LDAP ( directory ) services to get user profile information.
    The documentation did not help me to figure out the way to obtain data from it.
    so , it would be a great help if some one could share the sample java code api to obtain data from ALUI directory.

    i'm guessing you are asking to get the groups for a particular user. someone in the other thread posted the actual SQL, that may be easier. ( you are on 10gR3 right, because ALUI directory didn't exist before 6.5)
    I dont have a sample done yet, but the internet is filled with samples of java and ldap...
    http://www.coderanch.com/t/133108/Security/LDAP-sample-program

  • Exchng rate of any date for amounts of cube where the time is only FISCPER

    Hello,
    The user want to apply an exchange rate of the date 23/02/2009 (which is NOT the last day of the period !).
    Currently all the queries gives a calculation based on the rate of 0.89330, which is related to the 1st day AFTER the posting period that correspond to the given key-date.
    in the querry the key-date is u2018recognizedu2019 by the system as a true referenceu2026 (the choosen period correspond to the choosen key-date) ;BUT, it seems impossible to get the rate of a specific date, for a cube that has only FISCAL PERIODS.
    Any valuable help will appricated on this...
    Regards,
    NPR

    Check:
    [Key Date|http://help.sap.com/saphelp_nw70/helpdata/EN/1e/99ea3bd7896f58e10000000a11402f/content.htm]
    [How to... Create & Populate User Exit variable |http://sapbwneelam.blogspot.com/2007/10/how-to-create-populate-user-exit.html]
    Srini

  • Obtaining date without stamp time

    The datetime is stored in the table as the following:
    2014-03-03 00:00:00.000
    2014-03-03 00:00:00.000
    2014-03-03 00:00:00.000
    2014-03-03 00:00:00.000
    2014-03-03 00:00:00.000
    2014-03-03 00:00:00.000
    2014-03-04 00:00:00.000
    The following code is written inside view to obtain date only
    MAX(Substring(Convert(char,[Order date],110),1,10)) AS [Order Date]
    where [order date] between '20140303' and '20140307'
    The problem is when I used the above syntax, I was surprised to see in the output out of the date range. when I took out the substring and convert function it will bring the expected results but still the datetime or time stamp is there and I want to date
    The expected results
    2014-03-03
    2014-03-03
    2014-03-03
    2014-03-03
    2014-03-03
    2014-03-03
    2014-03-04
    How I could solve this problem

    Try the below:
    MAX(Cast([Order date] as date)) AS [Order Date]
    ....where [order date] between '20140303' and '20140307'

  • How do I obtain data from a web site???

    I am trying to use information from a sports stats page to automate scoring on a fantasy football site I am developing. After a game the weeks games have completed, I want to be able to extract the data, passing yards, passing TD's, etc. I can pull in a web site, and get to the point where the QB stats start. My question is there a way to strip all the html tags and just be left with the players name and numbers(stats)? I skip down 366 lines to get to the example below. Was thinking maybe, to tokenize using > as the delimiiter, then tokenizing again to strip away the rest of the tag using < as the delimiter. Any suggestions are much appreciated, thanks.
    CODE
    import java.net.*;
    import java.io.*;
    public class WebRipper
    public static void main(String[] argv)
    int count = 0;
    try {
    // Create a URL for the desired page
    URL url = new URL("http://www.fftoday.com/stats/playerstats.php?Season=2006&GameWeek=1&PosID=10&Le agueID=1");
    // Read all the text returned by the server
    BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
    String str;
    while ((str = in.readLine()) != null)
    if(count > 366)
    System.out.println(str);
    }// end if
    count ++;
    }// end while
    in.close();
    }// end try
    catch (MalformedURLException e) {}
    catch (IOException e) {}
    }// end main
    }// end WebRipper
    OUTPUT(this is just a example of the first few lines of output)
    <TD CLASS="sort1" ALIGN="LEFT" BGCOLOR="#ffffff"> 1. Donovan McNabb</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">PHI</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">1</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">1</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">24</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">35</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">314</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">3</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">1</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">4</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">7</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">0</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#e0e0e0">28.4</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">28.4</TD>
    </TR>

    Here is the first string I would want to obtain, can you explain how I would get the player name, then all of his stats. Remember there is ~366 lines of text before you get to this point. Also what or where should I dump the info to?
    Example from the info below I want Donovan McNabb, then all of his stats, excluding all the tags.
    <TD CLASS="sort1" ALIGN="LEFT" BGCOLOR="#ffffff"> 1. Donovan McNabb</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">PHI</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">1</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">1</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">24</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">35</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">314</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">3</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">1</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">4</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">7</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">0</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#e0e0e0">28.4</TD>
    <TD CLASS="sort1" ALIGN="center" BGCOLOR="#ffffff">28.4</TD>
    </TR>
    Pattern p = Pattern.compile("(?<=\\>)[^<]+");
    Matcher matcher = p.matcher(yourwebinfo);
    while(matcher.find())
    yourinfow/ohtmlcode = matcher.group();
    Thanks.

  • User Exit / Enhancement Point to set exchange rate using GR date in MIRO

    Dear experts,
    I'm trying to set exchange rate not as default but using GR date (When I input the PO number and click enter, the exchange rate should be set). So when system set the exchange rate, it will use the PO date, not GR date.
    What user exit / enhancement point / BADI should I use?
    I've already tried all user exit and BADI for MIRO but still not succeed. Is there anyone who could help me?
    Thank you very much..
    Regards,
    Shirley

    Hi,
    So as to capture Exchange Rate w.r.t PO date, it is suggested to go for Development/Enhancement with required import purchasing doc types in it. While doing GR and before posting the document you need to capture the Exch Rate as per PO date and replace with GR date Exch rate present in it through development.
    Regards,

  • How to obtain data from a device and display that data in an infinite loop

    I'm trying to run an infinite loop where I'm testing a robot for thermal insulation.
    I send the robot a command to run infinitely (using VISA communication)..., the robot starts running.
    At the same time I obtain the temperature data from its motors (through sensors) and want to display it. The data should be refreshed at regular itervals but I only get broken display of the data at various instances of time during the robot's test-run.
    I fear that there is a problem with the time synchronization. But having tried many permutations of time delays at various points in the program, I can not find the fault.
    Any help is much appreciated.
    Cheers
    Rajat

    We really need screen shots (*png format/NOT .bmp!) or attached code to see what might be the problem. There are an infinite number of mistakes that can be made (or nearly so), depending on how a program is written.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

Maybe you are looking for

  • Location services shows wrong location

    I have an iPhone 5 with latest iOS. I live in Kennesaw GA. I installed xfinity Internet at my new home. When my phone is connected to wifi, it shows the current location as charleston SC.   This is for any app that uses the GPS. My wife has an iPhone

  • Hp 2200 de printer on WIn 7 system

    Yes, this printer is older, but still works well.  However, I now have a new Win7 machine and can't find a decent driver to work with 4 bit Win7.  There is a PCL 5 driver that sort of works (with USB printer hookup) but it won't do duplex printing. 

  • When updating the order i am getting another credit card field automaticaly

    Hi Gurus,                  I had an requirement of limiting the credit card fields to single card means single credit card payment only. In standard ISA5.0 we have 3 credit card fields shown. i have resticted that to single card. Now the issue is whe

  • Sound  not coming through from recorder

    *HELP* When I transfer movies through Pyro A/V link from my recorder, the sound is not coming through. The video jack and the sound jacks are both plugged in from the same source. Any suggestions!!!

  • Catchup not working

    Since moving to high-speed fiber (new router and fiber modem) Catchup stalls whenever any provider (eg BBC, ITV, Sky or whatever) is highlighted. i.e. if you then select that provider NOTHING happens for at least a minute followed by he message "Prog