Hexview in myDatanet for a field in the data structure

Hello Community,

is it possible to format a field, to view the value of it as a hex value? In my case, I read out the serial number of a OneWire Sensor in 8 u8 fields and it would be nice to see them in hex instead of decimal.


Hello @stegmaf,

how does your Data Descriptor look like right now? Is it 8 individual bytes or an array? There are two ways to display a value in hex. You can use:

Sn_byte_0    u8   decpl=-1 editmask=%2.2x
Sn_byte_1    u8   decpl=-1 editmask=%2.2x

Sn_byte_7    u8   decpl=-1 editmask=%2.2x

“decpl=-1” disables automatic formatting
“%2.2x” means 2 characters long and encoded in hex

If your data type is u16 you have to use %4.4x.
For u32 use %8.8x


Sn_byte_0    bin.1
Sn_byte_1    bin.1

Sn_byte_7    bin.1

“bin.1” means the variable occupies one byte

Kind regards

Hello @Josef,

thanks for your response I changed the data descriptor to following, here an example for serial sensor 0:

SerialB0S0 u8 title=SerialB0S0 alias=SerialB0S0 decpl=-1 editmask=%2.2x byteofs=0x10 edit=8
SerialB1S0 u8 title=SerialB1S0 alias=SerialB1S0 decpl=-1 editmask=%2.2x byteofs=0x11 edit=8
SerialB2S0 u8 title=SerialB2S0 alias=SerialB2S0 decpl=-1 editmask=%2.2x byteofs=0x12 edit=8
SerialB3S0 u8 title=SerialB3S0 alias=SerialB3S0 decpl=-1 editmask=%2.2x byteofs=0x13 edit=8
SerialB4S0 u8 title=SerialB4S0 alias=SerialB4S0 decpl=-1 editmask=%2.2x byteofs=0x14 edit=8
SerialB5S0 u8 title=SerialB5S0 alias=SerialB5S0 decpl=-1 editmask=%2.2x byteofs=0x15 edit=8
SerialB6S0 u8 title=SerialB6S0 alias=SerialB6S0 decpl=-1 editmask=%2.2x byteofs=0x16 edit=8
SerialB7S0 u8 title=SerialB7S0 alias=SerialB7S0 decpl=-1 editmask=%2.2x byteofs=0x17 edit=8

But it doesn’t work for me, as soon as I implement the “editmask=%2.2x”, the values are not shown anymore.

SerialB0S0 bin.1 title=SerialB0S0 alias=SerialB0S0 byteofs=0x10 edit=8
SerialB1S0 bin.1 title=SerialB1S0 alias=SerialB1S0 byteofs=0x11 edit=8
SerialB2S0 bin.1 title=SerialB2S0 alias=SerialB2S0 byteofs=0x12 edit=8
SerialB3S0 bin.1 title=SerialB3S0 alias=SerialB3S0 byteofs=0x13 edit=8
SerialB4S0 bin.1 title=SerialB4S0 alias=SerialB4S0 byteofs=0x14 edit=8
SerialB5S0 bin.1 title=SerialB5S0 alias=SerialB5S0 byteofs=0x15 edit=8
SerialB6S0 bin.1 title=SerialB6S0 alias=SerialB6S0 byteofs=0x16 edit=8
SerialB7S0 bin.1 title=SerialB7S0 alias=SerialB7S0 byteofs=0x17 edit=8



Hello @stegmaf,

I noticed that there are ways to simplify your data descriptor

  • if you are using the rapidM2M Studio, you no longer needed the “byteof”. This is calculated automatically.
  • Also the “alias” you no longer need because the label with which the line starts is already the alias.
  • You only need the “title” if you want to use a different label than the “alias” in the surface of the rapidM2M Portal

If you are still familiar with the old xml notation of the data descriptor, you can open the dde.xml file under “Deploy” and see the effects of your changes. If “the old xml notation” doesn’t tell you anything, forget this hint and leave the dde.xml file closed :wink:

Kind regards