Writing multiple time histories to a file

I am taking time history data per cycle for a system cycle time of about 3
seconds (it may vary from cycle to cycle). I need to sample at a rate of
about 100 or 200Hz and I need to store the data for about 200 cycles. Since
this cycle data will be used in Excel, I would like to format the file accordingly.
The ideal way to format the file for Excel would be to write the data in
column form with a new column for each cycle. However, I can't find an easy
way to do this. Any suggestions???
Currently, I have the program write the data in row format, but Excel only
lets you make 256 columns, which only lets me take a little over 1 second
of data for each cycle. Also, I would like to stay away from storing the
d
ata in an array and writing when the program is done due to memory considerations.
I've also looked into using ActiveX and Excel, but the documentation on
this feature is poor and I'm also concerned that running Excel will slow
down LabVIEW.
Is there any easy way to do this without writing a program to post-process
the data?
TIA
Melissa Niesen
Fisher Controls

One of the ways I've done this without using ActiveX (usually my
first choice)is to write the output data in row format the way
you have and then, once the data has been collected, read the
whole file back into memory as a 2D array, transpose it, and
write it back to disk. This is memory intensive, but since your
datalogging is completed, it shouldn't cause you a lot of
problems.
Another way to do it is write the data to disk at each cycle in
binary logfile format using the low-level file functions. When
the datalogging is complete, you can read the log file directly
into a 1D cluster array. Use a for loop to index this array
into a 2D array, transpose, and write to disk as a delimited
string. Or, since you are done with logging, you might want to
consider poking the d
ata directly into Excel using ActiveX and
the Range method. There are some newer examples on NI's site
that have better documentation than before. You can email me if
you need more info (remove anti-spam).
MaxMar
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!

Similar Messages

  • Extracting body with header and trailer multiple times from a multirow file

    Hello Everyone,
    I am new to OSB and currently working on a project where I need to extract data from a flat file containing multiple rows of body and a single header and trailer in the following fashion:
    Original File:
    <Header></Header>
    <Details></Details>
    <Details></Details>
    <Trailer></Trailer>
    Desired format using OSB:
    <Header></Header>
    <Details></Details>
    <Trailer></Trailer> ... in a single file, multiple times
    Please help me in carrying out this functionality. It's really urgent and important.
    Thanks,
    Saurabh

    Some may argue this is not the right forum - database general might have been a little been than downloads - but now the thread is here I'll try an answer.
    As I see it It depends on your spooling tool.
    Lets assume you are using sqlplus.
    I that case the sql prompt command may serve your purpose
    Alternatively
    select 'header' from dual
    union all
    select field1||','||field2||','field3 .... /*must single string expression but may concatentate field */ from somtable
    union all
    select 'trailer' from dual;may suit.
    However I fear either I have not understood the question or if I have understood the question that you may have difficulties implementing this.
    Edited by: bigdelboy on 19-Apr-2009 14:32

  • Help please! Strange glitch having to click mouse multiple times to save a file

    Hi,
    I'm having a strange issue with Adobe Illustrator CS5 when I try to save as pdf. Basically I have to click save multiple times, sometimes over 100 times before it will ultimately save. Has anyone else encountered this weird problem and if so did you manage to find a resolution? I'm working on PC with Windows Vista.
    Many thanks in advance for any help - it's driving me crazy!

    Hi OB,
    Thanks for the reply. I had recently installed drop box so removed this hoping it might be the culprit, unfortunately not though, the problem remains.
    I've also tried the 'usual suspects' without any luck either.
    It really is an odd problem and not one I've encountered before. I also have an occasional issue whereby I'm unable to 'save for web' (only in Illustrator) - the option isn't selectable and even the keyboard short-cut doesn't work. It's glitch galore some days!
    Scott

  • Have to click multiple times to open PDF files with Reader XI

    Having issues opening pdf files in Adobe Reader XI.  Many times I have to double click 3 or 4 times before the document will display on my screen.  This is even more of an issue when trying to open a pdf in a browser, and will often cause IE to crash.  Every time I try to open a pdf file there is a process that is started, so I end up with a stack of AcroRd32.exe processes running with nothing to show for it.  I tried re-installing Reader, removing Acrobat 8 Standard, etc with no success.  OS is Windows 7, SP1.  Any help out there?

    You can't have both Acrobat 8 and Reader XI installed at the same time. They're not compatible with one another. Acrobat XI and Reader XI is fine, though.
    Also, Acrobat 8 is not compatible with Windows 7...

  • Need help (desperately) '^_^ in writing multiple objects in a single file

    For all those Java guru out there please help me,
    I want to write a simple application that can serialize objects in a single file. Currently I know how to serialize one object in one file using the ObjectOutputStream's writeObject () method.But the problem is that if i have 10.000 objects to serialize then I will have 10.000 file in my HD. To simplify things I want to write those 10.000 objects in a single file. But I dont know how to do that, any one can help ??

    You can write any number of objects of any type into a file when you serialize them. You need to realize that once they're written to the file, they're all placed in there as type Object, so there really isn't any distinction between any of them. You don't have a file that contains only Shapes, or only Images. You write them out as Objects, and then you discover their types later as your deserialize them and read them in. You should read into the "Reflection" capabilities that all objects have. You write an Image to a file, and then a Shape, and then a Color, you can later pack these all into an ArrayList as you read them in, and when you use them discover their type using reflection.
    -Jason Thomas.

  • Multiple Clicks to save a file

    Hi!
    I have to click multiple times on the save button whenever i need to save a file from internet on my new ToushSmart 600 PC. The mouse is working fine with all other clicks but when i click on the save button on any file that i need to download from internet or from my e-mail, the file download window gets unselected and then i have to click it multiple times to save the file.
    Is anybody else having the same problem?
    Thanks.

    Hi OB,
    Thanks for the reply. I had recently installed drop box so removed this hoping it might be the culprit, unfortunately not though, the problem remains.
    I've also tried the 'usual suspects' without any luck either.
    It really is an odd problem and not one I've encountered before. I also have an occasional issue whereby I'm unable to 'save for web' (only in Illustrator) - the option isn't selectable and even the keyboard short-cut doesn't work. It's glitch galore some days!
    Scott

  • Issue in reading multiple time properties file

    Use Case:
    I have a page in which i have to show some Outage Messages on page. So I have configured outage message in properties files. This message should me rendered each time when it finds that properties file in class path or it finds the values w.r.t their keys.
    So what I decide that I shall write java method and call this method on Loading the page but here what happen is that whenever that page is load each time that reader file will call , that will create memory leak .
    So, anyone help me on this. What will be the best approach for that reading multiple times properties file?
    I will be grateful for any help you can provide
    Thanks

    Hi,
    have a bean at applicationScope, somewhat like this
    import java.util.HashMap;
    public class ApplnProperties {
        private HashMap _propMap;
        public HashMap getPropMap() {
            if(_propMap == null){
                //read the properties file and populate _propMap
            return _propMap;
    }here we put condition _propMap == null so it would be called only once during application lifecycle.
    and on page you can refer the prop map like following
    #{beanName.propMap['KEY1']}Regards,

  • Hi my question is how can I sort and delete photo files which I have had backed up multiple times? Another way how can I get rid of from the duplicate?

    Hi my question is how can I sort and delete photo files which I have had backed up multiple times? Another way how can I get rid of from the duplicate?

    Provide the name of the program you are using so a Moderator may move this message to the correct program forum
    The Cloud is not a program, it is a delivery process... a program would be Photoshop or InDesign or Muse or ???

  • Dps file automatically opening multiple times when working on another file in the same folio?

    dps file automatically opening multiple times when working on another file in the same folio? Can anybody please help

    Can you try resetting your preferences first and see if that helps - see Troubleshooting 101: Replace, or "trash" your InDesign preferences

  • The finder is opening multiple times 30  as well as creating 40 to 50 files at random while reading mail.

    The finder will open multiple times 30 plus as well as create 40+ blank file folders on the desktop at random. Please help!

    Use Lion Recovery to reinstall the Mac OS X.

  • Writing several / multiple columns in a *.lvm file using write file option

    Hello All,
    I am doing several measurements and till now writing all the measurement in individual files thereby I am forced to use an external program to merge the files into one file of several columns.
    Is there a possibility to write a *.lvm file (or some other possibility say a *.txt file but no excel) with multiple columns where each column stands for a particular data?
    I am attaching a simple example where I have 4 different measurements (simulated using a regulator(I dont know how I can say this vi in english)??) which I am converting into array and trying to write them in a file of *.lvm extension. But the output is still a single column where every measurement is taking a different row which I dont want.
    Thanks in advance.
    Jan
    Attachments:
    Unbenannt 1.vi ‏97 KB

    Instead of using the Build Array, just wire your scalars to the Merge Signals function. This will create 4 separate signals that will be written in 4 separate columns. With the existing 1D array, you could also use the Write to Spreadsheet File instead of Write to Measurement File.

  • Read LabVIEW Measurement File VI Multiple Times

    I Get Error 4 When Calling the Read LabVIEW Measurement File VI Multiple Times. I've searched and found a paper on this issue. http://digital.ni.com/public.nsf/allkb/0576444C8FD4DC0F86256E83007FA540
    So I have a question: Is there a way to fix this to I can still Calling the Read LabVIEW Measurement File VI Multiple Times?
    Thank you.
    Attachments:
    Error 4.vi ‏33 KB
    data.zip ‏258 KB

    The paper you linked makes it very clear. The Read File Express VI cannot do what you want.  Either use the low level File VIs and functions or open the front panel of the Express VI and then modify it to do what you want. Most likely the Express VI uses the low level file functions internally, but it may have a lot of extra code to handle special cases. It is probably easier to use the low level functions and you learn how to use them.  
    Look at the Examples under Fundamentals >> File Input and Output. Something there may do most of what you want and even if it does not, the exampels will help you learn how to use the file resources in LV.
    Lynn

  • Php include file getting called multiple times

    I have created a form in file career.php. To carry out the validation user_registration.php is called at the beginning of the file.
    user_registration.php in turn calls library.php. Issue is that library.php is getting called multiple times.
    I have attached phperror.log which confirms the same.
    career.php
    <?php
    session_start();
    require_once('phpScript/user_registration.php');
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    user_registration.php
    <?php // This file is used for validating user form data. It calls process_upload.php to validate file uploaded by user
    $errors = array();  
    $messages = array();
    $testing = TRUE;
    error_log("Enter- user_registration.php. Testing mode $testing", 0);
    try {
              error_log("user_registration.php: Entered try catch block",0);
    require_once('library.php');
              error_log("Successfully called library.php",0);
              $public_key = '6LeDsNUSAAAAAIoaYuNhGm2zx_qgBECiybUWUkt6';
              $private_key = '6LeDsNUSAAAAACuvmJrec-_5seLdmhqUMngt8AiU';
              $recaptcha = new Zend_Service_ReCaptcha($public_key, $private_key);
              if(isset($_POST['submit'])) {          // Only execute if form is submitted by user
                error_log("user_registration.php. Submit button pressed by user", 0);
                require_once('Zend/Mail.php');
                $mail = new Zend_Mail('UTF-8');
                if (isset($_POST['name'])) {
                        $val = new Zend_Validate_Regex('/^\p{L}+[-\'\p{L} ]+$/u');
                        if (!$val->isValid($_POST['name'])) {
                          $errors['name'] = "Please enter your name, no numbers permitted";
    error_log("Exit- user_registration.php.", 0);
    library.php
    <?php
    error_log("Enter- library.php. Testing mode $testing", 0);
    if ($testing)  // If true then go to testing mode
              $library = '/Applications/MAMP/htdocs/mgtools-india/ZendFramework/library';
              set_include_path(get_include_path() . PATH_SEPARATOR . $library);
    require_once('Zend/Loader/Autoloader.php');
    try {
    Zend_Loader_Autoloader::getInstance();
    error_log("Exit- library.php. Testing mode $testing", 0);
    phperror.log
    Marker - 12-Oct-2012 10:27:26 AM
    [12-Oct-2012 04:57:33 UTC] Enter- user_registration.php. Testing mode 1
    [12-Oct-2012 04:57:33 UTC] user_registration.php: Entered try catch block
    [12-Oct-2012 04:57:33 UTC] Enter- library.php. Testing mode 1
    [12-Oct-2012 04:57:33 UTC] Exit- library.php. Testing mode 1
    [12-Oct-2012 04:57:33 UTC] Successfully called library.php
    [12-Oct-2012 04:57:36 UTC] Enter- user_registration.php. Testing mode 1
    [12-Oct-2012 04:57:36 UTC] Entered try catch block
    [12-Oct-2012 04:57:36 UTC] Enter- library.php. Testing mode 1
    [12-Oct-2012 04:57:36 UTC] Exit- library.php. Testing mode 1
    [12-Oct-2012 04:57:36 UTC] Successfully called library.php
    [12-Oct-2012 04:58:38 UTC] Enter- user_registration.php. Testing mode 1
    [12-Oct-2012 04:58:38 UTC] Entered try catch block
    [12-Oct-2012 04:58:38 UTC] Enter- library.php. Testing mode 1
    [12-Oct-2012 04:58:38 UTC] Exit- library.php. Testing mode 1
    [12-Oct-2012 04:58:38 UTC] Successfully called library.php
    [12-Oct-2012 04:58:38 UTC] user_registration.php. Submit button pressed by user
    [12-Oct-2012 04:58:39 UTC] user_registration.php, Processing enquiry form
    [12-Oct-2012 04:58:39 UTC] Enter- process_upload.php. Testing mode 1
    [12-Oct-2012 04:59:01 UTC] Exit- user_registration.php.
    I am not able to understand why user_registration.php and library.php are executing again and again.
    I ran this test on local testing server MAMP.
    The results are the same on remote server also.
    Please guide.

    I'm not sure what's happening there. The important question is whether the code is executed successfully.
    Since you're using the Zend Framework, it might be better to ask in a dedicated ZF forum.

  • 1.2.0 reads TNSNAMES.ORA file multiple times and duplicates values in Alias

    Since upgrading to 1.2.0.29.98 (clean install on Win XP SP 2), I have noticed that SQL Developer appears to be reading the TNSNAMES.ORA file multiple times. This results in the Network Alias pop-list on the TNS connection type to have duplicate values, although the number of duplicates for each entry varies widely - from four for the least that I saw and 252 for the most (assuming I counted that right :) ). We have approximately 270 entries in our TNSNAMES.ORA and the first entry in the file appears in the Network Alias list four times and the last entry in the file appears in the list 48 times.
    To be honest, I switched to Basic JDBC connections with 1.1 and only noticed the problem because of some network performance issues - I thought that SQL Developer had hung and I switched on the debugging and could see that it was looping through the TNSNAMES.ORA file. Now that the network performance issues have been resolved, it still takes a little while to open the new connection window, but it is liveable, so I don't know whether the problem is 1.2 specific or not.

    Sue,
    I assume from a bit of testing, that "each tns file on the system" means each file in the TNS_ADMIN location that starts with TNSNAMES.ORA.
    I set my TNS_ADMIN to a local location and copied the current TNSNAMES.ORA from the network location (and chopped it down to a handful of entries). When I restarted SQL Developer I only had a single copy of each alias. If I copied TNSNAMES.ORA to "Copy of TNSNAMES.ORA" I still only had a single copy of each alias. If I copied TNSNAMES.ORA to TNSNAMES.ORA.TXT I then had two copies of each alias.
    Unfortunately, I don't have any say in the maintenance of the network TNS_ADMIN location and it has almost 200 backup copies of the tns file, typically named TNSNAMES.ORA.YYYYMMDD.
    My TNS_ADMIN setting is done as a Windows environment variable. I do not have any TNS_ADMIN setting in my registry.

  • Write to File Multiple times WTK 2.5.2

    Hello All
    I am trying to write to a file multiple times (in WTK 2.5.2 on Win XP SP2). So I create a FileConnection and create a PrintStream with it. Using the PrintStream I write data to the file multiple times.
    The problem I am facing is that the write happens the first time (after the usual security prompts) and not after that. The code is below. The second time onwards the security prompt displayed does not get closed and the application remains non responsive
    public class IOWriter {
         private PrintStream out;
         public IOWriter() {
              String sMemCardRoot = System.getProperty("fileconn.dir.memorycard");
              String sFileName = "System.out.txt";
              try {
                   FileConnection fc = (FileConnection)Connector.open(sMemCardRoot + sFileName, Connector.READ_WRITE);
                   if(!fc.exists()) {
                        fc.create();
                   out = new PrintStream(fc.openOutputStream());
                   println("Initialized");
              } catch (Exception e) {
                   e.printStackTrace();
         public void println(String sData) {
              if(null != out) {
                   if(null == sData) {
                        sData = "";
                   out.println(sData);
                   out.flush();
         public void unInit() {
              out.close();
    }I have set the fileconn.dir.memorycard System property to a folder
    I have been trying to debug this in the WTK for some time now. have not tested on a device yet. Let me know if you could identify the problem.
    Thanks & Regards
    Edited by: SonieThomas on Jan 19, 2009 1:51 AM
    Edited by: SonieThomas on Jan 19, 2009 1:54 AM

    It sounds like you need to Use the open\create\replace VI to open a data file and get a reference to it. You use the Write File node to write the data, specifing the start pos as 0, and the offset as the current file marker. When you're done with the data file, you use the Close File node to release the file reference.
    I've written a Sub VI that should do what you want, or come close. Take it apart and see how it works. I'm including a VI that uses the Sub VI to create and append text data.
    I hope this helps!
    John Wilson
    Sanders Engineering & Analytical Services, Inc.
    Mobile, AL
    251-633-4120
    [email protected]
    Attachments:
    test_writing_gpib_data_file.vi ‏26 KB
    write_gpib_data_string.vi ‏84 KB

Maybe you are looking for