# Function shut generate Xor Checksum over 4 variables

**URL:** <https://discourse.nodered.org/t/function-shut-generate-xor-checksum-over-4-variables/56353>\
**Category:** General\
**Created:** [9 January 2022 18:06 UTC](https://discourse.nodered.org/t/function-shut-generate-xor-checksum-over-4-variables/56353 "2022-01-09T18:06:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [9 January 2022 18:45 UTC](https://discourse.nodered.org/t/function-shut-generate-xor-checksum-over-4-variables/56353/2 "2022-01-09T18:45:11Z")

</div>

This post should put you on the right track...

> [@Have writing to a usb to RS-485 adapter working but how do I read back the response?](https://discourse.nodered.org/t/have-writing-to-a-usb-to-rs-485-adapter-working-but-how-do-i-read-back-the-response/29319/7):
>
> Hey something else i wrote slight_smile The value at the end of your strings and buffer examples look to be simple 8bit XOR BCC of everything proceeding it. BCC calculation... [{"id":"51480b90.640c84","type":"inject","z":"40758d1c.696554","name":"fake mqtt Set to end of line mode","topic":"","payload":"0201 0141 4000 0841 1E90 0000 0000 8203 45","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":390,"y":520,"wires":[["471f1a31.2f05d4"]]},{"id":"471f1a31.2f05d4","ty…

---

_[View the full topic](https://discourse.nodered.org/t/function-shut-generate-xor-checksum-over-4-variables/56353)._
