Error when Write/read Cluster in binary file.

hi all,
I implemented a code (using the Labview example) to save and read cluster data (see attached file). The write part works properly but when I want to read the file, there is an error : "Error 4 occurred at Read from Binary File in main_save_data_V2.vi; LabVIEW: End of file encountered'.
BUT the data are correctly open. Why is there such message? any suggestions?
thank you.
Cedric
Attachments:
main_save_data_V2.vi ‏19 KB

Instead of predicting how many clusters to read, just set the count in the binary read to -1.  That will read all that it can and I got no error.  Here is all you need in order to read the file.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Attachments:
Read clusters.png ‏12 KB

Similar Messages

  • Write/read struct in binary file

    Hi to all,
    I created a struct profile defined as follows:
    typedef struct profile {
    char name [30];
    float power;
    double frequency;
    struct profile * next;
    I can write the structures in a file, but I should do so that when you try to insert a struct, you control the field name and only if there is no other struct with that name,it is inserted in the file .
    Please help me !!!
    Solved!
    Go to Solution.

    I tried this way
    #include <ansi_c.h>
    #include <cvirte.h>
    char nuovo[50];
    int cmp;
    FILE *fp;
    struct profilo
    char nome[50];
    float potenza;
    double frequenza;
    }p;
    int main (int argc, char *argv[])
    if (InitCVIRTE (0, argv, 0) == 0)
    return -1; /* out of memory */
    fp = fopen ("c:\\Program Files (x86)\\National Instruments\\CVI81\\ESERCITAZIONI\\scrittura file 2\\profili.txt", "ab+");
     printf("Insert name: \n");
    scanf("%s",nuovo);
    do
    fseek(fp,sizeof(struct profilo),SEEK_SET);
    fread(&p,sizeof(struct profilo),1,fp);
    //printf("nome: %s\n",nuovo);
    //printf("p.nome: %s\n",p.nome);
    p.nome==nuovo;
    printf("p.nome dopo: %s\n",p.nome);
    cmp=strcmp(p.nome,nuovo);
    if(cmp=0)
      printf("Already exists\n");
    fclose(fp);
    else
    p.nome==nuovo;
    scanf("%f%lf",&p.potenza,&p.frequenza);
    }while(!feof(fp));
    fclose(fp);
    return 0;
    but don't work . 

  • Error 2 for write/read access to a file. File = /usr/sap/SID/SYS/global/999

    hi
    when i am checking update statistics in  db13  it is not creating any log information, and more over it is creating error in sm21 like
    Error 2 for write/read access to a file. File = /usr/sap/<SID>/SYS/global/999JOBLG/0001X06000603X23459.
    can any one help me.
    regards
    subhani.

    Duplicate post
    Read and Follow the Forum Rules

  • I get the following error when trying to open a pdf file... '*pdf.part could not be saved, because the source file could not be read"

    I get the following error when trying to open a pdf file... '*pdf.part could not be saved, because the source file could not be read". I am able to open pdf files in IE and other programs.

    I am encountering the same problem -- though with .qfx files from my bank. This worked fine in Firefox 31 ESR, but since upgrading to Firefox 33.0, I get the "<name>.qfx.part could not be saved, because the source file could not be read" when I attempt to download. (I should add that downloading PDF statements from the same site works fine, and that the qfx downloads work fine in IE and Chrome.)
    I tried safe mode, it is still broken. Tried v34 beta, no luck. I reverted to version 31, it works again.
    I guess I will stick with the older version until a solution is found...or just use an alternate browser to download my financial data.

  • I/O Error when writing access Log buffer to file. error number: 28

    Hi,
    Oracle OracleAS Web Cache 10.1.2.3.0, Build 10.1.2.3.0 080201 is writing events like this:
    [alert 13215] I/O Error when writing access Log buffer to file. error number: 28
    I've looked for this alert and i've found this description:
    WXE-13215 I/O Error when writing access Log buffer to file. error number: %d
    Severity: alert
    Cause: I/O error happened when OracleAS Web Cache tried to write to the access log file.
    Action: Check the status of access log file. For example, see if the disk is full
    Anybody knows what "error number: 28" stands for? The logs are sended to other server and it seems that the disk size is ok.
    thanks!

    I tested again...it seems LabVIEW doesn't like the way I wrote the measurement files. I attached a set of VIs (ZIP-file) to give you a clue how it was done. When I try to save and read a file containing just plain DBLs from a 1D-Array (see attached file generating VI) it works perfectly well for large file sizes.
    So there might get something messed up by the way LabVIEW saved the measured data. You'll notice, that I (accidentally) left the "prepend array string size" input of "write to binary file" function unwired which means that the size information will be written as a type of header. Maybe this is the reason that it doesn't work as expected...
    Attachments:
    VibrationMeasurement.zip ‏76 KB
    generate_test_bin_data.vi ‏12 KB

  • Error when installing Reader

    Hello, I get an error when I try to install Adobe reader:
    the instruction at "0x00430887" reference memeory at "0x000000010".  the memory could not be read.  click ok to terminate or cancel to debug.
    I'm running XP professional, sp2.  I origianlly was getting an error when trying to open a pdf file so I uninstalled.  I'm not aware of anything changing that would cause this.

    What version of Adobe Reader are you trying to install?
    Are you using the download manager (online installation), or a downloaded installer, e.g. from http://ardownload.adobe.com/pub/adobe/reader/win/9.x/9.3/enu/AdbeRdr930_en_US.exe

  • I upgraded iTunes to 11.  I now receive an error message which reads - 'The iTunes Library file cannot be saved. An unknown error occurred (-50).  How do I correct this error?

    I upgraded iTunes to 11.  I now receive an error message which reads - 'The iTunes Library file cannot be saved. An unknown error occurred (-50).  How do I correct this error?
    Thanks
    TDB

    I know this doesn't help you Bud, but I've had this issue for at least the last couple of versions.  If I can ask, what is you enviornment like?  Local PC only, libray saved on another PC/Server? 
    In my case my library is on Windows 2003 server with the share mapped to drive M:  This has worked for many years through both XP and Windows 7 until and update a while ago. 
    Thanks,
    Rob

  • Error When Attempting to Create a Password File

    hi all,
    i recevied the following error when attempting to create a password file via the ORAPWD utility. can anyone offer any insight into what is causing this problem?
    $ ./orapwd file=/appl/oracle/product/9.2.0-64bit/dbs/orapwLEAF password=XXXXXX
    Unable to find error file.
    Error code 5
    thanks

    Try to set env variable ORACLE_HOME
    Best Regards
    Krystian Zieja / mob

  • Reading little endian binary files

    Hi,
    Recently I tried to read from a little endian binary files. Here is the code:
    FileInputStream file_input = new FileInputStream (file);
    DataInputStream data_in = new DataInputStream (file_input );
    while (true) {
    try {
    short i_data = data_in.readShort ();
    catch (EOFException eof) {
    System.out.println ("End of File");
    break;
    System.out.println ( i_data );
    But I am getting wrong values (big-endian). I will be pleased if anyone can help me in this respect.

    Hi,
    Finally, I can do it easily with reading little endian binary files in java. Here is the code:
    FileInputStream file_input = new FileInputStream (file);
    DataInputStream data_in = new DataInputStream (file_input );
    while (true) {
    try {
    int low = data_in.readByte() & 0xff;
    int high = data_in.readByte() & 0xff;
    short i_data = (short) (high << 8 | low) ;
    catch (EOFException eof) {
    System.out.println ("End of File");
    break;
    System.out.println ( i_data );
    }

  • How to read non-java binary file?

    Hello Team,
    I have problem to read non-java binary file.
    Let me explain.... I have one binary file created in vc++ having fix structure. Structure of file is like String,int,int,int.
    Now I have to read this file in my java application. I am failed to identify length of String value of Structure in java.
    Can any body help me to solve this problem?
    Thanks in advance.
    - Pathik

    Thanks for guide me,
    I have try using 0x00. And its working.
    Now I have another problem:
    in file.ext , I have written one record having structure string,int and int.
    I have enter data as "HelloWorld", 100 and 111.
    To read first record from file file.ext, following code I am using:
    try
         FileInputStream fis = new FileInputStream("file.ext");
         DataInputStream in = new DataInputStream(fis);
         char ch;
         while((ch=(char)in.readByte()) != 0x00)
              System.out.print(ch+"");
    System.out.println();
         System.out.println("Integer 1 --> " + in.readInt());
         System.out.println("Integer 2 --> " + in.readInt());
         in.close();
         fis.close();
    catch(Exception ex)
         System.out.println(ex.toString());
    And I am getting following output:
    HelloWorld
    Integer 1 --> 0
    Integer 2 --> 0
    File file.ext is created in vc++
    I am not getting integer data. Plz guide me for this problem.
    Thanks in advance
    - Pathik

  • Error when reading back a binary file

    Hello,
    I am writing out a binary file consisting of U32 arrays, packed strings, and clusters. I get error 116 when reading back. As long as I am synchronized on the correct data position why should LV care what I write to the file? In the example I write a simple 16 element array and a time stamp cluster. When reading back the array I get the error. What is the correct way to do mixed structures? Thanks.
    Attachments:
    file write.PNG ‏44 KB

    David,
    You can solve the problem in various ways. The easiest might be to modify the writer VI by wiring a True constant into the "header (F)" input of your first Write File node. That forces LabVIEW to include a four-byte header that specifies the length of the array you are writing.
    When you wire up the reader code the way you did, the length of the array you wire to the "byte stream type " input is irrelevant; by wiring nothing into the "count" input, you are implicitly telling LabVIEW to look for a header to determine the length of the array you are asking it to read. Because you didn't write any header, LabVIEW is interpreting the first four bytes of the array itself as a length. That length doesn't match the actual amount of data present in the datafile, so LabVIEW generates your error.
    An alternative solution would be to leave the writer unchanged and modify the reader VI: wire an I32 constant into "byte stream type" and wire a 16 into "count". The choice depends on what you prefer and whether or not these binary files need to be compatible with some other program or not.
    Another aside: you can dispense with your case that checks whether the datafile already exists. Just change the function input of the Open/Create/Replace to "create or replace" and wire a False constant into its "advisory dialog" input.
    Hope that's clear,
    John

  • Write/Read cluster with ftp and datasocket

    I try to save a cluster to a file on my RT-target from my host machine via ftp and datasocket. I can use the DS examples between host and target but when I connect a cluster to either DS Write or DS Read the VI stops with error 42 (Generic error). The help for DataSocket does not mention any constriction concerning the data type. Is this a bug or a feature?
    I found a workaround by saving the cluster to a local file and transferring this to the RT-target with FTP-VI's but the DataSocket solution would be much simpler.
    LabVIEW 8.6.1
    Attachments:
    clusterDS.jpg ‏24 KB
    Error42.jpg ‏12 KB

    Hi,
    I found the reason for the generic error: the file to write or read has to have a extension "dsd" (or "wav"), otherwise  you'll get the error. With a .dsd extension I was able to save the cluster. I have not yet managed to read it back but at least DS Read does not abort with the generic error. Interesting thing is if you use an other extension than dsd when writing, an empty file is actually created on the target system.
    Attachments:
    DSWriteCluster.vi ‏7 KB
    DSReadCluster.vi ‏10 KB

  • Problem in Writing to/Reading from a Binary file placed in a Loop

    Hi
    As you can see in the attahced image, I attempt to write a set of 2*202 data in each iteration of the loop of the loop, yet when I try to read the data (in the second picture) I only get the first (or last, I assume) set of data, up to index 202. I needed to read two set (X, Y) of 402 valuse. So, I am not sure if I am making a  mistake in wrting to the file or reading from it! 
    I really appreciate it if someone could suggest a solution
    Ashakn
     

    You are only reading the first.  In your read, set your number to read to -1.  That will tell the Read Binary File to read all of the data instead just a single set.

  • Powerpoint 2013 throwing 'File in Use' errors when saving to a network drive, file is NOT in use

    One of our sites is having a strange issue when saving to a network location in Powerpoint.  I'm not sure it's a Powerpoint problem, but it's a place to start...
    When saving a ppt to a mapped network drive (the client is running Windows 8 / Office 2013, the network drive is a DFS share, pointed to a Server 2012 machine if that matters), users will almost always get the following error:
    "Someone else is working in (filepath\name) right now. Please try again later." 
    This happens regardless of where the file is being saved on the network drive, in fact it happens even when there is no pre-existing file with that name in the location.  So, even if I'm saving a brand new copy of test.pptx to F:\Share\PPT where there
    is not currently a test.pptx, I get the error.
    Word, Excel, and all other tested apps save properly.  Powerpoint can save correctly to the local computer, but not to the network drive or to My Documents (which redirects to the same network drive).
    When the error pops up, if I look in Open Files in Computer Management on the Fileserver, I see the file I'm trying to save listed as being open, but it shows 'Disconnected' rather than a username.
    Any suggestions would be appreciated - again, not sure that this is a Powerpoint problem - could be Windows 8 or some mysterious DFS thing...
    Thanks.

    Hello,
    Been having a very similar issue in our environment and just came across this thread while Googling and looking for answers.
    In our case, we have Windows 7 clients and 3 main files servers - 2 are Server 2008 R2, and one is Server 2012.  We use PeerLink File Collaboration to sync the files between
    the servers (similar concept to DFS).  For us, it seems to happen specifically with Excel 2013, and only when saving to the Server 2012 file server.  I can reproduce the message pretty much every time.  After seeing your post,
    I tried it in Powerpoint just out of curiosity, but it saved properly - Word saves properly as well.  
    Been doing a bunch of testing to try and narrow it down, and this is what I've found:  
    Excel 2013 -> Server 2012 = error message.  
    Excel 2013 -> Server 2008 R2 = no error message.  
    Excel 2010 -> Server 2008 AND Server 2012 = no error message.
    <o:p>We've been leaning towards the PeerLink replication as the culprit up to this point, but last night I did some testing with the PeerLink Collaboration turned off, and
    still received the error message.. so now I'm even more confused! 
    I see that it's been a few months since your post..  have you made any progress here?</o:p>

  • "The attempted operation failed. An object could not be found" error when double clicking on an ics file

    Operation System: Windows 8 Pro
    System Type: 64-bit Operating System
    Office: MS Office Professional Plus 2013
    I am getting "The attempted operation failed. An object could not be found" error when I double click on an .ics file to an appointment to my calender. My outlook.com account's data file is set as default and this error only occurs if
    that is the default data file. I thought that maybe my profile is corrupted. So, I opened up a new profile with the below steps and only add my outlook.com account there:
    1-) Open up the Control Panel and go to Mail section
    2-) Click "Show Profiles"
    3-) Click "Add" and give a name to your profile.
    4-) Configure your outlook.com account (with Auto Account setup, not manual steps)
    5-) Finally, set that profile to be used always.
    Then, I opened up the Outlook 2013 and clicked on the .ics file to add that appointment but got the same error.
    Is this a known issue or specific to me?
    Thanks!

    yes, I have the same problem.
    The workaround of saving the ICS file and then importing it into the current calendar
    works, 
    but the ICS calendar
     displays in other section, NOT in the section of my old events.
    why  ??

Maybe you are looking for

  • Missing Connection Types in Report Data Source Properties

    I am running three installations of SharePoint 2013 with SQL 2012 for Business Intelligence, with Kerberos working. I have been having intermittent issues with SQL Reporting Services in a multi-server configuration, but finally had it working in all

  • How to Get the Login Window and/or Bypass Login Items?

    Greetings, folks! This is a silly question, but the old standby of "hold down the shift key" doesn't work in 10.6.1: What key(s) need to be pressed to get the LogIn window and then after LogIn, to bypass LogIn Items? Thanks!! Richard Fairbanks

  • How to modify inputtext in af:query when user change another inputtext

    I have Jdev 11.1.1.3 I'd like to change inputtext B (this contain a Date) when I change inputtext A (this contain a another Date). Those fields are inside af:query. I try to explain better. I have created the af:query and user before executing the qu

  • Is save for web just for posting or for sending, too?

    I need to send files with layers, so I won't use Save for web or I'll lose them, I was thinking of a general save as. I heard that save for web translates your file into the web language, now these files will be worked again, and, eventually, posted,

  • Mouse - Drag and drop not working

    The Drag and drop feature is not working with my mouse. The mouse was tested and is fine. It's a software thing. It works with everything else, but if I try to select something and drag it, it doesn't work. Any advice?