Welcome! Log In Create A New Profile

Advanced

Marlin 32bit high step_rate

Posted by Wurstnase 
Marlin 32bit high step_rate
December 22, 2014 07:46PM
Hi,

I want to give Marlin from bobc a try. My problem at the moment is, i can't run 65536 steps/s and above.

My last try stoped at 320step/mm and 12287mm/min. 12288mm/min doesn't work.
An Arduino Due should run at 16875mm/min and faster. More than 90.000Hz.

Any idea where I can search for it, or how I can solve this?

~
Nico

Edited 1 time(s). Last edit at 12/23/2014 04:00AM by Wurstnase.


Triffid Hunter's Calibration Guide --> X <-- Drill for new Monitor Most important Gcode.
Re: Marlin 32bit
December 23, 2014 01:21AM
Maybe it's enough to set the step_rate to unsigned long?!?
I will test it.

stepper.cpp
260 FORCE_INLINE unsigned long calc_timer(unsigned short step_rate) { 
261   unsigned long timer; 
262   if(step_rate > MAX_STEP_FREQUENCY) step_rate = MAX_STEP_FREQUENCY; 
263  
264   if(step_rate > 20000) { // If steprate > 20kHz >> step 4 times 
265     step_rate = (step_rate >> 2); 
266     step_loops = 4; 
267   } 
268   else if(step_rate > 10000) { // If steprate > 10kHz >> step 2 times 
269     step_rate = (step_rate >> 1); 
270     step_loops = 2; 
271   } 
272   else { 
273     step_loops = 1; 
274   }


Triffid Hunter's Calibration Guide --> X <-- Drill for new Monitor Most important Gcode.
Re: Marlin 32bit high step_rate
December 23, 2014 01:20PM
Not that easy as it seems...


Triffid Hunter's Calibration Guide --> X <-- Drill for new Monitor Most important Gcode.
Re: Marlin 32bit high step_rate
December 24, 2014 05:01AM
Marlin isn't really designed for 32-bit processors, unless someone has done a 32-bit fork of it. You would be better off using software intended for 32 bits, such as RepRapFirmware or Smoothieware.

If changing the step rate variables to unsigned long is too hard, perhaps you can change the Marlin code so that all the step rate variables actually hold half the required step rate.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Marlin 32bit high step_rate
December 24, 2014 08:57AM
You didn't say what hardware you were running. If you are running RADDS or RAMPS-FD, you may find Repetier's Due support is a little bit more mature and well-supported compared with bobc's Marlin fork.....
Re: Marlin 32bit high step_rate
December 25, 2014 02:08PM
Well, I use RADDS with RAPS128-stepper driver.
Repetier works ok but I have some issues with the temperature so i tried to use bobc-Marlin. But Marlin is actual hardlimited to 16bit-steprates.


Triffid Hunter's Calibration Guide --> X <-- Drill for new Monitor Most important Gcode.
Re: Marlin 32bit high step_rate
March 10, 2015 11:06AM
Not anymore! I've solved several issues.
Marlin4Due runs now as fast as Repetier. 96.000 steps/s!

Also i've ported the complete new features of Marlin to the 32bit-repro.

Todo:
  • pins.h for other hardware than RADDS
  • watchdog
  • some other stuff like fast pwm for fans

Try it smiling smiley
Marlin4Due

New features will follow with Marlin8bit.


Triffid Hunter's Calibration Guide --> X <-- Drill for new Monitor Most important Gcode.
Re: Marlin 32bit high step_rate
March 10, 2015 09:54PM
Nice job, well done! I'll be trying it on an Arduino Due + hacked RAMPS combo I am putting together to drive my experimental delta.
I am using DRV8825 with 1/32 microstepping on the hacked RAMPS.

Do you use Eclipse or the Arduino IDE for compiling? And what do you use to upload the firmware to the Due?
Re: Marlin 32bit high step_rate
March 11, 2015 04:01AM
I use Notepad++ for most parts. And upload it then with the Arduino IDE.

I started to install everything for Eclipse but never finished it.


Triffid Hunter's Calibration Guide --> X <-- Drill for new Monitor Most important Gcode.
Re: Marlin 32bit high step_rate
March 11, 2015 05:47AM
OK, thank, I'll test with the Arduino IDE then.

Keep on the good work,
Cheers,
Andrew
Re: Marlin 32bit high step_rate
March 24, 2015 11:30AM
Does the RAMPS 1.4 will be directly compatible with the Arduino Due board?
I'd like to give this a try.
Re: Marlin 32bit high step_rate
March 24, 2015 01:14PM
No, the Due can only handle 3.3V. Take a look here [forums.reprap.org]


Triffid Hunter's Calibration Guide --> X <-- Drill for new Monitor Most important Gcode.
Sorry, only registered users may post in this forum.

Click here to login