how to use matlab to read data from '.bin' file which was produced by some equipment

I have an equipment---X which can be drived by computer to detect some electrical signal and give computer some data to draw a picture according to a " .bin" file as below:
when I hit the red circle on the picture--"A", I will get a table as below:
Now I want to get the data in the table by matlab, shall I? how?
Thank you!

 Accepted Answer

My Internet search for information on the ‘CHI1040C’ came up empty, so I don’t know what sort of files it can write. I would write them to CSV or some other common spreadsheet format file if possible, then use MATLAB’s textscan function to read them.

10 Comments

thank you for your reply.
"CHI1040C" is the mode of the equipment which can be drived by computer to draw the curve as above; and this equipment is common equipment(controled by a single chip) which is produced by a company, not used very widely.
Shall I know how to " write them to CSV"? Thank you!
I cannot find any online documentation on the ‘CHI1040C’, so it is up to you to find a way to write the data to a file format MATLAB can read. I cannot help you with those details.
My pleasure!
If you have a PDF file you can upload here (use the ‘paperclip’ or ‘staple’ icon, then ‘Choose file’ and ‘Attach File’) I’ll look through it to see what I can find. But in the absence of any documentation, I’m lost. Check the ‘Help’ menu on the instrument’s graphical interface for other ways to save the data the instrument produces.
I can't find any documents which explain the bin file but usage, so i am sorry for not to upload the PDF files.
Thank you for all of your kindness.
My pleasure.
Did the ‘Help’ menu on the CHI1040C software say anything about saving to other formats such as comma-separated values (.csv), Excel (.xls), text (.txt) or others?
You can also see if MATLAB will open and read the .bin file with the load functions. See the documentation for Control Save and Load for details. It could work.
exactly.
the .bin file can be saved as both .csv and .txt file; but in the fact I want to get this data by matlab code directly when this file was being produced by CHI1040C rather than saving as .txt file manually .shall I?
when I execute load function to get data from .bin, I get something as below:
I hope these will not waste your too much time.
We now know that MATLAB cannot read the .bin files.
I don’t know if it would be possible to get the CHI1040C to communicate directly with MATLAB. I do not know how your hardware is interfaced with your computer, so with the Data Acquisition Toolbox or the Instrument Control Toolbox, it might be possible to control it directly from MATLAB. That may not be easy, since you would have to write the software to intepret the data and convert it into information you can use.
I would save it as a .csv file and read it into MATLAB with textscan or xlsread. You can then save those data as a MATLAB .mat file. and load them easily into your workspace.
ok, that is all
thanks a lot, Star Strider.

Sign in to comment.

More Answers (1)

See if there's an "Export..." item under the file menu and write it out to some standard format. If not, ask the publisher for the format of the bin file. Ask them for a MATLAB reader - they may even have a MATLAB reader for it if you're lucky.

Categories

Asked:

on 27 Jul 2014

Commented:

on 29 Jul 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!