Labview Binary Data

I have written some C programs for signal processing. I need to adapt
these programs to accept binary data acquired by a colleague using
Labview.
The colleague mentions that the data is a 2-D array with a time column
and an amplitude column. Furthermore, the the data is stored in 64-bit
IEEE double precision format.
Can anyone tell me how to read this data format into a C program?
Thank you.
Sincerely, Tom Irvine
[email protected]
Sent via Deja.com http://www.deja.com/
Before you buy.

In article <823irg$inb$[email protected]>,
[email protected] wrote:
> I have written some C programs for signal processing. I need to adapt
> these programs to accept binary data acquired by a colleague using
> Labview.
>
> The colleague mentions that the data is a 2-D array with a time column
> and an amplitude column. Furthermore, the the data is stored in
64-bit
> IEEE double precision format.
>
> Can anyone tell me how to read this data format into a C program?
>
> Thank you.
>
you could read your data and convert them into the standard 2D array.
The 2D array can be as a input of your CIN.
Of course you need to know the saving format of your partener's file.
Then, if I were you, I would just simply use the I/O function in Labview
--open, read, close..plu
s a while loop to index your read data to a 2D
array... the loop will end by the EOF. Note that you need to "read"
your data is dbl-precision by specifying the "data stream type"
parameter as double-precision data. (Simply right-click the "data stream
type" input and click the "creat constant" in the pop-up menu).
It's simple and neat. I've done several this kind of work..even some
with complex data structure.
Luck,
G. Chen
Ph.D. Candidate
Ohio Univeristy, Athens, OH
Nothing can dim the light which shines from within.
Sent via Deja.com http://www.deja.com/
Before you buy.

Similar Messages

  • Loading Labview Binary Data into Matlab

    This post explains the Labview binary data format. I couldn't find all of this information in any one place so this ought to help anyone in the future.  I didn't want to add any overhead in Labview so I did all of my conversion in Matlab.
    The Labview VI "Write to Binary File" writes data to a file in a linear format using Big Endian numbers of the type wired into the "Write to Binary File" VI. The array dimensions are listed before the actual array data. 
    fid = fopen('BinaryData.bin','r','ieee-be'); % Open the binary file
    Dim1 = fread(fid,4); % Reads the first dimension
    Dim2 = fread(fid,4); % Reads the second dimension
    Dim3 = ...
    Each dimension's length is specified by 4 bytes. Each increment of the first, second, third, and fourth byte represent 2^32, 2^16, 2^8, and 1 respectively. 0 0 2 38 equates to 2*256 + 38 = 550 values for that particular dimension.
    As long as you know the number of dimensions and precision of your binary data you can load it.
    Data = fread(fid,prod([Dim1 Dim2 Dim3]),'double',0,'ieee-be'); % Load double precision data
    If you have appended multiple arrays to the same file in Labview you would repeat this procedure. Load each dimension then load the data, repeat.
    Data = fread(fid,prod([Dim1 Dim2 Dim3]),'int8',0,'ieee-be'); % Load int8 precision data or boolean data
    I had to create a function for my own purposes so I thought I'd share it with everyone else too.  I uploaded it to the Matlab File Exchange.  The file is named labviewload.m.
    This was tested on Matlab R2007a and Labview 8.2.

    Thanks. I have the same questions as I tried to load labview binary data into Matlab. 
    -John

  • How do you read in and work with I24 binary data into LabView?

    Hi there,
    I have a program that is reading binary data in as 16 bits per sample.  I have some binary input files that were saved as 24 bits per sample.  How do I convert my old program to handle this data.  I realize that LabView doesn't have built in I24 conversion - how do I do this myself? I found a post that referred to using a boolean array to create your own 24 bit number - but I don't understand what that means...  Any help would be appreciated!
    Thanks so much!

    Do you know the format of the saved 24-bit data?  Can you share some data with us, along with what you think the values are?  If it is I24, then every three bytes represents a 24-bit (signed) integer.  The first question to answer is "What is the order of the bytes"?  How do you want to represent these data?  The obvious choices are as an I32, but since the rest of your data is I16, you might choose I16, instead.
    To convert I24 into I16, you can simply return the high two bytes.  To convert I24 to I32, you need to set a high byte that replicates the sign (saved in the most significant bit of the third byte).  One way to do this is to consider the third byte as an I8 quantity -- if it is positive, set the high byte to 0, and if it is negative, set the high byte to -1.
    Bob Schor

  • Some binary data recoreded by labview cannot open by other program

    I have got some binary data which is recorded by a labview program. When I use some other program to open it (e.g. matlab, notepad, MS excel), it become some strange character, but when I use another labview retrieval program to open it, there is no problem. What happen?
    The original data is 32 bit data sets which are separated by a <CRLF>.
    The recording program (HS-Acquis.llb), the retrieval program (Advanced Viewer.llb), original data file (C1010710.480245) and the data file after retrieval (C1010710.480245.txt) was attached
    phy_mechanic
    Attachments:
    attachment.zip ‏1279 KB

    The data seems like it can only be read by LabVIEW because LabVIEW is set up to properly read the binary data and it is simple for a user to do.
    For matlab to read the data, it will have to be properly configured.
    FOPEN     -     Open a file
    FREAD     -     Binary file read
    FWRITE   -     Binary file write
    FTELL      -     Return the current file position
    FSEEK     -     Set file position indicator
    FCLOSE   -     Close a file
    An example is given from http://www.mathworks.com/support/tech-notes/1400/1​403.htm:
    %This m-file is a short example of how to read and write a binary file
    %in MATLAB using low level routines
    %write file
    fid = fopen('square_mat.bin','wb') %open file in binary write mode
    fwrite(fid, 'This is a square matrix', 'char'); %insert a header
    fwrite(fid, [1 2 3; 4 5 6; 7 8 9]', 'int32'); %write data to file
    fclose(fid); %close file
    %read in the same file
    fid = fopen('square_mat.bin','rb') %open file
    bintitle = fread(fid, 23, 'char'); %read in the header
    title = char(bintitle')
    data = fread(fid, [3 inf], 'int32') %read in the data
    data_tranpose = data' %must transpose data after reading in
    fclose(fid) %close file
     As you can see, the data type, size, array size, etc. has to be explicitly defined. In addition, as Dennis alluded to, LabVIEW stores binary data in Big-Endian format, wheras most windows applications use little endian. I assume matlab is one of those applications...but I am not a huge matlab developer. Google may have more information on that. You can use a typecast in matlab to convert big to little and little to big, however, so that may be a great place to start. Please see http://www.mathworks.com/access/helpdesk/help/tech​doc/ref/typecast.html
    Of course, our wonderful applications engineers at National Instruments have already done the above work for you and developed Knowledgebase 11SF83W0: How do I Transfer Data Between The MathWorks, Inc. MATLAB® Software Developm...which is easily searchable from ni.com knowledgebase category using 'matlab binary'
    Rob K
    Measurements Mechanical Engineer (C-Series, USB X-Series)
    National Instruments
    CompactRIO Developers Guide
    CompactRIO Out of the Box Video

  • How does Labview stores the binary data - The header, where the actual data starts etc.

    I have problem in reading the binary file which is written by labview. I wish to access the data (which is stored in binary format) in Matlab. I am not able to understand - how the data will be streamed in to binary file (the binary file format) when we save the data in to a binary format through Labview program. I am saving my data in binary format and I was not able to access the same data in Matlab.
    I found a couple of articles which discusses about converting Labview to Matlab but What I really wanna know is - How can I access the binary file in Matlab which is actually written in Labview?
    Once I know the format Labview uses to store its binary files, It may be easy for me to read the file in Matlab. I know that Labview stores the binary files in Big Endian format which is
    Base Address+0 Byte3
    Base Address+1 Byte2
    Base Address+2 Byte1
    Base Address+3 Byte0
    But I am really confused about the headers, where the actual data start. Hence I request someone to provide me data about - How Labview stores the Binary Data. Where does the original data start. Below attached is the VI that I am using for writing in to a binary file.
    Attachments:
    Acquire_Binary_LMV.vi ‏242 KB

    Hi Everybody!
    I have attached a VI (Write MAT file.vi - written in LabVIEW 7.1) that takes a waveform and directly converts it to a 2D array where the first column is the timestamps and the second column is the data points. You can then pass this 2D array of scalars directly to the Save Mat.vi. You can then read the .MAT file that is created directly from Matlab.
    For more information on this, you can reference the following document:
    Can I Import Data from MATLAB to LabVIEW or Vice Versa?
    http://digital.ni.com/public.nsf/websearch/2F8ED0F588E06BE1862565A90066E9BA?OpenDocument
    However, I would definitely recommend using the Matlab Script node (All Functions->Analyze->Mathematics->Formula->Matlab Script). In order to use the Matlab Script node, you must have Matlab installed on the same computer. Using the MatlabScript node, you can take data generated or acquired in LabVIEW and save it directly to a .mat (Matlab binary) file using the 'save' command (just like in Matlab). You can see this in example VI entitled MathScriptNode.vi - written in LabVIEW 7.1.
    I hope this helps!
    Travis H.
    LabVIEW R&D
    National Instruments
    Attachments:
    Write MAT file.zip ‏189 KB

  • How to output binary data to VISA

    i am interfacing labview with pic microcontroller through serial port using VISA. it is a stream of digital data which is being tranmitted ,stored in microcontroller and then retransmiited by microcontroller to other device...problem is when that data is converted to string to be given to VISA it makes 16bytes out of 16bits...for example if data was "11110000" (1byte) after converted to string it becomes 8 bytes and my microcontroller thibk that 8 bytes are coming................ please kindly tell me how to transmit binary data over serial port so that bit remains a bit dont become byte............................ data is 99bytes but after passing through VISA it become "99x16"bytes........ please help me
    regards
    umair

    The attached example in 8.0 converts a U16 into two U8, builds an array and with the Byte Array to String, converts to the hex string 8000 (two bytes). Note that the string indicator is configured for Hex Display (right click option).
    Now, when you say you want to see '1000001 on the hyperterminal of other PC', you are contradicting yourself. Hyperterminal cannot be set for binary display so if you want to see '10000001' in Hyperterminal, then you need 8 bytes (one for each ASCII character).
    I hope I have made myself clear.
    Attachments:
    U16 to Hex String.vi ‏8 KB

  • Converting binary data to cluster

    Hello,
    I have a problem converting binary data to a cluster. I have to create a VI that reads out some parameter from a device, which is connected via RS232. I get an array of 128 Byte from the device. The data has the following (C-)structure:
    struct PARAM
    char cVersion[64];
    float fDeviceID;
    float fChannels;
    float fSensor;
    float fTrigger;
    float fConst[5];
    char cReserved[28];
    How can I convert the binary array to a cluster? I created a cluster (see attachment), but I couldn't connect it with the "Type Cast" VI. Has anyone an idea how to solve this problem?
    Thanks, Martin
    Attachments:
    cluster.jpg ‏16 KB

    It is tedious to convert binary data to LabVIEW data when you have arrays. You have to typecast the data with clusters of the same fixed length as in the structure. Large clusters are easily created on the diagram using Array to Cluster primitive. See the attavhed picture.
    LabVIEW, C'est LabVIEW
    Attachments:
    conversion.gif ‏11 KB

  • DAQ vi to perform digital write and read measurements using 32 bits binary data saved in a file

    Hi
    DAQ vi to perform digital write and read measurements using 32 bits binary data saved in a file
    Two main
    sections:
    1)     
    Perform
    write and read operations to and fro different spread sheet files, such that
    each file have a single row of 32bits different binary data (analogous to 1D
    array) where the left most bit is the MSB. I don’t want to manually enter the
    32 bits binary data, I want the data written or read just by opening a file
    name saves with the intended data.
          2)     
    And
    by using test patterns implemented using the digital pattern generator or  build digital data functions or otherwise, I need to
    ensure that the     
                binary data written to a spreadsheet file or any supported file type
    then through the NI-USB 6509 is same as the data read.
    I’m aware I can’t use the simulated
    device to read data written to any port but if the write part of the vi works I
    ‘m sure the read part will work on the physical device which I’ll buy later.
    My Plan
    of action
    I’ve
    created a basic write/read file task and a write/read DAQ task for NI USB 6509
    and both combine in a while loop to form a progress VI which I’m confuse of how
    to proceed with the implementation.
    My
    greatest problem is to link both together with the correct functions or operators
    such that there are no syntax/execution errors and thus achieve my intended
    result.
    This
    project is one of my many assignments for my master thesis, so please i’ll
    appreciate every help as I’m not really efficient with LabVIEW programming but
    I prefer it because is fun and interesting if I get to know it.
    Currently I’m
    practicing with LabVIEW 8.6/NI DAQmx 8.8 Demo versions and NI USB 6509
    simulated device.
    Please see
    the attached file for my novice progress, thanks in
    advance for the support
    Rgds
    Paul
    Attachments:
    DIO_write_read DAQ from file.vi ‏17 KB

    What does your file look like?  The DAQmx write is expecting a single U32 value, not an array of I64. 
    Message Edited by vt92 on 09-16-2009 02:42 PM
    "There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal

  • How to set a string input to accept only 1 and 0 (binary data)

    Hi
    I want to write a program that is supposed to take only binary data from the user. So I put a string control onto the front panel, wanting the user to be able to only type 1 or 0 in it. Is there a way to do that?
    Thanks

    Jean-Pierre Drolet wrote:
    Another slight flaw is that the string accepts Enter for a new line. It is easily fixed by setting it to "Limit to single line".
    True, it allows any non-ASCII through. Another solution would be to use some logical combination of VKey and Char, but it could get complicated. One of the simpler ways is the use of scancode and shift, as in the attached modification. Now ENTER, etc. is also discarded.
    I also agree that none of this seems appropriate to enter 4000 "0/1" characters on a fromt panel.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    BinaryStringControl_III.vi ‏24 KB

  • Working with Binary data from the Gpib Read Function

    I m using the gpib read command to recieve data from a gpib instrument. I already know the form of the binary data being sent back. I have programmed it in matlab before. I am haveing trouble parseing out the binary data I recieve. the basic form of the data is
    #I immediately followed by 401 64 bit ieee floating point numbers. When I programmed this in matlab the code I used was of the form:
    [a,count,msg]=fread(g2,2,'int8');
    [a,count,msg]=fread(g2,401,'float64');
    for those that don't know matlab code the command reads data from the instrument pointed to by the g2 handle. the number after the g2 above speicifies the number of values to read. And the last part the string in qoute specifies the way the binary data
    is to be interepeted. the output arguments a count and msg are
    a-your data
    count-number of items succesfully read in
    msg-error message
    In the above two lines I use the variable a twice to capture the data. The first time a is set equal to '#I' everything inside the qoutes. The second time a is set equal to the actual data, in this case 401 64bit floating point numbers. I m convince that the flatten to string and unflatten from string function are the set meant to accomplish this task. But I haven't been able to find a good example of how to use these functions. Especially with an array.
    Can some one please help me?
    Thanks
    Scourched

    I'm pretty sure what you're describing is a simple typecast in LabVIEW. You will want to strip off the #I first, using string manipulation functions. Then, you can wire the string into a "typecast" VI, and wire a double precision float constant to the top connector of the typecast (this tells the VI that you expect a 64 bit float output) and then you can read your resulting array of double precision floats on the output of the typecast. The typecast VI is found in All Functions >> Advanced >> Data Manipulation.
    I've attached an example in LabVIEW 7.0 and also 7.1 format.
    Scott B.
    Applications Engineer
    National Instruments
    Attachments:
    typecast.vi ‏11 KB
    typecast.vi ‏13 KB

  • Importing very special binary data into Diadem

    In order to use DIAdem I need to import binary data from transient recorders. The data is stored in block mode (CH after CH), as X-Y data pairs. All channels have different length but the structure and channel names are written into a special header block, preceeding the data. The X-Y data pairs are written into words (32-bit) with variable X/Y separation, that is that Y maybe e.g. 12-bit wide and thus X using the remaining 20 bits of the word. The X/Y separation position is coded in the header too.
    Can I define a very complex import rule directly in DIAdem or can I call a LabVIEW file read and decode driver? Or is it simply impossible, except I convert all of my 120000 data sets and have them using 4 times more space?
    Many thanks in advance to the experts!
    Marco Mailand
    ABB Switzerland Ltd.
    High Voltage Technology
    Solved!
    Go to Solution.

    Mr Mailand,
    generally, you can import binary data with the function "Import via header" which you find in the file menu (submenu DAT files) in the Navigator / Data Window. Within the dialog you can specify how your data is ordered in the file. But you are limited to some standard storage mode so you might not succeed importing the data in that way.
    Of course you can also call LabVIEW VIs and write the imported Data directly to DIAdem channels. The LabVIEW-DIAdem Connectivity VIs provide the functions you need for the data exchange.
    Another way would be to import the data with help of a VBScript.
    But there is also another method to expand the DIAdem features: With the GPI toolkit you can generate your own plugin DLLs for DIAdem. You can implement all the code you need
    to import the data in a c-program and import that function into DIAdem. In that way you will be able to load your data just as any other datatype using the standard file open nemu.
    GPI Toolkit for add-on DIAdem DLL creation
    http://digital.ni.com/softlib.nsf/websearch/D605AA96CF81760C86256C7600742EC5?opendocument&node=132070_US
    LabVIEW DIAdem Connectivity VIs Version 2.1
    http://digital.ni.com/softlib.nsf/websearch/D73B15862235486D86256D2D00798738?opendocument&node=132070_US
    Calling LabVIEW VIs interactively from DIAdem
    http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=D18837DE23EE32F6E034080020E74861&p_node=DZ52246&p_source=External
    Ingo Schumacher
    Application Engineering
    National Instruments

  • Download Binary Data File over Serial Port

    I need help setting up a .vi that I can use to download a binary data file from a dos-based system. I will send the system a command, say ascii "DOWNLOAD", and then the remote system will send me a binary data file that will be approx. 600MB. I won't be doing any display/manipulation using labview, I will just need to have the option available in LV to recieve the file.
    Any examples would help a programmer that is new to LV and is getting a little desperate.

    A VISA Read doesn't care whether the data it's getting is binary or ASCII. Where you might have problems is detecting that file transfer is complete. If you have enable termination character set to True in the VISA Configure Serial Port, the read will stop as soon as the termination character is detected. The default termination character is 0xA or a linefeed. You probably don't want to use this. If the file is terminated with a character or string of characters that you now will be unique, you can use this. If there is no unique termination character at the end of the file, the next best thing is to know the file size exactly and set the byte count of VISA Read to that number. Based on file size and baud rate, you would also need to adjust the VISA timeout value. Another way to do this is to transfer the data in pieces and write to a file as soon as the data is received. The reading of data would then be terminated when there are no more bytes available at the serial port. I've attached a LabVIEW 7.0 program that should give an idea of the last approach.
    Attachments:
    File Transfer.vi ‏57 KB

  • How to upload large binary data to dB so it can be read by any app?

    Hi everyone,
    Short version: how do you upload binary data into a MySQL blob field in such a way that it can be read by any application?
    Long version:
    I've been struggling with the problem of putting files into database BLOB fields. (MySQL and Database Connectivity Toolkit).
    I was initially building a query string and executing the query but was finding that certain binary characters were causing failures (end of string terminators, etc...) So, a working solution was to encode the binary string, and that worked fine, although bloated the dB a fair bit. I could decode in LabVIEW and then save the file as needed.
    Now, the customer wants to be able to save the files using other apps, including the MySQL Query Browser, so an encoded file is no good.
    I found using a parametrized query allows me to put the unencoded string into the dB, but it appends a 4-byte length at the front of the BLOB before it inserts it into the dB. Some apps ignore these 4-bytes (such as .pdf) but most do not.
    A related thread on NI discussion forums: http://forums.ni.com/ni/board/message?boar...ssage.id=354361 has no solution, and my support ticket at NI has been ongoing without answer for a while.
    Thanks,
    Ben

    The problem is the DCT. Using ADO it is fairly easy to insert binary data into a BLOB field. I have not tried it in MySQL, but it works fine in SQL Server, Oracle, Firebird and other free/open source databases I have tried. To get you started, see this thread.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Swap binary data endianess

    Hello all,
    I have a preconfigured FPGA, which is outputting 8bit unsigned binary data in packets (which are 90bytes long). I'm reading this data into LabView using VISA (over RS232). The VISA-Read is converting the binary to hex (as I expect), but it's doing it with the wrong endianess, so the hex is meaningless (i.e. I get a 2 when I expect 64 etc).
    I can see may ways (both through inbuilt functions and solutions suggested here) for correcting endianess of multiple bytes ("Swap Bytes" for example), but none for changing this internal to a single byte, nor can I see a means of configuring VISA in this respect. Am I missing something obvious? All suggestions welcome, thank you!

    I never heard of a format with reversed bits. Are you sure that's what it actually is?
    Can you attach a VI containing a typical 90byte raw data set and the desired result?
    I would go with the Lookup table as in Darin's top example. If you disable debugging, it will get folded into a constant at compile time and is thus extremely efficient at runtime. (or just make it into a constant manually as Darin did).
    (Darin, that second algorithm is weird. These guys have way too much time on their hand: Inflate each byte 8x to U64 just to do some obscure binary operations then shrink it back later... )
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    ReverseBitsLUT.png ‏5 KB

  • PbyFwData - Pointer to the firmware binary data stream.

    Hello,
    I used labview to call a dll, but it have one parameter "pbyFwData" which Pointer to the firmware binary data stream.i don't understand what mean is "Pointer to the firmware binary data stream".I try to make this parameter point to the firmware path, but the program can't be run.the below is the .dll source code. who can tell you how to pass the value to the parameter "pbyFwData" by labview?
    // Purpose:      Public function to download the Flash Preloader.
    // Parameter:
    //   hZvDev    - Handle of the Zeevo Device.
    //   pbyFwData - Pointer to the firmware binary data stream.
    //   uFwLen    - The length of the preloader.
    // Return value: SUCCESS if successful; Otherwise, the error code.
    ZEEVOPTU_API int ZV4301_SendPreLoader(HANDLE hZvDev,
                                          unsigned char *pbyFwData,
                                          unsigned long uFwLen)
       ZV4301 *pZvDev;
       COMM_DESC *pPort;
       int nResult, nTmOut;
       const unsigned long uBlkSize = 0x400;
       unsigned long uDummy, uCRC;
       unsigned char byDataBuf[32];
       unsigned char byData;
       if (!Validate(hZvDev))
          return ERR_BAD_HANDLE;
       pZvDev = (ZV4301 *)hZvDev;
       pPort = pZvDev->PortDesc;
       // Setup the Address and Length
       memset(byDataBuf, 0, sizeof(byDataBuf));
       LD_LoaderProgramAddr(byDataBuf) = LD_ZV4301_LOADER_ADDR;
       LD_LoaderProgramLengh(byDataBuf) = uFwLen;
       // Calculate the Header CRC
       uCRC= UT_CRCBuffer(byDataBuf+4, 8);
       LD_LoaderProgramHdrCRC(byDataBuf) = uCRC;
       // Calculate the Data CRC
       uCRC = CalculateCRC(pbyFwData, uFwLen);
       LD_LoaderProgramDataCRC(byDataBuf) = uCRC;
       // Detect target reset
       nResult = IsChipPwrOnReset(pZvDev, 10000);
       if (nResult != SUCCESS)
          return nResult;
       // send out header first
       nResult = WriteSerial(pZvDev, byDataBuf, LD_LOADER_PRGM_HDR_LEN);
       if (nResult != SUCCESS)
          return nResult;
       while (uFwLen > 0)
       {  // sending the preloader file
          if (uFwLen >= uBlkSize)
             nResult = WriteSerial(pZvDev, pbyFwData, uBlkSize);
             pbyFwData += uBlkSize;
             uFwLen -= uBlkSize;
          else
             nResult = WriteSerial(pZvDev, pbyFwData, uFwLen);
             uFwLen = 0;
          if (nResult != SUCCESS)
             return nResult;
       nTmOut = 100;
       while (nTmOut > 0)
       {  // getting the respond 0xAA
          if (GetByte(pZvDev, &byData))
             if (byData == 0xAA)
                break;
          Sleep(10);
          nTmOut -= 10;
       if (nTmOut == 0)
          return ERR_DOWNLD_PRELDR;
       nResult = SetCommBaud(pZvDev, FLOWCTRL_DIS, pPort->uBaud, &uDummy);
       return nResult;

    Hi,
    The pointer is a U32 that points to a memory location where the data is. It is not clear from the prototype whether the pointer points to data that is feeded to the dll, or returned from the dll.
    If data is feeded, wire an array to this parameter, and set uFwLen to it's length.
    If data is returned, you need to use some other api calls to get the data from memory...
    Regards,
    Wiebe.
    "Jimmy168" <[email protected]> wrote in message news:[email protected]...
    Hello,I used labview to call a dll, but it have one parameter "pbyFwData" which Pointer to the firmware binary data stream.i don't understand what mean is "Pointer to the firmware binary data stream".I try to make this parameter point to the firmware path, but the program can't be run.the below is the .dll source code. who can tell you how to pass the value to the parameter "pbyFwData" by labview?
    &nbsp;
    //------------------------------------------------------------------------------// Purpose:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Public function to download the Flash Preloader.// Parameter://&nbsp;&nbsp; hZvDev&nbsp;&nbsp;&nbsp; - Handle of the Zeevo Device.//&nbsp;&nbsp; pbyFwData - Pointer to the firmware binary data stream.//&nbsp;&nbsp; uFwLen&nbsp;&nbsp;&nbsp; - The length of the preloader.// Return value: SUCCESS if successful; Otherwise, the error code.//------------------------------------------------------------------------------ZEEVOPTU_API int ZV4301_SendPreLoader(HANDLE hZvDev,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned char *pbyFwData,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned long uFwLen){ &nbsp;&nbsp; ZV4301 *pZvDev;&nbsp;&nbsp; COMM_DESC *pPort;&nbsp;&nbsp; int nResult, nTmOut;&nbsp;&nbsp; const unsigned long uBlkSize = 0x400;&nbsp;&nbsp; unsigned long uDummy, uCRC;&nbsp;&nbsp; unsigned char byDataBuf[32];&nbsp;&nbsp; unsigned char byData;
    &nbsp;&nbsp; if (!Validate(hZvDev))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return ERR_BAD_HANDLE;&nbsp;&nbsp; pZvDev = (ZV4301 *)hZvDev;&nbsp;&nbsp; pPort = pZvDev-&gt;PortDesc;
    &nbsp;&nbsp; // Setup the Address and Length&nbsp;&nbsp; memset(byDataBuf, 0, sizeof(byDataBuf));&nbsp;&nbsp; LD_LoaderProgramAddr(byDataBuf) = LD_ZV4301_LOADER_ADDR;&nbsp;&nbsp; LD_LoaderProgramLengh(byDataBuf) = uFwLen;&nbsp;&nbsp; // Calculate the Header CRC&nbsp;&nbsp; uCRC= UT_CRCBuffer(byDataBuf+4, 8);&nbsp;&nbsp; LD_LoaderProgramHdrCRC(byDataBuf) = uCRC;&nbsp;&nbsp; // Calculate the Data CRC&nbsp;&nbsp; uCRC = CalculateCRC(pbyFwData, uFwLen);&nbsp;&nbsp; LD_LoaderProgramDataCRC(byDataBuf) = uCRC;&nbsp;&nbsp; // Detect target reset&nbsp;&nbsp; nResult = IsChipPwrOnReset(pZvDev, 10000);&nbsp;&nbsp; if (nResult != SUCCESS)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return nResult;&nbsp;&nbsp; // send out header first&nbsp;&nbsp; nResult = WriteSerial(pZvDev, byDataBuf, LD_LOADER_PRGM_HDR_LEN);&nbsp;&nbsp; if (nResult != SUCCESS)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return nResult;
    &nbsp;&nbsp; while (uFwLen &gt; 0)&nbsp;&nbsp; {&nbsp; // sending the preloader file&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (uFwLen &gt;= uBlkSize)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nResult = WriteSerial(pZvDev, pbyFwData, uBlkSize);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pbyFwData += uBlkSize;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uFwLen -= uBlkSize;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nResult = WriteSerial(pZvDev, pb

Maybe you are looking for

  • Please help - Totally locked out of T61

    Bottom line: I am totally frozen out of my T61, stuck at the BIOS. I can apparently do absolutely nothing, including access info on the primary HD or the secondary HD in the DVD slot. I now get this error after the laptop recognizes my fingerprint: <

  • Is Windows 8.1 and HP 8620 compatible?

    I recently purchased the HP 8620 as an upgrade from the 8600. Im on the second printer becasue I could never get the first to print so I took it back thinking it was a defected printer. Now I can't get the second one to print either. I've run every d

  • Do I have to buy the new Fruits Ninja HD when I already bought Fruit Ninja, for it to work on my iPad Mini??

    I bought Fruits Ninja a while ago and it said it was for iPods, iPhones, iPads but I didn't have one and it was for my iPod touch. I got a mini iPad and I have noticed that its under the iPhone/iPod catergory. I will be sad if I have to download the

  • Forms, GET and different languages.

    Hi, i want to do the following. A user gets a form in en_US (default behaviour) then the user enters some data until he doesnt understand what he has to enter in a special field -> he switches the language to de_DE simply by requesting the same page

  • Server Busy on startup

    i have checked the forums here and google and I cannot figure out why I am getting the dreaded Server Busy error when starting Dreamweaver. If I wait for about 1 minute and press the retry button it will open up. I just started getting the error 3 da