Binary file with header

hi,
i want to read a binary file in Diadem, which i saved it with Labview. But i didnot get it.
Could you please help me?
my header files looks like:
1 bit double,
128 bit U8,
1 bit unsigned word,
1 bit dbl
16 bit U8
64 bit U8
1 bit u32
1 bit i32
and 100 bit Data.(i16)
Thanks.
Attachments:
CH1_07_09_2007_13-31-14.csv ‏1 KB

Hi Hakan,
There were several issues with your VI, and the VI bore very little resemblance to the list of binary header items you included in your first post.  I decided to follow the VI instead of the earlier binary header property list.  In the VI, I changed the data type of your channel name property zero-padding from I32 to U8.  I changed the byte order of your binary header to match the byte order of the bulk data (Big Endian).  I also changed the file creation function to "create or replace" so that I culd run the VI multiple times and overwrite the same data file.  The DBL that you are writing from the LabVIEW date/time wire is a geography-specific number of seconds since January 1st 1904 (in Greenwich England).  I added a routine to the DataPlugin to decode this into a DIAdem geography-independent date/time property based on my current location in the Central time zone.  You could instead save a geography-independent DBL in the VI, which would probably be a more robust approach.
I assigned all the header properties to the Channel level, though you probably want to copy them to the Group and/or the File level as well.  I suspect that the 3 DBL properties have something to do with the I16 channel vertical scaling or else the time scaling (aquisition rate).  We could add that to the DataPlugin as well.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
Attachments:
Hakan_S.zip ‏19 KB

Similar Messages

  • I have written a binary file with a specific header format in LABVIEW 8.6 and tried to Read the same Data File, Using LABVIEW 7.1.Here i Found some difficulty.Is there any way to Read the Data File(of LABVIEW 8.6), Using LABVIEW 7.1?

    I have written a binary file with a specific header format in LABVIEW 8.6 and tried  to Read the same Data File, Using LABVIEW 7.1.Here i Found some difficulty.Is there any way to Read the Data File(of LABVIEW 8.6), Using LABVIEW 7.1?

    I can think of two possible stumbling blocks:
    What are your 8.6 options for "byte order" and "prepend array or string size"?
    Overall, many file IO functions have changed with LabVIEW 8.0, so there might not be an exact 1:1 code conversion. You might need to make some modifications. For example, in 7.1, you should use "write file", the "binary file VIs" are special purpose (I16 or SGL). What is your data type?
    LabVIEW Champion . Do more with less code and in less time .

  • How do I import binary data files (with header info) into DIAdem?

    We have lots of data acquired by nCode datagate. Files are binary data with header info. How do I import this into DIAdem? Typical (short) file attached. Also of interest, can I stream data from Sony PC208/SIR1000 recorders?
    Attachments:
    Propshft.dac ‏4 KB

    I have successfully imported your file into DIAdem using the nCode file filter included with DIAdem. You might have to make that file filter known to DIAdem by following these steps (this assumes you have version 8 of DIAdem):
    1. Go to the 'Window' menu in DIAdem and select 'Close all'
    2. Go to the 'Settings' menu and select 'GPI-DLL Registration'
    3. Click the 'Add' button in the window and select the 'GfSnCode' DLL in the 'DIAdem/AddInfo' directory
    4. The program will prompt you to restart.
    5. After you have restarted DIAdem, go to the DATA icon, select 'File - Open' from the DATA menu and in the dialog that appears, choose 'nSoft Data File Format' in the 'Files of type:' field.
    6. Select your data file and load
    That's it.
    With regards to your Sony reco
    rder data, I would need to get my hands on an actual data file to try it out. In general, DIAdem can import ANY binary file format by creating a header in the 'File - Import via header' section in DATA. If you have lots of data files from the SONY recorder, a DLL can be created for that specific file format with the free DLL toolkit included with DIAdem.
    Leave me a message here if you have any additional questions.
    Otmar
    Otmar D. Foehner
    Business Development Manager
    DIAdem and Test Data Management
    National Instruments
    Austin, TX - USA
    "For an optimist the glass is half full, for a pessimist it's half empty, and for an engineer is twice bigger than necessary."

  • Create File with header

    Hi all,
    We have requirement to send data to FTP server,
    am able to send data to FTP server, but the problem is am not able to send file with Header,
    Eg:
    oreder numer    netvalue   discount   Grossamount
    90000909          2323.34    343.33      4545.000
    90000909          2323.34    343.33      4545.000
    90000909          2323.34    343.33      4545.000
    i have to send the file in the above format.
    plz guide me hoe to create file with above format?
    REgards,
    DS kumar

    Hi,
    Use the following code to create header.
        DEFINE add_field_header.
          clear &1.
          &1-field = &2.
          append &1.
        END-OF-DEFINITION.
        add_field_header heading 'oreder numer'.
        add_field_header heading 'netvalue'.
        add_field_header heading 'discount'.
        add_field_header heading 'Grossamount'.
    In GUI_DOWNLOAD pass heading to Fieldnames parameter.
    Regards,
    Ni3

  • Generate target/out file with header record as Record Count ?

    Hi Kareem, Please try the below approach. Pipeline 1: Load actual data(without header with record count) from source to target. Let say your file name is intermediate1.dat Pipeline 2: Take the target from pipeline 1 as source and create the header with count of source file using an aggregator. The filename of target for pipeline 2 will be your final file(header and detail data). Pipeline 3: Take the target of pipeline 1 again and do 1-to-1 load to the target file of second pipeline. In session properties, dont forget to tick the check box append if exists for the third pipeline target. There may be other simple approaches also. If you have no time in hand try the above approach. Let me know if you find any issues. Thanks,Deeshan.

    Generate target/out file with header record as Record Count ? Out file:---------------------------Record Count :2000  Coulmn1, Column2...Data, data........

  • How to upload a binary file with Firefox 7

    Don't know if this is the right forum to ask this - if not, please point me in the right direction.
    I am an embedded developer using Firefox as the user interface to an embedded web server. In the past I've been using file.getAsBinary() to read the local file which is then uploaded with an XMLHttpRequest. Firefox 7 removed the getAsBinary method. Looking through the documentation I came across FileReader and have been trying to use that but with no luck. When I use the readAsBinaryString method, the binary has many bytes which are in error. I have also tried the readAsDataURL but this gives me base64 encoding. Attempts to decode it so far have been unsuccessful. What's the best way to get a local file and upload it to a remote server?
    Thanks,
    Dave

    Well, actually, i have no perfect solution.
    I just used a temporary internal table in which all fields are characters. Then, I used FM GUI_UPLOAD to upload text file including header into this table as usual.
    You can see that it was done successfully. Next, use a loop to transfer this temporary table to the main table. SAP will automatically convert data into values that are compatible with data type in the main table, so don't worry about different types :D.
    In order to make this work more simple, field names of temporary table should be named exactly as same as those in the main one. So, u just use:
    loop at itab_tmp.
      move-corresponding itab_tmp to itab_main.
      append itab_main.
      clear itab_main.
    endloop.
    note: both tables have their own header line, so don't need use a working area here.
    Anyone has any better solution?

  • Issue in reading a binary file, with 'Flatten to String' data.

    I'm facing issue while reading a binary file (created using LabVIEW).
    I've mentioned everything (issue and method to reproduce it) within the attached VI.
    Same vi is attached in 2012 and 8.0 versions.
    Regards
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.
    Solved!
    Go to Solution.
    Attachments:
    Issue in VI.vi ‏26 KB
    Issue in VI (Version 8.0).vi ‏43 KB

    moderator1983 wrote:
    crossrulz wrote:
    The reading of a string from a binary file stops at a NULL character (0x00).  When the first character is 0x00, you are just reading the one character.  I would suggest writing to a byte array since you are doing the inverting.  And then you can read as a byte array.
    crossrulz:
    U rocks..!!
    you have hit bull's eye...!!
    After playing around a little more, I think I might have misinformed you a little.  If you explicitly tell it a string, it looks for the string length at the very beginning and reads that length of bytes as a string.  It appears that if you implicitly tell it to read a string (not wire the data type) it reads all of the bytes directly, including the length of string you wrote.
    Regardless, my advice is the same.  You should just write and read using byte array.  It is less conversions if you are performing your "encryption".
    EDIT:  Here's a snippet of the VI I was playing with to figure this out.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    String Binary File.png ‏12 KB

  • How to handle text files with Header lines

    Hi,
    Eventhough the number of header lines is specified, when I do Reverse to get columns, its considering only header line.
    I have file format like
    ffserver started.
    192.168.11.30 - - [Fri Apr 20 19:28:01 2007] "GET /robots.txt HTTP/1.1" 404 150
    192.168.11.30 - - [Fri Apr 20 19:28:02 2007] "GET /V23WASTINGPETROL HTTP/1.1" 200 310
    first line is header line and there are spaces within a field value, and the field separator also is space.
    regards,
    Vivek

    in this scenario of urs ,ur file has multiple delimiters like -- and spaces.
    in this case u need to convert the file in a file with single delimiter .
    this can be done by writing a code in java in ODI procedures.
    once you have the same delimiter all over the file.
    u can extract multiple headers using typical Procedure

  • Can't decrypt binary file with PBE

    Hi,
    I'm writing an simple file transfer application using UDP that encrypts the data
    before sending it with PBEWithMD5AndDES. Text files are encrypted and
    decrypted fine, but binary files such as a JPG/EXE/DOC... are messed up
    and an application can't open them on the other side. Has anyone experienced
    such a problem?
    Thanks

    Below are my encrypt and decrypt functions.
    Thanks in advance.
            public  byte[] encrypt(byte[] data)
                 PBEKeySpec pbeKeySpec;
                 PBEParameterSpec pbeParamSpec;
                 SecretKeyFactory keyFac;
                 ByteArrayOutputStream b=null;
                 DataOutputStream d =null;
                 //      Salt
                 byte[] salt = {
                           (byte)0xc7, (byte)0x73, (byte)0x21, (byte)0x8c,
                        (byte)0x7e, (byte)0xc8, (byte)0xee, (byte)0x99
                 //      Iteration count
                 int count = 1000;
                 // Create PBE parameter set
                 pbeParamSpec = new PBEParameterSpec(salt, count);
                 try{
                      pbeKeySpec = new PBEKeySpec(sessionPassword.toCharArray());
                      keyFac = SecretKeyFactory.getInstance("PBEWithMD5AndDES","SunJCE");
                      SecretKey pbeKey = keyFac.generateSecret(pbeKeySpec);
                      // Create PBE Cipher
                      Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES","SunJCE");
                      // Initialize PBE Cipher with key and parameters
                      pbeCipher.init(Cipher.ENCRYPT_MODE, pbeKey, pbeParamSpec);
                      b = new ByteArrayOutputStream();
                      d = new DataOutputStream(b);
                      // create CipherOutputStream
                      CipherOutputStream out = new CipherOutputStream( b, pbeCipher );
                      // write contents to file and close
                      try {
                           for ( int i = 0; i < data.length; i++ )
                                out.write(data);
                             out.flush();
                        out.close();
                   // handle IOException
                   catch ( IOException exception ) {
                        exception.printStackTrace();
              catch(Exception e){}
              return(b.toByteArray());
         public byte[] decrypt(byte[] data)
              PBEKeySpec pbeKeySpec;
              PBEParameterSpec pbeParamSpec;
              SecretKeyFactory keyFac;
              byte[] decryptedData=null;
              //      Salt
              byte[] salt = {
                        (byte)0xc7, (byte)0x73, (byte)0x21, (byte)0x8c,
                        (byte)0x7e, (byte)0xc8, (byte)0xee, (byte)0x99
              //      Iteration count
              int count = 1000;
              // Create PBE parameter set
              pbeParamSpec = new PBEParameterSpec(salt, count);
              try{
                   pbeKeySpec = new PBEKeySpec(sessionPassword.toCharArray());
                   keyFac = SecretKeyFactory.getInstance("PBEWithMD5AndDES","SunJCE");
                   SecretKey pbeKey = keyFac.generateSecret(pbeKeySpec);
                   // Create PBE Cipher
                   Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES","SunJCE");
                   // Initialize PBE Cipher with key and parameters
                   pbeCipher.init(Cipher.DECRYPT_MODE, pbeKey, pbeParamSpec);
                   Vector fileBytes = new Vector();
                   ByteArrayInputStream b = new ByteArrayInputStream(data);
                   CipherInputStream in = new CipherInputStream( b, pbeCipher );
                   byte contents = ( byte ) in.read();
                   while ( contents != -1 )
                        fileBytes.add( new Byte( contents ) );
                        contents = ( byte ) in.read();
                   in.close();
                   decryptedData = new byte[ fileBytes.size() ];
                   for ( int i = 0; i < fileBytes.size(); i++ )
                        decryptedData[ i ] = (( Byte )fileBytes.elementAt( i )).byteValue();
              catch(Exception e){Gui.chatArea.append("exception:"+e+"\n");}
              return(decryptedData);

  • Binary file with File adapter

    Hi gurus,
    I am getting binary file as base64binary (not a text/xml file) in a request XML tag. I need to write this file to a file directory with the file adapter after retrieving it from the request message by a message/java mapping and use another field in XML as the file name.
    I followed the blog `how to send binary data through PI` but in that case, the request message is also the same. Mine requires a mapping to be executed and in this case I cannot use dummy names for message types/interfaces as Enterprise Repository development is required.
    How can I achieve this?
    Thanks
    Gokhan

    Just solved the problem actually
    As I was trying to write a binary file directly with the receiver file adapter, I wasn't sure how to define a data type / message type for it. I developed a java mapping that decodes the base64 to binary data and writes it to the output stream, and used a dummy message type / data type for the service interface as the target in Operation Mapping
    And it worked!
    Regards,
    Gökhan

  • How to get rid of a binary file with firefox that pop up allthe time?

    each time that i open moxilla firefox a box asking if I want to save or cancel the binary file. I have tried to ignore ti however it has become a bother. How do I stop the box from popping up ?

    Hi
    if you mean http://db.tidbits.com/ - I didn't get any popups in a few minutes of browsing there, this without any blocking software. If you're seeing the very same ad popup window from differing sites, then it'd sure be worth looking at whether or not your mac or router or isp is using some rogue dns server.
    DNS - Domain Name System
    it translates domain names meaningful to humans into the numerical (binary) identifiers associated with networking equipment for the purpose of locating and addressing these devices worldwide. An often-used analogy to explain the Domain Name System is that it serves as the "phone book" for the Internet by translating human-friendly computer hostnames into IP addresses. For example, www.example.com translates to 192.0.32.10.
    to borrow from wiki.
    DNS servers can be chosen in your router or in your mac at System Preferences-Network-Advanced-DNS tab, If no special dns servers are selected, your router will usually accept the isp's suggestion, so you'll be using theirs, for better or for worse.
    The most common place for any 'rogue' dns to be set, is in System Preferences-Network-Advanced-DNS tab... look there on your mac, and see if any numbers are visible. Copy them & paste here, then we'll know what's going on.

  • File with header

    hi,
    i have to upload file which has header in the first line.
    and from second line the actual data will be there which is to be uploaded.
    now the problem is hove to move this file data to internal table with header,
    can any one has code plz send me.

    hi,
    try this Fm...
    DATA l_count TYPE sy-tabix.
       CONSTANTS: lc_begin_col TYPE i VALUE '1',
                  lc_begin_row TYPE i VALUE '2',
                  lc_end_col   TYPE i VALUE '2',
                  lc_end_row   TYPE i VALUE '3000'.
    * Begin of CALK912848 - Carlos Werberich - 16Sep08
      CLEAR p_i_excel_data. REFRESH p_i_excel_data.
    * End   of CALK912848 - Carlos Werberich - 16Sep08
    * Function module to read excel file and convert it into internal table
       CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
         EXPORTING
           filename                = p_p_file
           i_begin_col             = lc_begin_col
           i_begin_row             = lc_begin_row
           i_end_col               = lc_end_col
           i_end_row               = lc_end_row
         TABLES
           intern                  = i_data
         EXCEPTIONS
           inconsistent_parameters = 1
           upload_ole              = 2
           OTHERS                  = 3.
    * Error in file upload
       IF sy-subrc NE 0 .
         MESSAGE text-006 TYPE 'E'.
         EXIT.
       ENDIF.
       IF i_data[] IS INITIAL .
         MESSAGE text-007 TYPE 'E'.
         EXIT.
       ELSE.
         SORT i_data BY row col .
    * Loop to fill data in Internal Table
         LOOP AT i_data .
           MOVE i_data-col TO l_count .
           ASSIGN COMPONENT l_count OF STRUCTURE p_i_excel_data TO  .
           AT END OF row .
    * Append data into internal table
             APPEND p_i_excel_data.
             CLEAR p_i_excel_data.
           ENDAT .
         ENDLOOP .
       ENDIF 

  • When I try to download the newest version of Firefox, it pops up with a box saying do you want to save this binary file with something like daimaijin.mirror in the address. Is this a safe thing to do or is it spyware or something?

    If I cancel it and try it again, the same binary file box pops up with a different address.

    Mozilla has download mirror websites around the globe and uses them to "balance" the downloads of Firefox so users don't need to "wait in line" for their download.
    Here's a listing of those mirrors. <br />
    http://www.mozilla.org/community/mirrors.html

  • Upload binary files with Developer Forms

    Hi all,
    I'm newbie with Forms and I don't know if this question is already answered.
    I'm deploying an application involved with blob columns (binary files: pdf, doc, gif, etc) I want to let users to choose files from his PCs (typical "Browse files" button) but I don´t know if this is possible and if yes, how to implement it.
    Anybody can help me?
    My email is [email protected]
    Thanks in advance!
    Cristina

    If you want to upload direct into the database from the client then No you will need a 9i database or above.
    If you want to upload a file from the browser client to the middle tier (Application server) then that will be OK no matter what DB version you are using. Bug of course you'll then need to do the last bit yourself if you want the document / image put into the database.

  • Opening a binary file with the right extension

    Hi everyone,
    I developed a real simple VI that enables me to read the first five bytes of a binary file to get its signature (ASCII) and verify if its signature matches with the expected extensions. If yes, another VI is called, and if not a 2 button message error is displayed : if the User chooses OK, then a new dialog box opens up to pick another file ; and if the user chooses Cancel, the same dialog box opens up rather than escaping the VI.
    It is due to the while loop (VI below) but i don't see how I can handle this without it. Till the user hasn't chosen the right extension, it can't escape which is a problem! The true case consists in calling another VI, and the first step of the stacked sequence consists in displaying a two button error message.
    If you have any ideas, I'm a bit new! Thanks !!
    Solved!
    Go to Solution.

    Thanks for your replies!
    I have tried your solution CoqRouge, filtering the extensions. But it seems that you can choose between different filters when the dialog box opens up, and then choose any kind of extensions.
    @RavensFan : I cannot load the VIs attached in this thread because I am using an older version of Labview
    @MikeS81 : Which negative ouput?
    Attachments:
    ptw_show_do_while.vi ‏20 KB

Maybe you are looking for

  • Error when saving shipment cost document

    Hi, I am facing below error No purchase order item was generated for shipment cost item 0000001003 000001 Message no. VY633 Diagnosis You have marked the shipment cost item for transmission to the finanacial accounting department. For this transactio

  • Triggering of IDoc OILORD01 (Sale Order)

    Dear All How can we trigger the idoc OILORD01 and is it possible to trigger this idoc at the time of shipment instead of order creation. I also want to fill Z-TABLES with the data filled by Idocs Thanks

  • Problem using downloaded fonts in photoshop elements10

    I downloaded some fonts and was using them in photoshop elements 10 and shut down the program and restarted. When I opened the document that I was working on it said that those fonts where not available (not sure of the exact wording). Ever since the

  • Downloading movie from i-tunes

    The i-tunes store has a video of the Beatles concert at the Washington colosium.How can I down load a copy.There isn't a column for purchasing,you can watch the whole video (about 40min.)I would like to have a copy of it

  • How do I get my iphone 4S ready for traveling abroad (from Canada to Mexico)?

    I want to use free wifi at the hotel and that's it. Do I turn off data roaming and 3G and then put into airplane mode? Then connect to wifi when it is available? I do not want to incur any extra costs!  Thanks!