read in a labview complex binary file written in matlab and vice versa

Dear all. We use the attached funtion "write_complex_binary.m" in matlab to write complex numbers in a binary file. The format used is the IEEE floating point with big-endian byte order. And use the "read_complex_binary.m" function attached to read the complex numbers from the saved binary file. However, I just don't seem to be able to read the binary file generated in labview. I tried to use the "Binary file reading" block with big-endian ordering without success. I'm sure that its my lack of knowledge of the reason why labview block works. I also can't seem to find useful resources to this issue. I was hoping that someone could kindly help with this or give me some ideas to work with.

Thank you in advance of the charges. Please find attached two zipped matlab functions. Kind regards.

Be a scientist - experiment.

I guess you know Matlab and can generate a little complex data and use the Matlab function to write to a file.  You can also function Matlab that you posted - you will see that Matlab takes the array of complex apart in 2D (real, imaginary) and which are written as 32 bits, including LabVIEW floats called "Sgl".

So now you know that you must read a table of Sgls and find a way to put together it again in a picture.

When I made this experience, I was the real part of complex data (Matlab) [1, 2, 3, 4] and [5, 6, 7, 8] imagination.  If you're curious, you can write these out in Matlab by your complex function data write, then read them as a simple table of Dbl, to see how they are classified (there are two possibilities-[1, 2, 3, 4, 5, 6, 7, 8], is written "all real numbers, all imaginary or [1, 5, 2, 6, 3, 7, 4) [, 8], if 'real imaginary pairs'].

Now you know (from the Matlab function) that the data is a set of Sgl (in LabVIEW).  I assume you know how to write the three functions of routine that will open the file, read the entire file in a table of Sgl and close the file.  Make this experience and see if you see a large number.  The "problem" is the order of bytes of data - Matlab uses the same byte order as LabVIEW?  [Advice - if you see numbers from 1 to 8 in one of the above commands, you byte order correct and if not, try a different byte order for LabVIEW binary reading function].

OK, now you have your table of 8 numbers Sgl and want to convert it to a table of 4 complex [1 +, 2 + 6i, 5i 3 +, 4 + i8 7i].  Once you understand how to do this, your problem is solved.

To help you when you are going to use this code, write it down as a Subvi whose power is the path to the file you want to read and that the output is the CSG in the file table.  My routine of LabVIEW had 8 functions LabVIEW - three for file IO and 5 to convert the table of D 1 Sgl a table of D 1 of CSG.  No loops were needed.  Make a test - you can test against the Matlab data file you used for your experience (see above) and if you get the answer, you wrote the right code.

Bob Schor

Tags: NI Software

Similar Questions

  • I have windows vista business edition is installed on the desktop and Vista home edition on my laptop I can't access files on the laptop and vice versa, I am using a d-link adsl router can u help me solve the issues___Thanks__Peter

    I have windows vista business edition is installed on the desktop and Vista home edition on my laptop I can't access files on the laptop and vice versa, I am using a d-link adsl router can u help me solve problems

    Thank you
    Peter

    Hello

    The easiest way is with a crossover cable - a special wire to connect the two systems.
    You can get one at your local computer store - they are not expensive.

    Also check with the site of the manufacturer of your router, because they will have in-depth details on how to
    set up the network.

    ====================================

    Or you can set up a wired or wireless network.

    Setting up a network home
    http://Windows.Microsoft.com/en-us/Windows-Vista/setting-up-a-home-network

    Home network, wireless network and computer networking Made Easy
    http://www.home-network-help.com/

    Windows Vista tip: How to install and connect to a wireless network
    http://www.watchingthenet.com/Windows-Vista-tip-how-to-Setup-and-connect-to-a-wireless-network.html

    Ad-hoc networking
    http://windowshelp.Microsoft.com/Windows/en-us/help/0e158c21-4C70-4235-879d-0c9133218e561033.mspx
    Set up a computer-to-computer (ad hoc) network
    http://windowshelp.Microsoft.com/Windows/en-us/help/293c504f-b944-4d5d-835c-f080129bd5dc1033.mspx

    How to set up an Ad Hoc wireless network in Windows Vista
    http://www.home-network-help.com/ad-hoc-wireless.html

    Create an ad hoc WiFi network secure on Windows Vista
    http://www.Intel.com/support/wireless/WLAN/sb/CS-025386.htm

    Networking tutorial home
    http://www.tehnomagazin.com/computer/home-networking-tutorial.htm
    Practically networked - everything you could possibly want to know.
    http://www.practicallynetworked.com/

    I hope this helps.
    Rob - bicycle - Mark Twain said it is good.

  • How do I enter cloud files iOS Adobe ideas and vice versa?

    How do I enter cloud files iOS Adobe ideas and vice versa?

    Update, the latest version of Adobe ideas on iOS, version 2.0 now includes features of synchronization.

    -Dave

  • Is it possible to import files from dreamweaver and muse of files to reflow edge and vice versa?

    Hi there are some things I can do using edge reflow such as making a mobile and tablet site.

    There are some things I can do with dreamweaver, such as making a form with a drop of water to the bottom of the box.

    And there are some things I can do with muse as insert a google maps and paypal widget.

    Is it possible to Exchange files with these 3 software?

    You cannot import in reflow of Dreamweaver or Muse. You can export HTML (and CSS) reflow, but not import HTML reflow.

    -Vic

  • Can I open the CS6 files on my iPad (and vice versa)

    I plan to do Photoshop touch for my iPad... But as I'm a Graphic Design student, I would like to know, if possible, is it easy to open on my Mac CS6 PSD files

    Yes, you can open Photoshop Touch files in Photoshop desktop with the psdx plugin:

    http://helpx.Adobe.com/Photoshop/KB/psdx-files-Don ' t-open - photoshop.html

    However up to present layers in psd files will be flattened on import in Photoshop Touch.

  • A LabVIEW vi or llb developed on a Mac runs on windows and vice versa

    Does a vi in LabVIEW/llb developed on Mac OS work on Windows and vice versa. ?

    For the most part, Yes.  If there is no specific code either Mac or Windows (such as the ActiveX calls), so the code will not work.

  • Unable to replicate the frations seconds when you read a timestamp to a binary file

    I use LabVIEW to collect packets of data structured in the following way:

    cluster containing:

    DT - single-precision floating-point number

    timestamp - initial period

    Table 2D-single - data

    Once all the data are collected table of clusters (above) is flattened to a string and written to a text file.

    I try to read binary data in another program under development in c#. I have no problem reading everything execpt the time stamp. It is my understanding that LabVIEW store timestamps as 2 unsigned 8-byte integer. The first integer is the whole number of seconds since January 1, 1904, 12: 00, and the second represents the fractional part of the seconds elapsed. However, when I read this information in and convert the binary into decimal, the whole number of seconds are correct, but the fractional part is not the same as that displayed by LabVIEW.

    Example:

    Hex stored in the binary file that represents the timestamp: 00000000CC48115A23CDE80000000000

    Time displayed in LabVIEW: 8:51:38.139 08/08/2012

    Timestamp converted an Extended floating-point number in labview: 3427275098.139861

    Timestamp binary converted into a decimal number to floating-point in c#: 3427275098.2579973248250806272

    Binary timestamp converted to a DateTime in c#: 8:51:38.257 08/08/2012

    Anyone know why there is a difference? What causes the difference?

    http://www.NI.com/white-paper/7900/en

    The least significant 64 bits should be interpreted as a 64-bit unsigned integer. It represents the number of 2-64 seconds after the whole seconds specified in the most significant 64-bits. Each tick of this integer represents 0.05421010862427522170... attoseconds.
    

    If we multiply the fractional part of the value (2579973248250806272) by 2-64 so I think that you have the correct time stamp in C.

  • reading data in labview to accdb file

    Hello.

    All I want to do is to read the data into a file (MS Access 2007 and later) .accdb and be able to use these data in labview. It's just a table with a group of numbers. I know how with excel but I'm getting confused with MS acess. I'm trying to play with LabSQL right now but still get confused.

    Help, please!

    Thank you.

    What are you specifically confused about? Before using LabSQL, I suggest that you find a good tutorial on the SQL language. Database Toolbox of OR can also be used. It hides some of the complexity of the SQL for beginners.

  • SD card reader is identified as a WPD file system Volume driver and can not read SD cards.

    HP Pavilion Elite-110f desktop PC

    Windows 7 64 bit

    In the Device Manager "this device cannot start."

    Temporarily used MiniTool Patition Wizard repartition my SD card out of my Android phone. When I noticed the problem, I uninstalled the program. Disk management Windows see the SD card; Ubuntu see the SD card; Yet he does not appear in 'computer '. So I can't transfer files.

    I reinstalled all the drivers card drivers mother AMD and Alcor USB 2.0. Question remains.

    Solved by assigning the drive letter in disk management

  • Which app to use to transfer files PC wirelesly to phone and vice versa

    Hi all

    Then, I got my new Z3 Compact and maan which a phone... In any case, we will not dwell the * beep * kissing and I would like to get into it...

    I managed to connect wirelesly to my PC and entered in the file of Commander (pre-installed app from the phone), where you can see the remote files. When you press it, you add a remote account, but here is where I got stuck. I press the remote shares, then press + to add Windows share.

    My question is, I have entries in these fields, to make it connect to my PC? I also ES File Explorer, which could help with this, but again, I have no idea how to make it work with my PC. There all the other apps out there, in addition to AirDroid, which might do the trick? I do not have AirDroid so much and thought that it would be a native solution for my problem.

    Any help would be so appreciated!

    Thanks again!

    Hello and welcome to the community! Since you are new, please make sure that you have checked our Forum.

    In order to access the files stored on your PC from the phone, you need to share the drive/folder you want to access the first. To share a drive or a folder in Windows, right click, select properties and then click the sharing tab. You can find more information here: http://windows.microsoft.com/en-us/windows-vista/share-files-and-folders-over-the-network-from-windo...

    When you then add the part to the phone, you must enter:

    'Host', which is the name of your computer (see Controlpanel-> System)

    'Action' that is what you named the shared disk/folder

    Name of user and password credentials that you have in your PC

  • Since the upgrade to CS6, I see is no longer how to convert files from, for example, a PDF to JPEG and vice versa.  It used to be so simple.  Can anyone help with this?

    Since the upgrade to CS6, I say is no longer how do to convert files from, for example, a PDF file as a JPEG or another type (gif, png, etc.).  When I look at the file in the Finder it simply brings me directly to my original in inDesign document, rather than to appear on the left side of the screen with the save option under sub folder as it did before.  Does anyone know how I can convert the files, I need to do a lot!

    ???? Conversion of files with InDesign? Never have been possible. The only thing you could and can do is to export an InDesign document. You can export to PDF, jpg, etc. just like before.

  • How to fix .muse file from PC to Mac and vice versa giving response "damaged file"?

    Hello guys, once again

    I just started working on a simple website in Muse on a PC and at some point, I've uploaded on my Mac and wanted to continue. Instead of loading the file, I received a message "cannot open, damaged... file. ». Did not know what to do so I started the same site from scratch on Mac. I came up to a certain point in the design, then I save the file and I put the file on a USB key to continue my work on PC. Now, I get the same message.

    Can someone help with this problem? THX.

    Muse versions are the same.

    Marko

    Hi Marko,

    I was able to open the file on the PC, both Windows and Mac. However, I was unable to open the MAC file in both. The message "file corrupted". I sent the MAC file to you. Please check whether or not you are able to open it.

    Kind regards

    Aish

  • read and write (control should serve as an indicator and vice versa)

    Control (Input) should act as indicator (output) and vice versa for a transmission.is of the string, it is possible


  • Help reading binary file

    Hello

    Just hoping someone might be able to help me with the following. I'm new to labview and don't do not have has IT melts so understand binaries and how to read is beyond my capabilities.

    Quite simply, I try to open a series of binary files written in the following format (see attachment data.txt) then in labview, process the data. I tried the examples of binary file reading but seem to be long around in circles. I also enclose examples of the 8sept4.3ld of file format, then the same file in an ascii format which is what I'd like the output in labview to look like.

    I'd appreciate any help with this, especially if it's stupid guide!

    See you soon,.

    Kath


  • Question in the reading of a binary file, with data "flatten to a string.

    I am facing problem while playing a binary file (created using LabVIEW).

    I've mentioned (question and method to reproduce) within the attached VI.

    Even vi is fixed in versions 2012 and 8.0.

    --

    Concerning

    Reading a string from a binary file stops at a NULL (0x00) character.  When the first character is 0 x 00, you just read the of a character.  Since you are doing the reverse, I'd written into a byte array.  And then you can read as a byte array.

Maybe you are looking for

  • How to replace the CPU on satellite A110-252

    I have a satellite A110-252 and need to know how to replace the cpu, hope someone can help you. Doug

  • How to convert an ASCII integer?

    Here I am trying to send the number 1000000 microcontroller by UART and I get the ASCII in labview. But I would get 1000000 exact in labview also. So I try to convert ASCII in full, but I'm unable to do so.

  • Memory speed (BIOS) running

    2 sticks of memory installed on my HP Pavilion (model #: p6605f) are: 2RX8 PC3-10600U-09-10-B0 (M378B5673FH0-CH9) that makes them a 1333 Mhz memory... BUT when I run the HP Support Assistant, he says: 4 GB installed memory 1: 2 GB 800 Mhz Samsung oth

  • No matter what Transport BB need us to open the connection in BB10?

    We develop a network BB10 application. We have a doubt concerning the transport of BB. is there any transport BB10 we need it to make the connection in application BB10. In Java of BB, we have the tranposrts as TRANSPORT_TCP_WIFI, TRANSPORT_WAP2, TRA

  • Formatting computer - driver problems

    Hello I'm trying to reformat my computer which is a diemension e510 bought about 3 years ago.  Already, I have re-installed windows XP Professional 64-bit edition. My problem is when I try to install the drivers.  I have the blue CD that came with my