How do I write snap shot of my data to measurement file every 5 seconds

Hi There
I'm trying take a snapshot of my data stream once every 5 seconds and write it to a .LVM file. I'm having trouble with the "Write to Measurement File" VI. The rate at which it writes data to the file appears to be dictated by the "Samples to Read" parameter in the DAQ assistant. I've tried placing the "Write to Measurement File" VI inside a case structure and initiating the case structure with an "Elapsed Time" VI. This only results in a 5 second delay before the "Write to Measurement File" VI initiates. Once the "Write to Measurement File" VI is initiated it begins writing at 20 x per second. Is there a way to change this or dictate the rate at which the "Write to Measurement File" VI exicutes? 
My reason for slowing down the write rate are, 1) Reduce disk space taken up by my data file. 2) Reduce CPU usage and hard disk access cycles.
The reason I can't increase the "Samples to Read" value in the DAQ assitant (to match my data writing requirement) is that my VI will begin to miss events and triggers.
I'm sure I can't be the only person who needs high frequency data acquisition and low frequency writing of the processed data to disk? I can't however see a straight forward way of achiving this.
The hardware I am using is a NI USB 6008 DAQ, acquiring analogue voltage data at 100hz.   
Thanks in advance for your help
Go to Solution.

The case structure and the elapsed time function should work. Did you configure it to reset when the time target is reached? You should get a single true and then the output will be false until the time has elapsed again. The write to file would not be running 20 times a second. Post your code if you still have problems.

Similar Messages

  • How to speed up the loading of live data into flash file.

    How to speed up the loading of live data into flash file if the swf file size is 1.5 MB. Flash file is using 20 web service connections to load the live data.

    I am also facing a similar problem wherein the SWF file takes time to load the refreshed data in Infoview i.e. after exporting the xlf file to Business Objects platform. Currently I am using Xcelcius Engage/Enterprise 2008 SP3 Windows (file name: 51038212.ZIP) version build number 12,3,0,670. Also the SWF file is approximately 2MB in size  and it uses 42 live office connections.
    Please suggest solution as to how to decrease the time it takes to refresh the live office connections.

  • How to save multiple snap shots in one file?

    I've been trying to take snap shots using a USB camera and save the
    them into one file; however, I've had no luck with the saving part. Can
    anybody help me with this problem? I've attached the code I'm using in
    case anybody wants to take a look.
    Thank You,
    Camera Snap ‏100 KB

    Hi Molana,
    If you are looking to save these images to file, you can use either the IMAQ Writefile VIs, or potentially the AVI writefile VIs.  These VIs are both on the FIle I/O palette of the Vision Utilities subpalette.  To write an AVI file, you <b>open</b>, write to, and then <b>close</b> a session, very similar to most processes in LabVIEW.
    I also noticed in your code that you are enumerating your USB cameras and closing the camera session all within the while loop.  This adds a great deal of overhead and time to your acquisition process.  I would recommend moving these processes outside of the acquisition loop, such that they occur once before and once after the snaps.
    If you are still having trouble acquiring, I would recommend that you download and install the NI IMAQ driver.  It includes examples for snapping and saving images with NI IMAQ.  This process is extremely similar to that which you would use in NI IMAQ for USB.
    Hope this helps!

  • HT2477 how to make a snap shot of a selected text

    Im trying make a snap shot of a selected text.

    To take the picture of a part of the screen
    Command (⌘)-Shift-4, and then drag the crosshair pointer to select the area. Continue to press the mouse button, release the keys, and then press Shift, Option, or the Space bar while you drag to resize the selection area. When you are ready to take a picture, release the mouse button.
    Pictures of the screen (screenshots) are saved as files on the desktop, but if you prefer to put a screenshot in the Clipboard, hold down the Control key while you press the other keys. You can then paste the picture into a document.

  • How do I write a cluster of an array to a file that can be looked at with other applications?

    I have a cluster of array that are different data types. How do I write this to a file, so that other applications can read it, i.e. notepad etc?

    Each elements of the array has a cluster of different data. It is unbundled and separated by a comma , then converted to a string. It is indexed out to a CSV array and then written to a spreadsheet file. The spreadsheet file reads it and outputs a CSV array. This is then going into for loop to reassemble the string output to its original clustered data representation. The iterations puts the clusters back into the array at the correct indexed position.hint: the for loop is the key to manipulating the array data...this VI is like an egg to a chicken and chicken to an egg, whatever came first?
    disassemble_assemble ‏20 KB

  • Can anyone help me write a code about coping data from many files and paste them to one file !?

    Hello ! 
    As I said in title , I have alot files (e.g. 60 files) and I want to write a code to copy 5 columns (for examples) of special sheet of files and paste them in one file respectively. For perceive it I explained it more below .
    Suppose one of my files is simplified as this :
    The name of  this file is 2006Oct and assume my excel files are like "2006Oct, 2006Nov,2006Dec,2007Jan ... 2010Dec". At first I should go to "my files" sheet of 2006Oct file and copy columns " A,B,C,D,E,F " that has "PerturbationNumber=1"
    respectively and then paste these to a file that is output file and repeat this process for the other files ( 2006Nov and etc ) and paste data in output file sequentially. 
    I appreciate and look foreward for any help in this issue.

    Try code below
    Sub CombineBooks()
    Dim wb As Workbook
    Dim sourceSht As Worksheet
    Dim destSht As Worksheet
    Set destSht = ThisWorkbook.Sheets(1)
    FolderName = "C:\temp\test\"
    file = Dir(FolderName & "*.xlsx")
    firstSht = True
    Do While file <> ""
    Set wb = Workbooks.Open(Filename:=FolderName & file, ReadOnly:=True)
    Set sourceSht = wb.Sheets(1)
    With sourceSht
    sourceLastRow = .Range("A" & Rows.Count).End(xlUp).Row
    If .Cells.AutoFilter Then
    .Cells.AutoFilter 'turn off autofilter
    End If
    .Cells.AutoFilter Field:=6, Criteria1:="1"
    If firstSht = True Then
    Set copyRange = .Range("A1", .Range("E" & sourceLastRow)).SpecialCells(xlCellTypeVisible)
    destSht.Range("F1") = "FileName"
    firstSht = False
    destNewRow = 1
    Set copyRange = .Range("A2", .Range("E" & sourceLastRow)).SpecialCells(xlCellTypeVisible)
    destNewRow = destSht.Range("A" & Rows.Count).End(xlUp).Row + 1
    End If
    copyRange.Copy Destination:=destSht.Range("A" & destNewRow)
    LastRow = destSht.Range("A" & Rows.Count).End(xlUp).Row
    If destNewRow = 1 Then
    destSht.Range("F2:F" & LastRow) = file
    destSht.Range("F" & destNewRow & ":F" & LastRow) = file
    End If
    End With
    wb.Close savechanges:=False
    file = Dir()
    End Sub

  • FSCM Documented Credit Decision SnapShot - how to remove the Snap Shot linked object

    Within the Documented Credit Decision linked objects there is the SnapShots for credit decisions section. I'm trying to remove this folder from the linked objects area. Also the linked objects folder titles are in German unlike all other areas of the case which are in English. Does anyone know where I need to make the adjustments to correct the language and remove the SnapShots from being displayed? Your insight is greatly appreciated.

    Hello John,
    1. T-Code : SCASE --> Select the second node "Records and case Record Models" you then get a drop sown -->  for the Modelet in the case record in SAP Credit Management  --> right click and choose find --> a new window opens --> direct execute (F8) --> Select DCD case Record --> on the right hand side you would be able to see 4 folders -->  the second fodler is snapshot nod deactivate that. node and i think then you should be able to see SNAPSHOT  in Object when i a normal DCD is created in linked Objects.
    Also we have one more option that is the badi which is used for SNAPSHOTS.
    You need to activate that badi in case if you do not want to use the SNAPSHOT functionality.
    I repeat you need to activate the badi if you do not want to use the SANPSHOT fucntion .
    SPRO--> Financial Supply Chain Management -->Credit Management --> Credit Risk Monitoring --> Documented Credit Decision --> Enhancements --> you would be able to see the 3 badi's  you need to activate the second one.

  • How can i write and read the same data

             i have attached my program to this mail. i have some problems in this program.
    1. I want to select the threshold for the rms,varience and s.d.
    But what i used is not doing that. i want to fix the upper threshold value and lower threshold value.
     when ever the input crosses upper threshold value i want the output and it will remains uptill the value above the lower threshold value.
    Once it come down the lower threshold value the output should be stopped.
    2. I want to write this in to a  file and i want to read this file. is this possible or not. 
                please try to help me i am very new with lab view6i
       [email protected]
    Attachments: ‏93 KB

    The easiest way to perform a certain action (such as file I/O) based on a certain condition (such as whether a value has passed a certain threshold) is to use a comparison VI in combination with a case structure. Then you can specify that if your rms, standard deviation and variance are above a threshold then perform a certain action.
    Also consider using shift registers to keep track of data from the last loop. If I understand you correctly, you want to start logging data when an upper threshold has been passed. Then you want to continue logging data until a lower threshold is passed. I have attached a non-functional but explanatory VI that will help explain how to implement logic to that effect. It also demonstrates that you can indeed write and read from the same file in a loop. The best way to do this is to open the file before the loop, do all the necessary writing and reading in the loop, and then close the file after the loop.
    Hope this helps!
    Jarrod S.
    National Instruments
    Attachments: ‏61 KB

  • How can we write BDC program to upload data in to line items(VA01) ?

    Error in processing BDC table control program...
    How can i populate data through bdc program dynamically, when some of the lines are in disable mode....
    for e.g ...
    in va01 transaction code ....
    1 to 5 lines are not in disable mode....
    but 5 to 10 lines are in disable mode...
    so hw u process those remaining disable lines at runtime and populate data in to the fields of line items...through bdc program..

    yea actually this question has been raised by interviewer ...
    but just the same i replied as you did...
    but he told that we can upload the data....towards in to disabled line items
    at run time..with using change trasaction va02..with implementing bdc programm...
    so i just want to know the steps of how to perform it..
    Can friends..

  • How can I write a checkbox.label into a server text file?

    Hello, world...
    I have a problem...
    I need to write into a server text file the label of the selected checkbox..
    The client side script is:
    private function writeFile (e:MouseEvent):void
                 if (cb1.selected == true && writeBtn.label == "Conferma")
            ("WriteNow",null,"La lettera iniziale è:"+cb1.label+"\n");
                     writeBtn.label = "Fatto";
                 else if (cb2.selected == true && writeBtn.label == "Conferma")
             ("WriteNow",null,"La lettera iniziale è:"+cb2.label+"\n");
                     writeBtn.label = "Fatto";
                 else if (cb3.selected == true && writeBtn.label == "Conferma")
              ("WriteNow",null,"La lettera iniziale è:"+cb3.label+"\n");
                      writeBtn.label = "Fatto";
    ...and the server side script is:
    var anVis = new File("Analisi_Visiva.txt");
    fileWriter.WriteNow = function(cliMsg)
  "text", "append");
            if (anVis.isOpen)
                 anVis.write(cliMsg);    //line 17.
                 anVis.close( );
    I have this error in the Live Log of the FMS3 Administration Console:
    Sending error message: C:\Programmi\Adobe\Flash Media Server 3\applications\AnalisiVisiva\AnalisiVisiva.asc:line 17:File operation write failed.
    Why doesn't It work?
    Please, help me...

    In order to download your internal table just call the following fm:
      BIN_FILESIZE                  = ' '
         filename                      = dest
         filetype                      = 'ASC'
         mode                          = 'O'
         filelength                    = filesi "Bytes read
          data_tab                      = p_ti_temp "your IT
         file_write_error              = 1
         invalid_filesize              = 2
         invalid_type                  = 3
         no_batch                      = 4
         unknown_error                 = 5
         gui_refuse_filetransfer       = 6
         no_authority                  = 7
         OTHERS                        = 8
    Hope this helps

  • How do I write the contents of a string array to file?  Is there a package

    freely avaliable to do this? I am writing a console program that will save the selections made to file. I have convenience packages that came with my book, it allows int and double arrays to be written to file, but not string arrays. Any help would be greatly appreciated.
    Joe Lavender

    One easy way to do this is to populate a Properties object with the index as the key and the element as the value.
    The properties has built in methods for writing it to file and reading it in.

  • How to process other task when reading the data from a file?

    I met a problem. I created a GUI to control the audio data processing. When the "Start" button is pressed, a block of data is read from the audio file and processed, then loop.But other buttons or method cannot be operated in that procession until all data is processed.
    How to let the other methods work under that circumstance? Should I use multiple threads?
    The relative code:
    SourceDataLine line;
    boolean stop = false;
    // When press "Start" button, the following method is invoked:
    public void play(){
    int bytesRead = 0;
    byte[] dataBuf = new byte[7500];
    while (bytesRead != -1& !stop)
    bytesRead =, 0, dataBuf.length);
    catch (IOException e)
    if (bytesRead >= 0)
    int bytesWritten = line.write(dataBuf, 0, bytesRead);
    // When press "stop" button, this method is invoked.
    public void stop(){
    stop = true;
    // When press "***" button, the following button is invoked:
    public void ***(){
    Many thanks.Looking forward to getting your answer.

    You have to use a seperate thread :
    Wheb you press the start button, you have to make sure a seperate thread is started :
    Thread runner = new Thread(){
    public void run(){
    //Here comes your code which reads the file

  • How do i use Java to read the data in XML files?

    I'm rather interested in using XML in my javacodes, as i think it will be of more OO.
    I want to make use of XML in my javacodes,
    but i don't know how to start doing it, so i hope someone would be able to enlighten me on this,
    Some examples would be perfect

    Humm interesting...well here is the link to Sun's tutorial on how to use maipulate an XML document using Java's jaxp api.I hope this will give u a hint.

  • How do you make iTunes read updated tag data from a file?

    This is such basic functionality that I'm sure I'm just missing it. It used to be the when I modified a file using a third party application (or editing a shared library using iTunes running on a different machine), all you had to do to get those updates into iTunes was select, hit "get info" and click OK without changing anything. That broke in 9.2 - it still recognized that the file has changed and adjusts the Date Modified field, but doesn't actually update any of the fields.
    The revised tags don't get updated until you either Get Info individually on each file, play the file, or modify the files. So realistically, there are no workarounds - the first two aren't realistic for a full library and the latter trashes your modification date and causes the refresh to take hours to complete if the library is on a remote server, rather than the ten minutes it used to take.

    turingtest2 wrote:
    I've written a script called UpdateTagInfo which should do the trick for you. Just select a bunch of tracks or an appropriate playlist and call the script. It will process each track, updating the tags if they've been changed externally. When complete it will tell you how many tracks were processed & how many were updated.
    More scripts at
    This is great! Thanks for posting and letting us know...

  • How to create BOM(Bill Of Material) item data from flat file?

    I have two flat files one is BOM(Bill Of Material) header data and BOM item data. BOM header is already created, now I want to create BOM item data with reference to the header data. Is there any standard direct batch input method in LSMW or Is there any standard BAPI or Is there any standard BDC report program to do the task? CS01 is the TCode to create BOM.

    The DI program works for create step CS01 and not for CS02.
    Perhaps this ( adding items in header by Tx: CS02 ) could be achieved by a Recording step in LSMW.
    Best Regards, Murugesh

Maybe you are looking for

  • How come, when I upload a home video from iMovie to YouTube, the uploaded video is not iPad/iPhone supported?????

    I connected a couple of home video clips from my iPhone in iMovie and then uploaded it to YouTube so that I could share the link with family. When the upload is complete, the video says that it is no in iPhone format and cannot be viewed? Whats up wi

  • Using network data to detect DPI

    "Network transparency cuts both ways. It can be exploited to engage in surveillance of Internet service providers as well as Internet users. In order to better understand DPI use and the scope of its deployment, the project makes use of crowdsourced

  • VersionMaker tools problem in WLS9.2

    Dear All, I have a existing client in WLS7.0 want to call a web services in WLS9.2 I try to use the "VersionMaker" utility of weblogic to rename the class in the weblogic.jar. But it show up the error: C:\bea92\weblogic92\server\lib>java weblogic.web

  • Back order Delivery Detail using API

    Hi All, Is there any API to back order the Delivery detail?.. Please let me know what is the API and how it can be done. Thanks and Regards, Mahesh

  • Integration of Sun One Web Server 6.0 with Sun One App Server 7.0

    Is it possible to integrate Sun One Web Server 6.0 with the Sun One App Server 7.0?? Sun One App Server 7.0 comes with the in-built HTTP listener. But we want to know if there is a way by which we can use the Sun One Web Server 6.0 with the App Serve