File and Streams resources

Can anyone tell me of any links where I can find extensive material about Files & Streams in Java?
Many Thanks

Hi there
try
http://java.sun.com/docs/books/tutorial/essential/io/index.html
There is a section on Files and Streams
Alternatively there is a very useful book by Elliot Rusty Haroldcalled "Java I/O" O'Reilly & Associates; ISBN: 1565924851
This is very readable and helpful

Similar Messages

  • Files and Streams java -- Sequential access file-- Plz help me

    I am able to add records in sequential file and then also I am able to display each record sequentially.
    But after closing the file if I open the file for adding records, the newly added records are not being displayed while clicking the "next" button to read them.
    How to bring the pointer to end of records in sequential file , so that when I stat adding records after opening an existing file, they should be added successively after the last record in that file.
    enter = gui.getTask1();
              enter.setText("Enter");
              enter.setEnabled(true);
              try
              FileOutputStream fos = new FileOutputStream("c:/file.txt",true);
              output = new ObjectOutputStream(fos);
              enter.addActionListener(
                        new ActionListener()
                             public void actionPerformed( ActionEvent e )
                                  addRecord1();
              catch(Exception e)
                   System.out.println("Error in ObjectOutputStream before pressing Enter button");
    private void addRecord1()
              String[] fieldValues = gui.getFieldValues();
              if(! fieldValues[0].equals(""))
                   try
                        int id=Integer.parseInt(fieldValues[0]);
                        if(id>0)
                             Record rcrd = new Record(id, fieldValues[1], fieldValues[2]);
                             System.out.println(" " +rcrd.getString()+"\n");
                             output.writeObject(rcrd);
                             output.flush();
                             gui.clearFields();
                             display.append(" "+rcrd.getId()+" "+rcrd.getName()+" "+rcrd.getAddr()+"\n");
                             readf.setEnabled(true);
                   catch (NumberFormatException nfe)
                        JOptionPane.showMessageDialog(this, "Incorrect id", "Invalid number formate", JOptionPane.ERROR_MESSAGE);
                   catch (IOException io)
                        closeFile();
         }Message was edited by:
    MissJavaa

    You can't append multiple ObjectOutputStreams to the same file unless you know where one ends and the other starts and you use a new ObjectInputStream at each join. And even that mightn't work because of buffering. Keep the file open or start a new file.
    And I wouldn't call the file 'file.txt', it isn't a text file.

  • Files and Streams Question

    Hi! Java is my first and only language; and I am very new to Java. This is my first somewhat knowledgeable attempt to get a question answered on a forum of any kind. I put a question in this forum about two weeks ago, but I lost it. So, I am very grateful for any comments that can improve my ability to get my questions answered. Thank you. Mike
    Here is my problem:
    Read File: I want to read pT.txt or plainText.txt file (that is encoded in Unicode) into a String variable (inputLine).
    (I want to do some processing of the inputLine String and assign the processing results into outputLine.)
    Write File: I want to write outputLine into aPT.txt or anotherPlainText.txt file (that is encoded in ASCII).
    Here is my question:
    What is the simplest or easiest code for the Read File and Write File instructions?
    Thanks. Mike

    Why am I not entering the while loop?
    import java.io.*;
    //not yet: import java.util.Scanner;
    public class FnS
         public static void main(String[] args) throws Exception
              File inFile = new File("pT.txt");
              BufferedReader input = new BufferedReader (new FileReader (inFile));          
              //not yet: PrintWriter outFile = new PrintWriter (new BufferedWriter (new FileWriter ("outFile.txt")));
              String peek1, peek2, peek3, peek4, peek5, peek6;
              boolean pk1 = false, pk2 = false, pk3 = false, pk4 = false, pk5 = false;
              int count = 0;
              while(input.ready())     // begin search
                   peek1  = input.readLine();
                   if (peek1.startsWith("One"))
                        pk1 = true;
                        peek2  = input.readLine();
                        if(pk1 && peek2.startsWith("Two"))
                             pk2 =true;
                             while(pk1 && pk2)
                                  peek3  = input.readLine();
                                  if(pk1 && pk2 && peek3.startsWith("Three"))
                                       pk3 = true;
                                       peek4 = input.readLine();
                                       if(pk1 && pk2 && pk3 && peek4.startsWith("Four"))
                                            pk4 = true;
                                            while(pk1 && pk2 && pk3 && pk4)
                                                 peek5 = input.readLine();
                                                 if(pk1 && pk2 && pk3 && pk4 && peek5.startsWith("Five"))
                                                      pk5 = true;
                                                      peek6 = input.readLine();
                                                      if(pk1 && pk2 && pk3 && pk4 && pk5 && peek6.startsWith("Six"))
                                                            *  (I want to do some processing of the inputLine String and assign the processing results into outputLine.)
                                                            *     Write File:  I want to write outputLine into aPT.txt or anotherPlainText.txt file (that is encoded in ASCII).
                                                            *     Here is my question:
                                                            *  What is the simplest or easiest code for the Read File and Write File instructions?
                                                            *     Thanks.  Mike
                                                           System.out.println("\n" + peek6 + "\n" + peek5 + "\n" + peek4 + "\n" + peek3);
                                                           count++;
                                                           pk1 = false;
                                                           pk2 = false;
                                                           pk3 = false;
                                                           pk4 = false;
                                                           pk5 = false;
                                                           break;
                                                      }//if pk1 && pk2 && pk3 && pk4 && pk5 && peek6
                                                      else
                                                           pk1 = false;
                                                           pk2 = false;
                                                           pk3 = false;
                                                           pk4 = false;
                                                           pk5 = false;
                                                           break;
                                                      }//else begin  new search
                                                 }//if pk1 && pk2 && pk3 && pk4 && peek5
                                            }//while pk1 && pk2 && pk3 && pk4
                                       }// if pk1 && pk2 && pk3 && peek4
                                       else
                                            pk1 = false;
                                            pk2 = false;
                                            pk3 = false;
                                            pk4 = false;
                                            pk5 = false;
                                            break;
                                       }//else begin new search
                                  }//if pk1 && pk2 && peek3
                             }//while pk1 && pk2                              
                        }//if pk1 && peek2
                        else
                             pk1 = false;
                             pk2 = false;
                             pk3 = false;
                             pk4 = false;
                             pk5 = false;
                        }//else begin new search
                   }//if peek1
              }//while hasNext
              System.out.println("\nemail count = " + count);
    }

  • Compressing files and preserving resource forks

    I am trying to compress a bunch of SubEthaEdit files in a folder while preserving their resource forks. But when I compress the folder 'foo' with,
    tar zcvf foo.tgz foo
    and uncompress foo.tgz on a different computer with,
    tar zxvf foo.tgz
    the SubEthaEdit icons are lost and I can no longer automatically open the files with SubEthaEdit by double clicking on them.
    Does anyone have a solution (or solutions)? Thanks.

    Hi Wataru:
    I don't have a definitive answer to your question, but here are 4 ideas:
    1. You are probably using /sw/bin/tar. I am unclear on this but it might be that on 10.4.x, /usr/bin/tar behaves in a more resource-fork-friendly fashion. So you could try that.
    2. Fink I think still has hfstar, and that will explicitly do what you need.
    3. You could make a disk image, put the files in that, and then tar up the disk image.
    4. It might actually be doing the right thing, but the resource forks aren't being recognized. I have noticed that resource forks from one mac account on one computer are not recognized on another mac with a different UID. Try using mdls to see if that is what is going on.

  • Files and Streaming

    Hi. I am loading a big text file to a JTextPane and I'm using a URL from getResource() and URLConnection to get the stream. I'm using InputStreamReader to read the stream. The problem is the whole process is slow. A 139kb text file would take an hour to get. The technique im using is a simple one, straight from the io tutorials.
    Another question on files: I have a JProgressBar for the above stream, but I use separate File object just to get the filesize. And I'm chaning the program in to an applet and using that File object violates applet restrictions and therefore cant be read. How do I get the filesize from a URL or any way that is valid from an applet?
    Thanks.

    Hi there. I think I solved it. The problem is inside the loop that reads the stream I have:
    contents = contents + (char) buf;
    where contents is the String that eventually gets setTexted in the textpane and int buf is the read byte from the stream. It is slow because when the string gets bigger, appending a single char to it becomes slow. I thought about it when I put a progressbar with it. The bar decelerates in time, therefore something inside is getting slower.

  • Files and Streams in java -- How to display successive records

    Hi,
    I developed an application in which I enter name and id in a gui. Each time I enter, the records are added in the sequential file.
    Then I have a button to open that file. It also opens.
    Then I have a button to read the records(which has name and id) in sequential order. Each time I click next button records should be displayed in their respective text boxes. But, only the 1st record is displyed. Then I get IOException. Why am I not able to move to records after 1st record. How could I disply records till EOF is reached.
    Plz see my code for open function and read next function
    private void openFile()
    input=new ObjectInputStream(new FileInputStream("c:/file.dat"));
    openf.setEnabled(false);
    readf.setEnabled(true);
    private void readNext()
    rcrd=(Record)input.readObject();
    String val[]= {String.valueOf(rcrd.getId()),rcrd.getName(),rcrd.getAddr()};
    gui.setFieldValues(val);
    Why am I not able to move to records after 1st record. How could I disply records till EOF is reached.

    package files;
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import files.FileGui;
    import files.Record;
    import java.util.*;
    import java.lang.*;
    public class CreateFile extends JFrame
         private ObjectOutputStream output;
         private FileGui gui;
         private JButton enter, readf, openf;
         private Record rcrd;
         private ObjectInputStream input;
         boolean eof;
         LinkedList link = new LinkedList();
         ListIterator li=link.listIterator();
         public CreateFile()
              super( "Creating sequential file" );
              getContentPane().setLayout( new BorderLayout() );
              gui = new FileGui();
              enter = gui.getTask1();
              enter.setText("Enter");
              enter.setEnabled(true);
              enter.addActionListener(
                        new ActionListener()
                             public void actionPerformed( ActionEvent e )
                                  addRecord1();
              addWindowListener(
                        new WindowAdapter()
                             public void windowClosing( WindowEvent e )
                                  if(output != null)
                                       closeFile();
                                  else
                                       System.exit(0);
              openf = gui.getTask2();
              openf.setText("Open");
              openf.addActionListener(
                        new ActionListener()
                             public void actionPerformed(ActionEvent e)
                                  openFile();
    readf = gui.getTask3();
              readf.setText("Read Next");
              readf.addActionListener(
                        new ActionListener()
                             public void actionPerformed(ActionEvent e)
                                  readFile();
              getContentPane().add(gui, BorderLayout.CENTER);
              setSize(300,200);
              show();
         private void readFile()
                        try
                             rcrd=(Record)input.readObject();
                             String val[]={String.valueOf(rcrd.getId()),rcrd.getName(),rcrd.getAddr()};
                             gui.setFieldValues(val);
                        catch(EOFException eof)
                             System.out.print("EOFException");
                        catch(ClassNotFoundException cnfe)
                             System.out.print("ClassNotFoundException");
                        catch(IOException ioe)
                             System.out.print("IOException");
         private void openFile()
                   JFileChooser fileChooser = new JFileChooser();
                   fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
                   int result = fileChooser.showOpenDialog(this);
                   if(result==JFileChooser.CANCEL_OPTION)
                        return;
                   File fileName = fileChooser.getSelectedFile();
                   if(fileName==null || fileName.getName().equals(""))
                        JOptionPane.showMessageDialog(this, "Invalid file name", "Invalid file name", JOptionPane.ERROR_MESSAGE);
                   else
                        try
                             //File fileName=new File("c:/file.txt");
                             input=new ObjectInputStream(new FileInputStream("c:/file.dat"));
                             openf.setEnabled(false);
                             readf.setEnabled(true);
                   catch (Exception e)
                        System.out.println("Error in opening file");
         private void closeFile()
              try
                   output.close();
                   System.exit(0);
              catch(IOException ex)
                   JOptionPane.showMessageDialog(this, "Error Closing File", "Error", JOptionPane.ERROR_MESSAGE);
                   System.exit(1);
         private void addRecord1()
              String[] fieldValues = gui.getFieldValues();
              if(! fieldValues[0].equals(""))
                   try
                        int id=Integer.parseInt(fieldValues[0]);
                        if(id>0)
                             Record rcrd = new Record(id, fieldValues[1], fieldValues[2]);
                             System.out.println(" " +rcrd.getString());
                             link.add(" " +rcrd.getString());
                             //System.out.println("Hello3");
                             FileOutputStream fos = new FileOutputStream("c:/file.dat",true);
                             output = new ObjectOutputStream(fos);
                             output.writeObject(rcrd);
                             output.flush();
                             //gui.clearFields();
                             readf.setEnabled(true);
                   catch (NumberFormatException nfe)
                        JOptionPane.showMessageDialog(this, "Incorrect id", "Invalid number formate", JOptionPane.ERROR_MESSAGE);
                   catch (IOException io)
                        closeFile();
         public static void main(String args[])
              new CreateFile();
    }

  • Strip audio from video and stream

    Hi. We have the Flash Media Interactive Serve 3.5. Is there an automated way to strip the audio from video files and stream on FMIS? Thanks.

    Thanks for your reply. I believe we'll be broadcasting to a single channel.

  • How can I tell if and how a SWF  file is streaming?

    My department is new to Flash, but we've now been creating
    basic Flash Videos for websites for a few months. We've always
    encoded our videos to FLVs (Flash 8), and then used the Video
    Import Wizard in Flash 8 to import those FLVs into our FLA
    document. We now need to be able to error-check all of our files
    (each video comprised of four files: an HTML file, an FLV file, and
    two SWF files including the player skin) to make sure that
    progressive videos are indeed progressive and streaming videos are
    streaming.
    My process thus far:
    In Flash 8, I brought up the SWF file and opened the Output
    window; from the Debug menu I then selected variables. I was able
    to find the variable "isRTMP:false", which according to the
    documentation seems to mean that the video is progressive, not
    streaming. However, when I authored this FLA file, I know I chose
    the streaming option (FVSS not FCS) in the Video Import Wizard. Am
    I looking in the wrong place? Am I confused about the meaning of
    this variable?
    Bottom line, how do I determine after authoring whether an
    SWF is streaming or progressive, and moreover whether it's been
    authored to use FVSS or FCS?

    I'm sorry, perhaps I was a little unclear. The files are all
    still stored herelocally, since they have not yet been deployed.
    I'm looking for some property of the SWF file (maybe visible
    through Component Inspector?) that will tell me how it has been
    authored. Is there any place in the SWF file itself that contains
    this information (since the files are not yet deployed)?

  • Unable to stream SMIL files unless the html page, swf file and the smil ffile are on the FMS server.

    When I place the .swf, smil and http files on the FMS server the SMIL stream test sample works fine
    But When I move the files to my web server I get Connection error.
    This is the same issue discussed in http://forums.adobe.com/thread/554107
    I added a ‘base’ variable but it did not work for me.
    The SMIL file has the correct path to the sample files and FMS server
         <meta base="rtmp://200.200.200.23/vod/" />
    I am able to stream files from my html file on my webserver not the FMS server by pointing to the FMS server at rtmp://200.200.200.23/vod/mp4:sample1_1500kbps.f4v
    Is this a domain security setting? If so, where do I change it?
    If not How do I get FMS to stream SMIL files without installing a webserver with FMS?
    Thanks,

    Hi,
    I think there is bug with that videoPlayer.swf which is used by index.html of webroot folder of FMS to play media files, its not able to parse smil file correctly. I used some other player and used the smil file and kept it on http server other than fms server so it was able to dynamically stream videos. So I would suggest you to create your own player which uses smil file. You can take help from the below link to create player:
    http://www.adobe.com/devnet/flashmediaserver/articles/dynstream_advanced_pt1_05.html
    Regards,
    Amit

  • Need help optimizing the writing of a very large array and streaming it a file

    Hi,
    I have a very large array that I need to create and later write to a TDMS file. The array has 45 million entries, or 4.5x10^7 data points. These data points are of double format. The array is created by using a square pulse waveform generator and user-defined specifications of the delay, wait time, voltages, etc. 
    I'm not sure how to optimize the code so it doesn't take forever. It currently takes at least 40 minutes, and I'm still running it, to create and write this array. I know there needs to be a better way, as the array is large and consumes a lot of memory but it's not absurdly large. The computer I'm running this on is running Windows Vista 32-bit, and has 4GB RAM and an Intel Core 2 CPU @ 1.8Mhz. 
    I've read the "Managing Large Data Sets in LabVIEW" article (http://zone.ni.com/devzone/cda/tut/p/id/3625), but I'm unsure how to apply the principles here.  I believe the problem lies in making too many copies of the array, as creating and writing 1x10^6 values takes < 10 seconds, but writing 4x10^6 values, which should theoretically take < 40 seconds, takes minutes. 
    Is there a way to work with a reference of an array instead of a copy of an array?
    Attached is my current VI, Generate_Square_Pulse_With_TDMS_Stream.VI and it's two dependencies, although I doubt they are bottlenecking the program. 
    Any advice will be very much appreciated. 
    Thanks
    Attachments:
    Generate_Square_Pulse_With_TDMS_Stream.vi ‏13 KB
    Square_Pulse.vi ‏13 KB
    Write_TDMS_File.vi ‏27 KB

    Thanks Ravens Fan, using replace array subset and initializing the array beforehand sped up the process immensely. I can now generate an array of 45,000,000 doubles in about one second.
    However, when I try to write all of that out to TDMS at the end LV runs out of memory and crashes. Is it possible to write out the data in blocks and make sure memory is freed up before writing out the next block? I can use a simple loop to write out the blocks, but I'm unsure how to verify that memory has been cleared before proceeding.  Furthermore, is there a way to ensure that memory and all resources are freed up at the end of the waveform generation VI? 
    Attached is my new VI, and a refined TDMS write VI (I just disabled the file viewer at the end). Sorry that it's a tad bit messy at the moment, but most of that mess comes from doing some arithmetic to determine which indices to replace array subsets with. I currently have the TDMS write disabled.
    Just to clarify the above, I understand how to write out the data in blocks; my question is: how do I ensure that memory is freed up between subsequent writes, and how do I ensure that memory is freed up after execution of the VI?
    @Jeff: I'm generating the waveform here, not reading it. I guess I'm not generating a "waveform" but rather a set of doubles. However, converting that into an actual waveform can come later. 
    Thanks for the replies!
    Attachments:
    Generate_Square_Pulse_With_TDMS_Stream.vi ‏14 KB
    Write_TDMS_File.vi ‏27 KB

  • Best way to stream lots of data to file and post process it

    Hello,
    I am trying to do something that seems like it should be quite simple but am having some difficulty figuring out how to do it.  I am running a test that has over 100 channels of mixed sensor data.  The test will run for several days or longer at a time and I need to log/stream data at about 4Hz while the test is running.  The data I need to log is a mixture of different data types that include a time stamp, several integer values (both 32 and 64 bit), and a lot of floating point values.  I would like to write the data to file in a very compressed format because the test is scheduled to run for over a year (stopping every few days) and the data files can get quite large.  I currently have a solution that simply bundles all the date into a cluster then writes/streams the cluster to a binary file as the test runs.  This approach works fine but involves some post processing to convert the data into a format, typically a text file, that can be worked with in programs like Excel or DIAdem.   After the files are converted into a text file they are, no surprise, a lot larger than (about 3 times) the original binary file size.
    I am considering several options to improve my current process.  The first option is writing the data directly to a tdms file which would allow me to quicly import the data into DIAdem (or Excel with a plugin) for processing/visualization.   The challenge I am having (note, this is my first experience working with tdms files and I have a lot to learn) is that I can not find a simple way to write/stream all the different data types into one tdms file and keep each scan of data (containing different data types) tied to one time stamp.  Each time I write data to file, I would like the write to contain a time stamp in column 1, integer values in columns 2 through 5, and floating point values in the remaining columns (about 90 of them).  Yes, I know there are no columns in binary files but this is how I would like the data to appear when I import it into DIAdem or Excel.  
    The other option I am considering is just writing a custom data plugin for DIAdem that would allow me to import the binary files that I am currently creating directly into DIAdem.  If someone could provide me with some suggestions as to what option would be the best I would appreciate it.  Or, if there is a better option that I have not mentioned feel free to recommend it.  Thanks in advance for your help.

    Hello,
    Here is a simple example, of course here I only create one value per iteration in the while loop for simplicity. You can also set properties of the file which can be useful, and set up different channels.
    Beside, you can use multiple groups to have more flexibility in data storage. You can think of channels like columns, and groups as sheets in Excel, so you see this way your data when you import the tdms file into Excel.
    I hope it helps, of course there are much more advanced features with TDMS files, read the help docs!

  • Simultaneous Recording in file and  playing incoming rtp stream

    I want to Simultaneous Recording in file and  playing incoming rtp stream.I have cloned the data source. After cloning I created two data sinks and two processors.One processor/datasink is meant for recording the stream in a file and other processor/data sink is used to play the rtp through speaker.
    But at a time I am only able to achieve one operation i.e either recording or playing.For recording into the wav file I have to put Thread.sleep(30) so that I can record the rtp into the file.During this time I am not able to play the audio through speaker.I also create separate thread but this does not help.
    Please give suggestion on how to resolve this issue.

    thanks for the reply, but I think I've already solved the problem.

  • File and print sharing resource is online but isn't responding to connection attempts

    hi,
    I'm on windows 8.1 enterprise.  All of a sudden in windows explorter when I try to access drives on my network I get "file and print sharing resource is online but isn't responding to connection attempts"..  This formerly did not have
    any issues.
    I did a restore to a point where I know it did work...but it still does not connect to network drives.
    Please advise,thanks James
    AJ Anning

    Hi,
    I made a search in Cisco support forum and found some thread which had similar problem with yours, the solution of them maybe helpful with your.
    https://supportforums.cisco.com/discussion/11533701/cisco-anyconnect-3008057-certificate-validation-failure
    You can follow the reply of this thread to check Cisco certificate on your system.
    Open Certificate manager: Open Run, Type
    certmgr.msc , Press Enter.
    Roger Lu
    TechNet Community Support

  • Files and environment...

    Dear Java Experts,
    There appears to be no limit to my confusion about some things with Java. The thing is
    that the documentation is so very, very large I simply get lost :-( Here are a few questions
    maybe you can help me with.
    1) Assume I create a JAR that in it has a few resources, like for example a couple of JPG
    images. Is it possible to copy such a resource to the file system and if yes, how is this
    best done?
    2) Talking about files, the File class has some nifty methods. There is a nice method for
    creating directories, another for checking accessrights, another to check latest change, but
    on the subject of copying, how is one supposed to copy one file from a give directory to
    another in Java?
    3) The last question...from what I read, the System class used to have a getenv method
    which now has been depracted. Is it possible from a Java application to read an arbitrary
    environment variable, let's call it FOO at any point? What is the proposed way of doing this?
    I do apologize for my silly questions, but I have tried to read about this and I just drown in
    information. At the end of the day sometimes it's better just to ask.
    Greatful for any help you might be able to provide me with!
    Best regards,
    X.

    Hi X,
    (1) Do mean copying the JAR or the JPG files? If it's the JAR, you can copy that to any directory you wish. If you want to get at the JPG files, you'll have to open the JAR with something like *nix tar or Windows WinZip and extract the .jpg files from the JAR into a directory of your choice. 
    A JAR, after all, is just a ZIP file with a manifest.
    (2) There's no copy method in java.io.File, as you've noticed. You have to do it the hard way: open and read the source file, create the destination file, and write the contents of the source file into the destination.
    Here's a snippet that does it using classes from the java.nio.channels package:
                RandomAccessFile raf    = new RandomAccessFile(source, "rw");
                FileChannel from        = raf.getChannel();
                File duplicate = null;
                // If the destination file is a directory, keep the source name
                // Otherwise, just copy to the given file name
                if (destination.isDirectory())
                    duplicate = new File(destination, source.getName());
                else
                    duplicate = destination;
                FileOutputStream fos    = new FileOutputStream(duplicate);
                FileChannel to          = fos.getChannel();
                // Obtain exclusive lock on file (the meaning of this is platform dependent)
                FileLock fileLock       = from.lock();
                // Transfer the contents
                long bytesTransferred   = from.transferTo(0, from.size(), to);
                // Drop the lock
                fileLock.release();
                // Close the channels and streams
                to.close();
                from.close();(3) Here's how:
    String env = System.getProperty("FOO"); %

  • Q: Re: Q: Acquiring data using two E series devices connected by RTSI and streaming data to disk

    << (My first posting)
    I use two E series PCI Cards, connected by RTSI. I'd like to stream the data
    from both cards to a binary file and to add a header to it.
    I also need to somehow read (plot) the stored data, this with another VI.
    The whole should be then integrated into an existing program, that used just
    one acquisition card.
    Till now I have tried to combine "Two E-series Shared ScanClk.vi" and "High
    Speed Data Logger.vi" into another VI, and I have tried to read the stored
    data with the "High Speed Data Reader.vi". The problem is that I fight with
    one error after another, what prevents me from going further.
    I use LabView 6.1, under Windows 2K.
    Has somebody by chance already done something similar and would agree to
    share with me their experience? TIA for any suggestion.
    Regards,
    Victor Manta
    >>
    "Ben" wrote in message
    news:[email protected]...
    > Hi Victor,
    >
    > I have done a lot of similar work.
    >
    > Exactly what did you try and what specific errors did you encounter?
    >
    > What you are trying is do-able provided the hardware you have suuports
    > it.
    >
    > Please post (both here and to the DAQ group)
    > the details of the hardware you are using,
    > versions of software being used,
    > Examples that you are using,
    > error codes that occured,
    > posibly post example code showing the problem.
    >
    > Ben
    Hi Ben,
    I use two PCI-MIO-16E-1 cards, connected by RTSI. I'd like to stream the
    data from both cards in real time to a binary file, after having added a
    header to it.
    For tests, on the channel 0 of each card is applied the same square wave,
    100 Hz.
    Yes, the hardware support RTSI. I use LabView 6.1.
    Till now I have:
    1. Combined the "Two E-series Shared ScanClk.vi" and the "High
    Speed Data Logger.vi" into a DAQ VI. To do this, I have "doubled" and
    adapted the "High Speed Data Logger.vi". For testing purposes the data are
    stored in two files, always the same ones (the old ones being overwritten
    after each acquisition).
    2. "Doubled" and adapted "High Speed Data Reader.vi" into another VI, for
    reading from both files, mentioned earlier.
    What already works:
    - The headers for both files are correctly stored (VI point 1.)
    - The acquired data from the first card (device 1) are correctly stored (VI
    point 1.)
    - The VI (point 2.) that reads both files and displays the results works
    What doesn't work:
    - The acquired data from the second card aren't stored at all (VI point 1.)
    - An error message says: "Error -10608 occurred at AI Buffer Read. Possible
    reason: NI-DAQ LV: No transfer is in progress for the specified resource."
    I think that I understand this message, but I don't know how to continue.
    The DAQ VI can be downloaded from (please click the link, then the link on
    that page; about 100K, zipped):
    http://www.swissheartnet.unibe.ch/labview.htm
    Thanks a lot in advance.
    Regards,
    Victor Manta
    PS. I don't know which DAQ group you mean.

    "Filipe A." wrote in message
    news:[email protected]...
    > Victor;
    >
    > You can definitely accomplish that task with the DAQ boards you have
    > and Labview.
    >
    > It would be good if you could be more specific as far as what type of
    > errors you are seeing and how you are integrating both VIs.
    >
    > Regards
    > Filipe A.
    > Applications Engineer
    > National Instruments
    Maybe Mr. Filipe A. could help me? Please see below, and TIA.
    Regards,
    Victor Manta
    "Victor Manta" wrote in message
    news:[email protected]...
    > << (My first posting)
    > I use two E series PCI Cards, connected by RTSI. I'd like to stream the
    data
    > from both cards to a binary file and to add a header to it.
    >
    > I also need to somehow read (plot) the stored data, this with another VI.
    >
    > The whole should be then integrated into an existing program, that used
    just
    > one acquisition card.
    >
    > Till now I have tried to combine "Two E-series Shared ScanClk.vi" and
    "High
    > Speed Data Logger.vi" into another VI, and I have tried to read the stored
    > data with the "High Speed Data Reader.vi". The problem is that I fight
    with
    > one error after another, what prevents me from going further.
    >
    > I use LabView 6.1, under Windows 2K.
    >
    > Has somebody by chance already done something similar and would agree to
    > share with me their experience? TIA for any suggestion.
    >
    > Regards,
    > Victor Manta
    > >>
    >
    > "Ben" wrote in message
    > news:[email protected]...
    > > Hi Victor,
    > >
    > > I have done a lot of similar work.
    > >
    > > Exactly what did you try and what specific errors did you encounter?
    > >
    > > What you are trying is do-able provided the hardware you have suuports
    > > it.
    > >
    > > Please post (both here and to the DAQ group)
    > > the details of the hardware you are using,
    > > versions of software being used,
    > > Examples that you are using,
    > > error codes that occured,
    > > posibly post example code showing the problem.
    > >
    > > Ben
    >
    > Hi Ben,
    >
    > I use two PCI-MIO-16E-1 cards, connected by RTSI. I'd like to stream the
    > data from both cards in real time to a binary file, after having added a
    > header to it.
    >
    > For tests, on the channel 0 of each card is applied the same square wave,
    > 100 Hz.
    >
    > Yes, the hardware support RTSI. I use LabView 6.1.
    >
    > Till now I have:
    >
    > 1. Combined the "Two E-series Shared ScanClk.vi" and the "High
    > Speed Data Logger.vi" into a DAQ VI. To do this, I have "doubled" and
    > adapted the "High Speed Data Logger.vi". For testing purposes the data are
    > stored in two files, always the same ones (the old ones being overwritten
    > after each acquisition).
    >
    > 2. "Doubled" and adapted "High Speed Data Reader.vi" into another VI, for
    > reading from both files, mentioned earlier.
    >
    > What already works:
    >
    > - The headers for both files are correctly stored (VI point 1.)
    > - The acquired data from the first card (device 1) are correctly stored
    (VI
    > point 1.)
    > - The VI (point 2.) that reads both files and displays the results works
    >
    > What doesn't work:
    >
    > - The acquired data from the second card aren't stored at all (VI point
    1.)
    > - An error message says: "Error -10608 occurred at AI Buffer Read.
    Possible
    > reason: NI-DAQ LV: No transfer is in progress for the specified resource."
    >
    > I think that I understand this message, but I don't know how to continue.
    >
    > The DAQ VI can be downloaded from (please click the link, then the link on
    > that page; about 100K, zipped):
    >
    > http://www.swissheartnet.unibe.ch/labview.htm
    >
    > Thanks a lot in advance.
    >
    > Regards,
    >
    > Victor Manta
    >
    > PS. I don't know which DAQ group you mean.

Maybe you are looking for