When I concatenate 2 strings in "hex Display" the result is what I want. When concatenate a [decimal number converted to a Hex] with [a string in "Hex display"] the results is very different. Attached code shows the 2 cases. In my code, why is "LDD_Command 2" different than "LDD_Command"? Thanks.
When you convert numeric to Hex string, it gives string in normal representation (LDD_input indicator). You display it in the string with Hex representation (second part of LDD command 2), they are not equal.
If I got you right, you need to display data (0CCD is hex for 3277=u16(1/20*65535). So you need to have data with string representation - data should not change, only the way you display them should. This is done with the type cast.