If I have a HEX Value of 0B and I want to show that as a string, the leading 0 is droped, i.e. the output is "B" when converted to a string.
How would you suggest to make a HEX value of 0B print as "0B"?
I do it now by checking if the value of the HEX is less than 16, then adda "0" to it.
if(InstNumber <= 15)
sInsert = "0"+ItoHex(InstNumber);
but I feel that is a bit arcane.
EDIT
I think I found the answer, MakeString()
EDIT EDIT
MakeString will work
Forgot that I can pad the values so anything resulting in a single character will get padded with a leading "0".
MakeString(To_Device$,":X19%04X68N%02X%02X%02X%02X%02X%02X%02X%02X;\n",PGN,i_Byte[1],i_Byte[2],i_Byte[3],i_Byte[4],i_Byte[5],i_Byte[6],i_Byte[7],i_Byte[8]);