Write string (7 chars), int16, sgl into binary file and read it in C

How to write write string (7 chars), int16, sgl, string (5 chars) into binary file and then read it in C ?
Total 18 Bytes file (binary) should be created.

Hi,
this could be done that way:
You have to make sure the strings have their correct length!
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome

Similar Messages

  • Can I write the UID of a textframe into indd file ,and restore the uid when I open the indd file again

    I create a UID list for textframe, and I add Some extra properties the textframe,  now I want store these properties into  INDD file , and expecte to restore these properties from INDD file again when
    I  open the it again . anyone could tell me how to do this ,thanks in advance.

    Why don't you save the properties on the textframes itself by adding a of a persistent interface on the textframes. This way you will be able modify/restore(based on the persisted values) textframes each time the document is opened. Refer to BasicPersistence sample plugin to get an idea on how persistence works in InDesign. Also regarding restoring the UID, i don't quite get the need for it. Every object(well most of them) in InDesign has a unique ID which is called UID, this is allocated automatically and remains the same between document open sessions. I can't see any circumstance where we have a need to apply a particular UID to a particular object.
    Hope this info helps
    Thanks,
    Manan

  • How to write the output of a mapping into a file (OWB10.2

    Hi
    I am using Oracle 10.2.0.1 version of OWB.
    the task is to write the output of a mapping into a File (Flat File).
    Please help me out!
    Regards
    Abi

    Hi,
    Create the file format thru OWB and mention the location in OWB. Deploy the file and it will be ready to use for target load. Make sure the connection to the target loc is available.
    Regards
    Bharadwaj Hari

  • How to get all paragraphs style and their fonts of a  indesign file and write all info with para info into txt file with scripting

    how to get all how to get all paragraphs style and their fonts of a  indesign file and write all info with para info into txt file with scriptingstyle and their fonts of a  indesign file and write all info with para info into txt file with scripting

    I write the script this one works
              var par=doc.stories.everyItem().paragraphs.everyItem().getElements();
      for(var i=par.length-1;i>=0;i--)
           var font=par[i].appliedParagraphStyle.name;
            var font1=par[i].appliedFont.name;
             var size=par[i].pointSize;
            WriteToFile (par[i].contents  +   "\r" +  "Style  : " + font  + "\r" +  "FONT1  : " + font1  + "\r" +  "Size  : " + size  + "\r", reportFilePath);
                            function WriteToFile(text, reportFilePath) { 
        file = new File(reportFilePath); 
        file.encoding = "UTF-8"; 
        if (file.exists) { 
            file.open("e"); 
            file.seek(0, 2); 
        else { 
            file.open("w"); 
          file.writeln(text);  
        file.close(); 
    Thanks for all your support

  • "Read from Binary File" and efficiency

    For the first time I have tried using Read from Binary File on sizable data files, and I'm seeing some real performance problems. To prevent possible data loss, I write data as I receive them from DAQ, 10 times per second. What I write is a 2-D array of double, 1000 data points x 2-4 channels. When reading in the file, I wish I could read it as a 3-D array, all at once. That doesn't seem supported, so I repeatedly do reads of 2-D array, and use a shift register with Build Array to assemble the 3-D array that I really need. But it's incredibly slow! It seems that I can only read a few hundred of these 2-D items per second.
    It also occurred to me that the Build Array being used in a shift register to keep adding on to the array, could be a quadratic-time operation depending on how it is implemented. Continually and repeatedly allocating bigger and bigger chunks of memory, and copying the growing array at every step.
    So I'm looking for suggestions on how to efficiently store, efficiently read, and efficiently reassemble my data into the 3-D array that I need. Perhaps I could simplify life if I had  "write raw data" and "read raw data" operations that write and read only the numbers and no metadata.then I could write the file and read it back in any size chunks I please -- and read it with other programs besides. But I don't see them in the menus.
    Suggestions?
    Ken
    Solved!
    Go to Solution.

    I quote the detailed help from Read from Binary File:
    data type sets the type of data the function uses to read from
    the binary file. The function interprets the data starting at the current file
    position to be count instances of data type.
    If the type is an array, string, or cluster containing an array or string, the
    function assumes that each instance of that data type contains size information.
    If an instance does not include size information, the function misinterprets the
    data. If LabVIEW determines that the data does not match the type, it sets data
    to the default for the specified type and returns an error.
    So I see how I could write data without any array metadata by turning off "prepend array or string size information", but I don't see any way to read it back in such bare form. If I did, I'd have to tell it how long an array to read, and I don't see where to do that. If I could overcome this, I could indeed read in much larger chunks.
    I'll try the auto-indexing tunnel anyway. I didn't tell you the whole truth, the 3-D array is actually further sliced up based on metadata that I carry, and ends up as a 4-D array of "runs". But I can do that after the fact instead of trying to do it with shift registers as I'm reading.
    Thanks,
    Ken

  • Converting html file into zip file and send email attaching zip file

    Hi Experts,
    I am trying to send email with attachment(html). Which contains more than 7MB. So, It is throwing an error like Size exceeded.
    So, Now i need to compress the data for less than 7MB.
    I decided to convert HTML File into ZIP File.
    Kindly suggest me to convert the HTML file into ZIP file and sending email with attached ZIP file.
    Correct answer rewarded,
    Thanks & Regards,
    N. HARISH KUMAR

    Hi Experts,
    *// HTML_TAB converting into ZIP File
       DATA  : zip_tool TYPE REF TO cl_abap_zip,
               filename TYPE string ,
               filename_zip TYPE string .
       DATA  : t_data_tab TYPE TABLE OF x255,
               bin_size TYPE i,
               buffer_x TYPE xstring,
               buffer_zip TYPE xstring.
    filename = text-007.                                                                          "'HTML_TAB
    *describe the attachment
       DESCRIBE TABLE html_tab LINES tab_lines.
       bin_size = tab_lines * 255.
       CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
         EXPORTING
           input_length = bin_size
         IMPORTING
           buffer       = buffer_x
         TABLES
           binary_tab   = html_tab.
       IF sy-subrc <> 0.
    *     message id sy-msgid type sy-msgty number sy-msgno
    *     with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ENDIF.
    *create zip tool
       CREATE OBJECT zip_tool.
    *add binary file
       CALL METHOD zip_tool->add
         EXPORTING
           name    = 'FSSAI_MAIL.HTML'
           content = buffer_x.
    *get binary ZIP file
       CALL METHOD zip_tool->save
         RECEIVING
           zip = buffer_zip.
       CLEAR: t_data_tab[],bin_size.
       CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
         EXPORTING
           buffer        = buffer_zip
         IMPORTING
           output_length = bin_size
         TABLES
           binary_tab    = html_tab.
    Thanks & Regards,
    N. HARISH KUMAR

  • How do you open multiple binary files and plot them all on the same graph?

    I have three different binary files and I want to plot all 3 of them onto a graph.
    I am familiar with opening and reading a single binary file. (Thanks to the help examples!) 
    But to do multiple numbers at the same time?  I was thinking of putting 3 different 'reading from binary file' blocks with the rest of the 'prompts', 'data type', etc.. and then connecting them on the same wire.
    However, I got into a mess already when I tried to read one .bin file to dynamic data type --> spectral measurements --> graph waveform.  The error was Not enough memory to complete this operation...  Why is that?  That didnt happen in the help example "Read Binary File.vi"...  Has it got something to do with the dynamic data type?
    Thank you for your time.
    Jud~

    Have a look at the image below and attached VI.  Simply enter the different paths into the PathArray control.
    R
    Message Edited by JoeLabView on 07-30-2008 09:59 PM
    Attachments:
    multipleBinary2Graph.vi ‏18 KB
    multipleBinary.PNG ‏5 KB

  • Even I cant believe this is happening again! i'm once again asking for help with my account.  Since im very sick I ask that u look into my account and read the hell verizon has put me through and assist ending the hell once and for all even if that means

    Even I cant believe this is happening again! i'm once again asking for help with my account.  Since im very sick I ask that u look into my account and read the hell verizon has put me through and assist ending the hell once and for all even if that means ending my contract, i just want the hell over. I went into my bill tonight and the mess was still there I paid $110. that's what I owe

    I guess I spoke too soon!  I really can't believe this nightmare is not over yet! My account is still wrong.  The credit that I was due totaled $63.00  I am looking at a message on my phone saying that $21.01 was credited which makes my balance $219.72.  I received a text the following day that says, I processed your credit of $30.00 and your new balance $216.73 how is that possible?  None of the late fees were credited and the amount due for my monthly charges are wrong.  Before any changes were made to my data plan back in Nov. My monthly charges were $140.00, I needed my hot spot back and i was told that the hot spot will increase my bill $10 for each phone that totals $20.  The customer rep that change my data plan at that time also gave me a credit of $20 to compensate for the increase until I had time to talk with customer service about the mix-up with my Hot spot. I originally had the hot spot, but the rep that change my plan almost a year prior told me nothing was changing except I was getting more for less money.  I explained to that rep that I need my hot spot 4 times a year...and I don't want my plan to have any changes. To verify what I'm telling u check my account and see that I called from Albany New York wanting to know where my hot spot was and I was told I didn't have the hot spot on my account since the last data change!  I lost money once again due to the verizon rep's.  so my current data plan the rep promised would increase $20 which makes my monthly charges that were $140 prior to the change $160 after the hot spot was returned to my account.  Then I was given a $12 credit per month for 12 months because of so many mistakes made to my account so with that $12 credit my monthly charges should $148 + surcharges + taxes and that's not what I see. I do know this much right now my account is in such a shambles I can hardly see the light at the end if there is an end!  I need real help!
    >> Personal information removed by Verizon Moderator to comply with the Verizon Wireless Terms of Service <<

  • How can I download an audiobook so it goes into audiobook file and not music

    how can I download an audiobook so it goes into audiobook file and not into music ? thanks

    Select all tracks that you want to listen to as Audiobook. Right click. Get Info. Click yes. Options tab. Media Kind change to audio book. OK  Done.
    T

  • Multiple writes of a DBL 2D array to binary file

    Hello.
    Does anyone have an example of writing a 2D array to a binary file multiple times?
    Specifically, I need to write a 2D array of DBL to a binary file mulitple times and then (later) be able to read it back (reconvert to DBL). All of the examples that I've found only do one write and then close the file. I need to leave the file reference open and write data to it over the period of a few days. The data comes out of a queue that is fed from a DAQ loop. (In an acquistion loop I feed a queue and in a slower loop I dequeue the data and write it to disk)
    I believe it has something to do with the pos mode and offset mode but I can't figure it.
    I haven't been able to successfully read the data back yet from the .bin file so I'm not sure if I'm even writing it correctly.
    The closest example that I've found is the High Speed Data Logger and High Speed Data Reader but I haven't had any luck with those.
    Thanks in advance.
    Steve
    LabVIEW 7.1
    Solved!
    Go to Solution.

    To change the representation of a number, use the Numeric > Conversion sub-palette.
    The example below shows that the wires contain the representation info independently of the destination indicators : you can connect different types of numerics to the same wire and LabVIEW will automatically adapt to the type (the coercion dots indicate that a convertion has been done). Everything you should want to know about converting numbers is explained in the LabVIEW Help : "Conversion VIs and Functions"
    Message Edited by chilly charly on 07-30-2005 10:57 AM
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Convert to single.png ‏27 KB

  • Write structure to binary file and append

    I have a very simple problem that I cannot seem to figure out, which I guess doesn't make it so simple, for me at least.  I've made a little example .vi which basically breaks down what I want to to.  I have a structure, in this instance 34 bytes of various data types.  I would like to iteratively write this structure to a binary file as the data in the ACTUAL structure in my .vi will be changing through time.  I'm having trouble getting the data to be appended to the binary file rather than overwriting it since the file size is always 34 bytes regardless of how many times I run the .vi or run the for loop.
    I'm not an expert, but it seems if I write a 34 byte structure to a file 10 times, the final product should be a binary file of 340 bytes (assuming I haven't padded or prepended with size).
    One really strange thing is that I keep getting error #1544 when I wire the refnum out wire to the file dialog input on the write function, but it works fine when I wire the file path directly to the write function.
    Can someone please swoop in and save me from this remedial task?
    Thanks for all the help. NI Forum rules!
    Solved!
    Go to Solution.
    Attachments:
    struct_to_bin.vi ‏13 KB

    Did you consider reading the text of the error message? Don't set the "disable buffering" input to true - just leave that input unwired. Why do you want to disable buffering?
    As a general practice, the file refnum should be stored in a shift register around the for loop instead of using loop tunnels, that way if you have zero iterations you will still get the file refnum passed through correctly. Also, there is no need for Set File Position inside the loop, since the file location is always the end of the last write unless it's specifically moved to another location. You might want it once outside the loop after you open the file, if you're appending to an existing file.

  • How to write a Data Plugin to access a binary file

    hi
    Im a newbee to DIAdem, i want to develop a data plugin to access a binary file with any number of channels.For example if there around 70 channels, the raw data would in x number of files which will contain may be around 20 channels in each file . Raw file consist of header(one per file), channel sub header(one per channel),Calibration Data Segment(unprocessed datas) and Test data segments(processed data)....
    Each of these contains many different fields under them and their size varies ....
    Could suggest me some procedure to carry out this task taking into consideration of any number of channels and any number of fields under them....
    Expecting your response....
    Jhon

    Jhon,
    I am working on a collection of useful examples and hints for DataPlugin development. This document and the DataPlugin examples are still in a early draft phase. Still I thought it could be helpful for you to look at it.
    I have added an example file format which is similar to what you described. It's referred to as Example_1. Let me know whether this is helpful ...
    Andreas
    Attachments:
    Example_1.zip ‏153 KB

  • Using a two separate 6534 cards I'm trying to code-up a simple test for my UUT (memory device). I need to write a pattern into the device and read back the pattern and verify it matches the value written.

    I need the simplest method of using two 6534 cards for a memory (UUT) test. I want to write (byte-wide) a pattern (A5,5A) into the UUT, then read it back and verify it matches the value written. Things that change are: Address inputs (increment by 1 for each read/write) with the control signals (card 1) and data values written/read (card 2). If I detect a mis-match, the test stops, I read the location one more time and verify it's really incorrect, the correct value is written back into the same location just read, a counter is incremented to keep track of the tota
    l errors detected and the test (memory read/verify) is resumed. Each time through the memory another counter is incremented to track the number of passes through the memory read test. The test should terminate when the operator hits the VI panel STOP TEST button.

    Dave
    Check out chapter two of the 653x User Manual for information on the different modes of operation. There it explains the difference between strobed and unstrobed I/O as well as Pattern I/O and Handshaking. It sounds as though unstrobed should work unless your UUT requires hardware timing or handshaking. You will have to keep track of errors in software however since the 6534 does not have any counters on it.
    Brian

  • Can a binary file be read incrementally?

    I have a situation where I would like to do repeated incremental reads (i.e., N bytes at a time) from a binary file. My understanding of the Read Binary File VI is that you open the file, read N bytes from the file, and close the file - i.e., do a SINGLE read. I don't want to read the WHOLE file into memory at one gulp; I want to keep repeating the N-byte read operation in an indefinite loop, until I say to stop. On each read I will be updating a graph with the last data read.
    (OK, some more detail: I am monitoring 32 digital lines using some external equipment that writes the file. Each time one of the digital lines changes value, 10 bytes are written: a 48-bit timestamp and 32 bits for the current digital values. The file is a continuous little-endian raw concatenation of these 10-byte records, with no header or record markers. In LV 8.21 (under WinXP) I want to generate a scrollable display of the 32 digital traces, by reading a block of data as needed whenever I want to advance the display.)
    What is the suggested way to handle this kind of binary reading? (I am willing to write C code if necessary.) Any useful responses will be appreciated.
    dhfx

    This may be lower level than you were looking for.  As already mentioned, the big problem may be having two applications accessing the file simultaneously.
    Jim
    Jim
    LV 2013
    Attachments:
    ReadBinary.png ‏4 KB

  • Converted WSDL into .java-files - and now?

    I should implement a client for an existing web service. All I have is a .wsdl-file of the web service to call.
    Therefore I used the eclipse's functionality to convert .wsdl into .java files, which generated some files for me, for example:
    - interface XXX extending java.rmi.Remote
    - interface XXXService extends javax.xml.rpc.Service
    - class XXXProxy implements XXX
    - class XXXServiceLocator extends org.apache.axis.client.Service
    - class XXXSoapBindingStub extends org.apache.axis.client.Stub implements XXX
    - class XXXRfcException extends org.apache.axis.AxisFault implements java.io.Serializable
    - class XXXRfcExceptions implements java.io.Serializable
    My question... what to do now? How can I get the service and call its functionality?
    Your help is really, REALLY appreciated...

    Hi,
    Write client application like below.
    public class Client{
    public static void main(String [] args) throws Exception {
    // Make a service
    XXXService service = new XXXServiceLocator();
    // Now use the service to get a stub which implements the SDI.
    AddressBook port = service.getAddressBook();
    // Make the actual call
    Address address = new Address(...);
    port.addEntry("Russell Butek", address);
    Thanks&Regards,
    M.Kumaraswamy.

Maybe you are looking for

  • Trigger how to get new and old value for nested table column?

    Hi, I have created a nested table based on the following details: CREATE TYPE typ_item AS OBJECT --create object (prodid NUMBER(5), price NUMBER(7,2) ) CREATE TYPE typ_item_nst -- define nested table type AS TABLE OF typ_item CREATE TABLE pOrder ( --

  • Personal Data changes were not saved

    Hi, From the Personal Profile, I am able to edit and save data in all the sections but not for the Personal Data. Once after clicking on the Edit button from the Personal Data as shown below: We are getting below Edit Personal Data screen. Upon click

  • Are my plugins living inside my FCP project?

    Okay, this is strange.  I've never encountered this before. I was using a PowerPC G5 (running Tiger, I think) to cut a project in FCP 6, and I was using tons of those old Eureka Plugins (silk, film look, etc.). Long story short, because my computer w

  • Traversing files and directories underneath a directory

    I'm looking at some sample code about traversing files and directories underneath a directory. I'm trying to understand exactly what the code is doing. I see that dir.list() is building a string array of filenames and directory names. Then it tests e

  • Cc and cs6 compatability

    Hope you can help. I need to find out which cc programs are backward compatible with cs6 and vice versa Many thanks Tina