LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I open a LeCory .trc binary file in labview

We have several Lecory scopes witch create large binary files to save room on there hard drive. the files are .rtc. I would like to open these files using labview
0 Kudos
Message 1 of 8
(12,809 Views)

Hello,

LabVIEW does have the functionality to read binary files pretty easily.  You will, however, have to reverse-engineer the exact file structure before you can begin to get the data from the file.  I would recommend starting with an internet search, reading the documentation from the instrument, or contacting LeCory directly to do this.  Once you have the file structure figured out, you can use the binary file VIs to read the data.  These VIs are under the File IO palette ->Binary File VIs.  You can also find some example programs with Binary Files through the NI Example Finder (Help->Find Examples...).

Hope this helps!

Regards,

Travis M
Applications Engineer
National Instruments

Travis M
LabVIEW R&D
National Instruments
0 Kudos
Message 2 of 8
(12,788 Views)
What is the fastest? DIAdem or Labview? Iam thinking about open huge amounts of Lecroy.trc
 
0 Kudos
Message 3 of 8
(12,642 Views)

Hi BobDylan,

You can use LabVIEW if: 

1. You know the structure of your binary files
2. Have a fast CPU
3. Have a lot of RAM
4. Have small binary files (under 500MB)

In any other scenarios it is better to use DIAdem. DIAdem requires Data Plugins that can be found at www.ni.com/dataplugins

If you cannot find a plugin for your file type, then you have to write your own. DIAdem data plugins are written in VB script. Luckily for you, I was able to find a data plugin for LeCroy devices directly from our R&D department. Download the attached file, double-click on it to register it with your OS, open up DIAdem, and then open your data file.

Hope that helps!

Kalin T.
0 Kudos
Message 4 of 8
(12,616 Views)

Just to clarify Kalin's remarks -- you CAN use LabVIEW to read these files regardless of the processor speed or ram of your system!!  However, the performance of File IO programs varies greatly depending on your program requirements and the program design you choose to implement those requirements (such as decisions like “do I read in the entire file into memory, or just parts?”).  Kalin will be happy to give you more details on that if you are interested.

Thanks, and let us know if you have questions as you go!

Travis M
LabVIEW R&D
National Instruments
0 Kudos
Message 5 of 8
(12,611 Views)
Alan from LeCroy Tech Support here...
 
Attached is a decode I put together, mostly using code from the lcwave driver. The VI will read a binary file, and return the voltage array, horizontal offset (aka "t0") and the horizontal interval (dt), among other things. It'll handle both BYTE and WORD mode files, as well as hi-Lo and Lo-Hi byte ordering.
 
If what you are needing is a tool to decode a large number of files that already exist, then all you need to do is use the "Batch Waveform Conversion" feature of LeCroy's ScopeExplorer application. This is available at http://www.lecroy.com/tm/Library/Software/home.asp?menuid=8. This will convert all trc files in a folder to ASCII with columns for time and voltage.
 
If instead you are needing to decode files so that you can then analyze the data, then the attached VI or the diadem plug in is certainly a better solution. I couldn't tell you which is faster...
 
Feel free to contact me directly if you have any questions!
 
Best Regards,
Alan
--------------------

Alan Blankman, Software Engineer
Teledyne LeCroy
800-425-2000
http://www.teledynelecroy.com
alan.blankman@teledyne.com
Message 6 of 8
(12,607 Views)

Following on from Alan's post and with his help, I created this 6.1 VI to decode .trc files from our Wavemaster. Input is a .trc file. Output is a XY array (and number of points, a string describing the time/date in UK format, and the time/date cluster).

 

Graham

0 Kudos
Message 7 of 8
(11,330 Views)

Alan from LeCroy Tech Support here... The attachments in this document replace the ones from my previous post.  A customer kindly alerted me to the fact that the offset was being applied in the wrong direction.  This is also the case in "trace decode.vi", posted by G Marshall.

 

I also modifed "decode waveform from file" to use String Subset rather than Scan String.  This post includes a later version of the subvi used by "Decode waveform from file".

 

Best Regards,

Alan

--------------------

Alan Blankman, Software Engineer
Teledyne LeCroy
800-425-2000
http://www.teledynelecroy.com
alan.blankman@teledyne.com
Download All
Message 8 of 8
(10,284 Views)