% ReadLeCroyBinaryWaveform - read binary waveform file created by a LeCroy Oscilloscope
% waveform = LeCroyBinaryWaveform(FILENAME) loads the waveform file into the workspace variable W.
% FILENAME can either be a variable or a string constant enclosed by quotes.
% The return value "waveform" is a record containing four elements:
% waveform.INFO Waveform information, in readable formats. For example Oscilloscope ID, sampling time and settings
% waveform.DESC Waveform information used for further calculations. For example Sampling rate
% waveform.Y Values sampled by the oscilloscope
% waveform.X Array of time values corresponding to waveform.Y. Time '0' marks the trigger event
can the function read Lecory trc files？
Works really well! (LeCroy Waverunner LT246M)
Awesome - works right away no hassle - many thanks (Lecroy 610 Zi)
Great program! Well-documented and easy to use.
UPDATE: MATLAB now supports direct instrument control and configuration of these oscilloscopes when using MATLAB with the Instrument Control Toolbox. This includes the ability to acquire waveform data directly into MATLAB for analysis.
A MATLAB instrument driver for most of these oscilloscopes can be downloaded at:
A Getting Started Guide for using MATLAB with these oscilloscopes can be downloaded at:
Excellent, worked straight away! Thanks a lot.
Very good, but I think I found some bugs:
If you load 16bit data you get twice as much x values then you get y values. I added a variable recordcount which is = AVE_ARRAY_1 when reading byte-data and =WAVE_ARRAY_1/2 when reading word-data. And I think that it has to be ...[0:recordcount-1]...
Thank you very much!
Used this code to write VBA version to load Lecroy_2_3 files directly into Excel. Saves faffing with ascii function on the scope. Very helpful.
A very fine piece of software, minor changes are necessary to get it to work with octave (remove some "newlines" in arrays). I am using it with LeCroy 9350, LECROY_2_2 files and Lecroy WR LT372, LECROY_2_3 files.
Read the source. I think the line
wave.x = [1:WAVE_ARRAY_1]'*HORIZ_INTERVAL + HORIZ_OFFSET;
shoud be changed to
wave.x = [0:(WAVE_ARRAY_1-1)]'*HORIZ_INTERVAL + HORIZ_OFFSET;
Great program. Works for the waveform files generated by LeCroy WR6100 LECROY_2_3.
One question though, the time value is shifted toward positive direction by 1 sampling time, when compared to the values in the text file converted by LeCroy ScopeExplorer. Don't know which one is correct.
Just what I was needing !;o)
Works fine with my LeCroy 9350, LECROY_2_2 files.
Works out of the box for LECROY_2_3 files. Thank you! Note: The returned structure W contains not only the oscilloscope trace, but also the sampling rate, sampling frequency, and other information about the data acquisition (trigger time, channel, nominal bits, etc.)
Excellent work. Thank you