Hi.
How to simply put on label the Hex value of a Bit32 DPE?
How to visualize Hex Value of a BIT32
Search
-
laurent.brugeaud
- Posts: 12
- Joined: Fri Nov 24, 2017 10:43 am
- RudiKreiner
- Posts: 198
- Joined: Mon May 16, 2011 2:10 pm
Re: How to visualize Hex Value of a BIT32
Not exactly sure what you really mean, but if you want to display a bit32 value as a hex number, you can do it with this code, where DP_NAME is a string containing the name of your datapoint.
dpSetFormat(DP_NAME, "0X%04x");
bit32 value;
dpGet(DP_NAME, value);
DebugN(dpValToString(DP_NAME, value));
Be aware that the format displayed in the common config the datapoint in para will look strange though, and don't try to change it there.
dpSetFormat(DP_NAME, "0X%04x");
bit32 value;
dpGet(DP_NAME, value);
DebugN(dpValToString(DP_NAME, value));
Be aware that the format displayed in the common config the datapoint in para will look strange though, and don't try to change it there.
-
laurent.brugeaud
- Posts: 12
- Joined: Fri Nov 24, 2017 10:43 am
Re: How to visualize Hex Value of a BIT32
Thanks you Rudi. It work well.