Creating Checksum Byte on PMU24

Hi,
I’m wanting to implement a checksum byte at the end of a message (byte7) that is the sum of all previous bytes (0-6) plus a constant 0x64.

The previous bytes are currently either numbers or tables.

I’m not actualy sure if I need the sum of the bytes of be 2’s compliment of the sum of the bytes, or if the bytes need to be XOR together, but I’m hoping to have some functions that could implement either.

I think you can use number for this and just add them.

As Greg wrote, if you need to sum bytes 0–6 and add a constant, then just use a number element. If you also need to perform XOR on them, we currently don’t have a solution for that.

However, we plan to introduce a much more advanced CANbus export feature in a few weeks, which will allow you to calculate checksums and more.

2 Likes

ok, great, looking forward to seeing that update.

If I can suggest too that it would be great to fill a byte with functions as individual bit values, and send that in the channel.

THere is [robably a way to do that already but right now it seems hard.