Note:
Sending a message to the printer is complicated to get it correct. An easier way is to create the message on the printer and then upload the message. Once you have the message uploaded, you can easily see all of the parts that make up the message. Then use the message download instruction.
Regards,
What are you trying to calculate the checksum on?
The example above is doing to the checksum for a string of 2 digit hex values.
I don't believe that the printer is accepting ascii-hex data. You should be sending a pure ascii string.
To do the checksum on that you just xor the ascii value of each character in the message and stick it on the end as another character. So if the XOR ends up as 65 then you will be putting an "A" at the end of the string.
43h = 0100 0011
01h = 0000 0001
XOR = 0100 0010
01h = 0000 0001
XOR = 0100 0011 = 42h
43 01 01 42 = C^A^AB
See https://www.rapidtables.com/convert/number/hex-to-ascii.html
Thx for your response and your time
i was calculate it in same way and get same result
then i was sent to printer but the printer didn't return any response
so i need to determine whate is wrong my command or the checksum
regards
Yes,Hey Ahmad, Have you been able to find a solution for this ?