01-06-2025 11:09 AM
Hi, I am trying to implement a CRC-6 check for a Kubler encoder using LabVIEW. I've been there are 34 bits coming back from the sensor including multiturn bits, singleturn bits, status bits and CRC bits. These are used in the CRC calculation - see below. NOTE: There is no Lifecounter for my specific device so it can be ignored.
The 6 bit CRC is also transmitted inversely, which I am assuming means that I will need to do a "Bitwise NOT" operator on them:
I've taken the LabVIEW CRC calculation algorithm from the following post on this forum and modified so it fits a 6-bit CRC with initial value of 0x00 and a poly of 0x43: Solved: Re: Implementing CRC checksum CRC-8 with 0xFF initialization - Sensirion SHT85 - NI Communit...
I get the data from the sensor as a Boolean array which I then manipulate and convert into byte arrray to then feed into the algorithm - which if done correctly should output zero. Unfortunately, I don't seem to be getting zero when I do this.
A snippet of my code is shown below:
I have also attempted a Lookup Table implementation of the algorithm which uses the pre-computed LUT mentioned in the comment within the snippet. I have luck with neither implementation.
I would be grateful if someone can help me troubleshooting the code.
The sample code which I have taken from my sensor is the boolean array as follows. Where the first (bit "0") can be ignored/disregarded for the calculation.
Thanks 🙂
01-06-2025 11:25 AM
01-07-2025 04:06 AM
Here is the actual snippet of the code attached below saved as LV 2019.
Thanks!
01-10-2025 03:56 AM
Hi, I can provide more examples of the output from the sensor (in bits) if needs be.
01-10-2025 04:19 AM
The exact specification for the BISS CRC calculation can be found in this document: https://biss-interface.com/download/biss-an-3/