Dear Dojo Community,
Currently, I am developing a connector of the serial type.
Goal
In the documentation, the CRC check that is needed is explained like this:
There are also two examples included in the documentation, on which I indicated the CRC-part:
Current Code
What I tried to develop this was a CRC-param of type 'exor' and built the two sample messages:
- The CRC-params:
- The commands:
Result
This did not get me the wanted result. It seems that I need an extra conversion to get the CRC-result in the format the device expects.
Workarounds
For the fixed commands that needs to be sent, I could hardcode the needed bytes. And for the responses, I could do a check via a QAction to verify if the response was correctly transmitted.
Question
Is there a way to achieve the wanted result without having to use this workarounds? I searched for an option in the documentation of the CRC-param, but did not find an option that could help me.
Hi Joachim, could you please try with <RawType>numeric text</RawType> instead of <RawType>unsigned number</RawType>. At the bottom of the following page, there is an example that does exactly what you want. There 6D is being converted to 0x3644 in the data.
Hi Tom, thank you very much for the solution and the link to the detailed documentation page. I confirm that this worked for me. 🙂