Serial device communication problems

I am running out of ideas:
I established a connection to a serial device (in this context via a console app, but that does not influence the problem).

By its (rather rudimentary) documentation, I can set device properties like this:

Send Command: #27’S’<highbyte><lowbyte>#13#10 Reply: ‘S 0 ’#13#10

So I am sending CHR(27) + “S”+chr(value/256)+chr(value And 255)+EndofLine.Windows to the serial.
And it replies indeed with a string like above. Only that the value it shows has the high byte always correct but not the low byte, for which I see no pattern.

Any words of advice? I tried literally everything now: Sending hex data (the device reply comes in hex), binary, decimal … with no success.

make sure you use CHRB not CHR

does it reply correctly using some other serial terminal app ?

…and, additionally: Make sure the documentation does not invert the bit order of Bitmap values just to confuse the developer … ;(

Thank you!