Virus scan in progress. Please wait to download attachments.
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.
Hardware and Software Requirements
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.
Steps to Implement or Execute Code
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.
Additional Information or References
Raw Open has Overwrite input
Raw added Polymorphic Write CAN Data, that can write a single frame, multiple frames to the same channel, or multiple frames to different channels.
Raw bug fix with ID mask of standard CAN frames when reading.
Bug fix with uncommon object types
Added IDs To Return filtering on the Raw Read function
Made reading more robust supporting other objects like System Variables in the BLF.
Added a secondary API for reading and writing using the OpenG zip utilities.
Added reading and writing CAN FD frames
When writing to a BLF the day light savings flag is used and will offset the write by an hour if necessary
Object Offset was removed and instead before every read the Object Offset is read from the session. This is used instead of tracking the current offset since it had issues with newer CANalyzer files
Bug fix with the Read CAN Frames.vi which now accepts reading CAN_MESSAGE2 which newer Vector tools may write to
Fixed Read CAN Frame.vi to return an ID masking out the 29 bits for extended, not 27
Back saved to 2014
Added CAN Channel input and output to the Read and Write functions