From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-15-2020 03:19 AM
Hi all,
I have a requirement to convert a .BLF generated by Vector CANalyzer to ASCII(.asc) with the help of LabVIEW.
I have used below Hoovah library to read BLF file, but I am not sure how to write a code to parse the data read and save it in ASCII format in .asc file
https://forums.ni.com/t5/Example-Code/Read-and-Write-BLF-Files/ta-p/3549766?profile.language=en
I have been searching a lot on the discussion forums, but there is nothing that is helping me out.
Can anyone post sample code here?
It would be really helpful
Solved! Go to Solution.
09-15-2020 10:15 AM
ASCII is just a convention that assigns characters to bytes.
What kind of output do you want, just human readable formatted and delimited text? You can give any extension you want to it. If other software later needs to be able to read the file, you need to know what it expects.
09-15-2020 11:19 AM
Hi Altenbach,
After reading a BLF file using Hoovah library I get a data in array of clusters format as shown in Screenshot1. I need to write that data in an .asc file in a format as shown in Screenshot2.
I am using write to text file function to achieve this . But I am not getting how can I write all the data row-wise in to a single file . Please find my VI attached herewith wherein I can just write the payload in the file. But along with that I need to write timestamp, ID, etc also column wise as shown in screenshot2. My VI is in LV2020.
Kindly guide.
09-15-2020 01:50 PM - edited 09-15-2020 01:51 PM
You did not include your type definitions.
All you probably need to do is open the output file before the loop, format each array element into a row, and append to the file. Close the file once the loop is done.
(btw: your array to path makes no sense. Typical filename inputs are just strings, so wire it directly)
09-15-2020 02:18 PM - edited 09-15-2020 02:21 PM
I really don't know how all your cluster element relate to each field in the output string, so here's a quick draft as a starting point. Just add all your other fields to the formatting operation as required. Should be trivial.
You can use "format into file" to append.inside the loop.
09-17-2020 09:08 AM
Thanks Altenbach. It worked!! 🙂
11-08-2021 02:39 AM
it shows me that ZLIB Inflate_ogtk.vi is missing
11-08-2021 06:26 AM