To download NI software, including the products shown below, visit ni.com/downloads.
Read and write BLF binary files using the Vector provided DLL, or a more Raw API using the zLib Inflate/Deflate.
Vector has a custom binary file format used primarily for logging raw CAN data. When using a Vector product such as CANalyzer, a log can be done in ASCII which baloons the file size but has the most compatibility, or you can log in BLF which is a small binary file, which also has some level of object compression built in. With this API you can now read these BLF files and get the raw CAN frames in a form that is similar to the XNet frame structure, allowing for easy conversion using the XNet API. You can also use this API to perform the reverse function. Where you may want to log into a BLF file, so that Vector tools like CANalyzer can analyze and view your data.
All the core functions are implemented by calling the Vector provided DLL, which is documented online and has a shipped example installed with CANalyzer. There is an alternate API that also allows for reading and writing BLF files by not using the Vector DLL and instead uses the OpenG zip utility.
Back saved into LabVIEW 2014 (version 2) or LabVIEW 2017 for version 3, and requires the Windows platform for executing the binlog.dll. Version 8 is saved in 2018 and has an example of both the DLL version and the Raw version which requires the OpenG zip package. The OpenG zip method works on all platforms that API supports, and is much faster than the DLL method.
The external dependencies are referenced with the Package Dependency.vipc file. Once those packages are installed through VIPM, open either of the examples and run them to write and read a file.
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.