The equipment says that it takes 16 bit 2's complement format? So are you inputting a decimal to be changed to 16 bit to be input to the equipment or do you want to take a 16 bit from the equiment and convert it to decimal?
Does the documentation say anything about the FP standard used?
Could you quote the relevant part of the documentation verbatim?
There could be various ways of doing this, so it is easiest to find out how the system does it, otherwise one is just guessing.
Btw, I think you reference to two's complement might be an assumption on your part.
If the FP number is only 1 dp and there is no exponent, then I can see how using only 16 bit might work.
What happens if you read the value in as an ordinary float?
It might work if a C float stores it's exponent & associated sign at the end. I can't remember the exact format or which endianess is used - it's just a random idea. Although I have a vague idea that the mantissa sign came first, then the mantissa, then exponent sign, and exponent last.
If this is right any bits in excess of 16 might not matter. You might need to pad the value to be the same size as a float or double so you don't get type mismatch errors.
Any way this is all random speculation & could be totally wrong. As i said, best to find out exactly how it works.
> The documentation says the measurement in between +-1.2 and it is 2 Bytes.
> So I think +1.2 will be 0111 1111 1111 1111 and -1.2 will be 1111 1111 1111 1111.