This is with a T100MD + MD-HMI420
I would like to display a large number, maximum 999,999 on the display and am looking for a nice way to handle changing that number with the key pad. Since the DM[]'s only count to 65,xxx I need to break the number up to to DM[]'s
I have previously handled time and date by using a counter to keep track of which item is being edited. Then I use the KEY_1 to increment that counter. KEY_2 decrements the item, KEY_3 increments the item, and "Enter" saves the items. Some of these items are not real time, but date/time for an action, and are stored as DM[]'s. This works well.
For the large number, I plan to use 2 DM[]'s, one for the LSB 4 digits (thousands and less), and the other DM[] for 10 and 100 thousands. When the LSB one gets to 9,999, it would rollover to 0, and increment the other one.
For the changing or editing part:
1: Load all the pairs of digits into 3 counters , one for 10's and units, one for 100's and 1000's, and one for the 10,000's and 100,000's
2: A 4th counter (I have plenty unused available) would keep track of which counter is being changed. On the HMI, the edited digits would flash.
The actual editing routine uses subscripts, so you don't have lots of code, and handles under/overflow by incrementing the appropriate DM[] digit.
3: The 3 digit counters get loaded back into the 2 DM[]'s when "Enter" is pressed.
Looking for suggestions on an easier way. At this moment, just these thoughts are all that has been done.