Binary representation in watch window

For general Flowcode discussion that does not belong in the other sections.
Post Reply
User avatar
p.erasmus
Posts: 434
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Binary representation in watch window

Post 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
P1.jpg (29.5 KiB) Viewed 5469 times
Regards Peter - QME Electronics

Steve-Matrix
Matrix Staff
Posts: 1384
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 184 times
Been thanked: 322 times

Re: Binary representation in watch window

Post 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.

chipfryer27
Valued Contributor
Posts: 1313
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 317 times
Been thanked: 458 times

Re: Binary representation in watch window

Post 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

User avatar
p.erasmus
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: Binary representation in watch window

Post by p.erasmus »

Hi Chipfryer

Yes I also use a Converter on my Tablet when working with FC ,the reason I ask for this is that for more than 10 years I worked with MPLAB and in the watch window you can select DEC,HEX Bin etc or all at one time and view them in your IDE while inspecting debug results ,it is much more convenient and productive than typing backward and forward between different systems ,when the variable is updated all is updated at once :D

However for now it is the way it is and maybe in future this will be added and I will be happy ,FC has made a huge jump since V6 this product is getting better and better each and every release :D :D :D :D :D :D and more powerful 8-)
Regards Peter - QME Electronics

chipfryer27
Valued Contributor
Posts: 1313
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 317 times
Been thanked: 458 times

Re: Binary representation in watch window

Post 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

Steve-Matrix
Matrix Staff
Posts: 1384
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 184 times
Been thanked: 322 times

Re: Binary representation in watch window

Post 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).

User avatar
p.erasmus
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: Binary representation in watch window

Post by p.erasmus »

Steve,

Thank you this sounds great ,
Appreciated :D
Regards Peter - QME Electronics

Steve-Matrix
Matrix Staff
Posts: 1384
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 184 times
Been thanked: 322 times

Re: Binary representation in watch window

Post 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
var format suffixes.png (21.75 KiB) Viewed 4919 times

Post Reply