Page 1 of 1
Binary representation in watch window
Posted: Tue Mar 02, 2021 2:01 pm
by p.erasmus
Hi Team.
What would be a nice feature for myself at least in FC would be if the watch window can display the Hex and Binary number and select able as the dec or hex is currently in the window,
May be is is already there that I am not aware of it ,

- P1.jpg (29.5 KiB) Viewed 8122 times
Re: Binary representation in watch window
Posted: Tue Mar 02, 2021 5:09 pm
by Steve-Matrix
I don't think there's a way to do it at the moment, but it's a good idea and I will add it to the list.
Re: Binary representation in watch window
Posted: Tue Mar 02, 2021 6:35 pm
by chipfryer27
Hi
I too think it would be a nice selectable feature to change the format.
Meanwhile there are many calculators out there for both on and offline conversion. My favourite is Dec Hex Bin ASCII Converter (by Colly Dog Code), available from the Google Play store. As you enter a value in any of the formats it automatically displays the value in all other. Usually I have it running on an old phone when I mess with RS232 / UART for easy ASCII / Hex conversion (just like a very handy calculator sitting nearby).
Regards
Re: Binary representation in watch window
Posted: Tue Mar 02, 2021 7:49 pm
by p.erasmus
Re: Binary representation in watch window
Posted: Wed Mar 03, 2021 6:47 pm
by chipfryer27
Hi
I definitely agree there are good improvements in each version, although some can take a bit of "adjusting" to <s>. I started with V3 and I've still got an old combo-board with the BT-plug connections kicking around. Museum piece perhaps? <s>
Regards
Re: Binary representation in watch window
Posted: Thu Jun 24, 2021 4:40 pm
by Steve-Matrix
To update you on this, the next release (maybe next month?) will allow you to add a suffix after variables in the watch window. This will allow integer variables to be displayed as decimal, hex or binary. Also, float variables can optionally be displayed in standard form (e.g. 1.23e+13).
Re: Binary representation in watch window
Posted: Thu Jun 24, 2021 4:58 pm
by p.erasmus
Steve,
Thank you this sounds great ,
Appreciated

Re: Binary representation in watch window
Posted: Tue Jul 27, 2021 3:17 pm
by Steve-Matrix
The v9.2 update has now been released and includes format overrides for variables in the Simulation Debugger watch window. These can be added by adding a suffix after the variable within the watch window entry (for example, "my_var,b" will display that variable's value in binary).
The supported formats are:
- ,d - decimal
- ,h - hexadecimal (lowercase)
- ,H - hexadecimal (uppercase)
- ,b - binary
- ,e - standard form
Standard form is only supported for floating point variables, and the other formats are only supported for integer variables.
These suffixes only work with single variables; expressions and arrays are not currently supported. Variables and expressions without the suffix will be displayed using the default settings.
Integer variables can have their values altered in the watch window using decimal, hex and binary representations. Floating point values can only be entered using their default decimal format (e.g. 0.00234).

- var format suffixes.png (21.75 KiB) Viewed 7572 times