Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:57 02 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : ArmmiteH7 V5.07.00b6 - Major performance hike

     Page 2 of 3    
Author Message
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1882
Posted: 10:31am 26 Apr 2021
Copy link to clipboard 
Print this post

Yes, I was thinking the same thing, a lot of mine are constants, I either hand code the values into the GUI controls and make it very hard to read and add a lot of comments to try and overcome the readability.

Mike.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 10:33am 26 Apr 2021
Copy link to clipboard 
Print this post

Constants are simply variables that can't be written so add to the count
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1882
Posted: 11:16pm 26 Apr 2021
Copy link to clipboard 
Print this post

I spent 10 minutes doing a global replace of 81 Constants in the CODE with numerical values. EDIT There were 263 Global variables + 316 Constants, way over the new 512 limit. Now total Global variables (includes Constants) = 485, so under the new 512 limit.

The Program now runs perfectly    

Speed difference is amazing, and NO !! it has nothing to do with replacing Variables with a value and speeding up variable lookup, these Constants were GUI Menu buttons only.  

My program has a built in selectable timing test for the critical Digital scale clock and decode procedures, along with total idle loop time when not handling an Automation task.

This is for the H7Z1, The H7Z2 at 480 Mhz is even faster but I haven't set that up yet. The averaging is for Scale position value smoothing on the 9" LCD to stop last digit fast hunting.  


               Z1 400 Mhz old firmware

   Read decode Digital Scale = 6.27ms    
+ Display position on screen = 8.75ms   No averaging
+ Display position on screen = 6.49ms   X 6 averaging  
        Total idle Loop Time = 18.42ms  No averaging
        Total idle Loop Time = 13.89ms  x 6 averaging

              Z1 400Mhz Latest firmware

   Read decode Digital Scale = 1.78ms    
+ Display position on screen = 3.89ms  No averaging
+ Display position on screen = 1.82ms  X 6 averaging  
        Total idle Loop Time = 8.28ms  No averaging
        Total idle Loop Time = 4.14ms  x 6 averaging



EDIT measured H72 @ 480Mhz


___________Old FM V5.5.3________________

   Read decode Digital Scale = 5.4ms    
+ Display position on screen = 7.39ms   No averaging
+ Display position on screen = 5.48ms   X 6 averaging  
        Total idle Loop Time = 15.49ms  No averaging
        Total idle Loop Time = 11.70ms  x 6 averaging

_______PRE CMM2 Token V5.07.00b3_______

   Read decode Digital Scale = 4.24ms    
+ Display position on screen = 6.43ms  No averaging
+ Display position on screen = 4.63ms  X 6 averaging  
        Total idle Loop Time = 13.3ms  No averaging
        Total idle Loop Time = 9.70ms  x 6 averaging

__________Last FW V5.07.00b7____________

   Read decode Digital Scale = 1.42ms    
+ Display position on screen = 3.26ms  No averaging
+ Display position on screen = 1.52ms  X 6 averaging  
        Total idle Loop Time = 6.9ms   No averaging
        Total idle Loop Time = 3.45ms  x 6 averaging



Mike.
.
Edited 2021-04-27 13:55 by KeepIS
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1882
Posted: 04:46am 27 Apr 2021
Copy link to clipboard 
Print this post

Just out of curiosity, the following code used to work on all previous versions of MM.Basic I've used on the H7, I think it still worked on the version prior to the latest optimisation. Just tested on the Workshop Unit still running version 5.0511, it works perfectly.


 if MM.Info(PIN 132)="Unused" Then
   Const BeepPort=132
   SetPin BeepPort,Dout
   Pin(Beeport)=0
   Const C_NoBeep=0
 Else
   Const C_NoBeep=1
 Endif


Previously when you exited the program and restarted it, the PIN showed "Unused" each time, unless it was set as part of the "OPTION Touch" command.

On the latest version FW it runs one time only, then shows "In Use" if the program exits and is run again, stays "In Use" until a reset or power cycle.

Was this an unintentional behaviour of the previous versions? either way makes no difference to me as it's an easy workaround.

Just that any PIN set in the program will return "In Use" after program exit, and the PIN will remain "In Use" until a reset / restart of the unit.  

Mike.
.
Edited 2021-04-27 15:07 by KeepIS
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 07:07am 27 Apr 2021
Copy link to clipboard 
Print this post

  Quote  Was this an unintentional behaviour of the previous versions? either way makes no difference to me as it's an easy workaround.


Sorry - I patched something out for testing and forgot to re-instate


ArmmiteH7V5.07.00b9.zip

  Quote  Speed difference is amazing


Excellent news. The old sequential search for variables will really hit performance when you have a lot of variables however cleverly you organise them
Edited 2021-04-27 17:11 by matherp
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1882
Posted: 07:59am 27 Apr 2021
Copy link to clipboard 
Print this post

Thanks, H7V5.07.00b9 appears to be perfect now  

Mike.
.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 11:01am 27 Apr 2021
Copy link to clipboard 
Print this post

ArmmiteH7V5.07.00b10.zip

Fixes bug in triangle drawing routine that was impacting gui object deletion
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1882
Posted: 08:27pm 27 Apr 2021
Copy link to clipboard 
Print this post

  matherp said  ArmmiteH7V5.07.00b10.zip

Fixes bug in triangle drawing routine that was impacting gui object deletion


Thanks - GUI is now 100% for me and I'm using just about every GUI in MM.Basic.

Mike.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1882
Posted: 04:05am 28 Apr 2021
Copy link to clipboard 
Print this post

OPTION KEYBOARD REPEAT setting is not showing up in the OPTION LIST after setting it, should it?

On another positive note, I notice this version of the Firmware has made the H7I2 keyboard really solid compared to the the old firmware, the v1 H7 was fine and still is.

Many thanks for that.

Mike.
.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 07:29am 28 Apr 2021
Copy link to clipboard 
Print this post

ArmmiteH7V5.07.00b11.zip

Includes keyboard repeat rate in option list if non-standard (600,150)
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1882
Posted: 08:13am 28 Apr 2021
Copy link to clipboard 
Print this post

Thanks now I know if I've set it or not

One last question, I can't remember if there was a reason for not being able to continuously PAGE DOWN (holding the key down) in the Editor? At the moment I have to continuously press the "page down" key as fast as I can, lots of key pressing in a larger program.

I kind of remember it being mentioned in the CMM2?

Mike.
.
Edited 2021-04-28 18:18 by KeepIS
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 08:20am 28 Apr 2021
Copy link to clipboard 
Print this post

  Quote  On last question, I can't remember if there was a reason for not being able to continuously PAGE DOWN (holding the key down) in the Editor? At the moment I have to continuously press the "page down" key as fast as I can, lots of key pressing in a larger program.


The problem is that paging down takes time and key repeats can stack up in the keyboard buffer so that when you release the key the paging may continue for some time. The consensus was that this was worse than having to press for each page
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1882
Posted: 08:31am 28 Apr 2021
Copy link to clipboard 
Print this post

I see, I used to press it down for a few pages and then release and repeat to overcome that. It's a shame the key repeat rate couldn't have been slowed on page down / up key press, but it is what is and there is only so much you can do, thanks for verifying it for me.

Once again, thanks for the fantastic effort with the H7 rewrite, it is now running better than I could have hoped for, just rapped with it.

Mike.
.
Edited 2021-04-28 18:32 by KeepIS
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1882
Posted: 04:55am 29 Apr 2021
Copy link to clipboard 
Print this post

Problem with OPTION AUTORUN ON / OFF, Ver 5.07.00b11

1: Locks the USB Keyboard most times when issued, either from the USB Keyboard and SOMETIMES the from the Terminal program, sometimes locks coms to the Terminal program (no response to any input).

2: Can break out of coms lock-up with a series of ctrl-C from the Terminal program, cannot break out with the USB KB.

Once powered off and on, the Autorun setting is usually set as requested from the terminal pgm, but not always via the USB KB.

I waited for a response for over a minute after issuing the Option command.

Mike.
.
Edited 2021-04-29 15:06 by KeepIS
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 07:39am 29 Apr 2021
Copy link to clipboard 
Print this post

ArmmiteH7V5.07.00b12.zip

Fixes bug in setting options using the usb keyboard
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1882
Posted: 07:52am 29 Apr 2021
Copy link to clipboard 
Print this post

Thank you, all good now.

Mike.
.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 11:46am 29 Apr 2021
Copy link to clipboard 
Print this post

  KeepIS said  Thank you, all good now.

Mike.
.


Many thanks to you too Mike, for putting the H7 through the wringer. I don't use these features so it's great to have you around.

H7 is awesome....Geoff and Pete really ought to be showing this thing to the likes of Siemens  
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1882
Posted: 12:30am 30 Apr 2021
Copy link to clipboard 
Print this post

Apology for going slightly off topic here:

  Tinine said  
Many thanks to you too Mike, for putting the H7 through the wringer. I don't use these features so it's great to have you around.

H7 is awesome....Geoff and Pete really ought to be showing this thing to the likes of Siemens  


Thanks, I could not agree with you more on the amazing effort and dedication that Peter and Geoff have shown and put in over the years, just to give us this fabulous hardware and programming experience.

It's been a pleasure to test Peters rewrite / upgrade for the H7 and Geoffs upgrades to the MMBasic core, especially in light of the speed improvements.

The figures I posted might not look like much, but when you consider these two speed changes below:

Clock and Decode the linear scale pins and Display the position on screen with  6 X averaging for the LCD display.

Old Firmware: 5.48ms  
New Firmware: 1.52ms


The "read/decode pin" code is called continuously when the 3HP Cutter and Fence (galley) are moving and preforming an automated cutting process, so that speed difference is huge to this application. The 3rd axis is a manual sled with on screen traffic lights telling you when to move the sled from one end stop sensor to the other, and when you consider the safety (calculating cutter movement limits for a given linear motion), various error checking, interlock monitoring, limit sensor and manual override control scanning, along with speed control and stepper motor ramping and real time display, and all being controlled by the H7 with no external processing of any kind, it's pretty dam impressive what this H7 and MMBasic firmware can do, well it is to me at least and I'm sure you would agree.

Mike.
.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 09:07am 08 Jun 2021
Copy link to clipboard 
Print this post

ArmmiteH7V5.07.00b13.zip

Improves the timing of the pause command

Hopefully fixes a strange interrupt issue with flac playback (and probably wav and mp3)
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1882
Posted: 10:38pm 08 Jun 2021
Copy link to clipboard 
Print this post

Thanks for working on an update, it's better, but randomly so. I've posted the results on the thread I initially made for the Pause issue as I don't want to double post and waste thread space here.

Mike.
 
Pause thread

Update

Just loaded the main applications, the PAUSE command is now hunting up to 3 milliseconds on each pass.

As a test I divided the Pause delay value by 6 and used 6 concretive pause commands, this keeps the possible highest value of each Pause to 1ms, the variation is now under 10us on each pass.    

.
Edited 2021-06-09 09:31 by KeepIS
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
     Page 2 of 3    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025