Welcome! Log In Create A New Profile

Advanced

Help with modifying Marlin (specifically, controlling steppers)

Posted by borgey_ 
Help with modifying Marlin (specifically, controlling steppers)
April 22, 2021 08:49AM
Hello all

Very niche question about using some hardware in an unorthodox way

So I retired my I3 B a while back and have had the hardware lying around for ages which I am now using for a new project (Geetech GT2560 revision A board most importantly)

The hardware and software is perfect for this project, and while modifying the firmware I have gotten everything I need working well which would save me a bunch of time over having to reprogram it from scratch (Gcode file reading, temp control, fan control ect). Im virtually done with the program except for one issue that I cant figure out how marlin controls steppers, I only need very basic stepper movement and I cant make head or tail of the marlin stepper control code to use it for my own purposes. I decided to add the AccelStepper library to simplify things. It all works fine except for one issue, that I cant get the steppers to run properly, they are moving very slowly, like perhaps 1-3 rpm. I tried uploading just the stepper code without the marlin firmware, and same issue, so I thought it was a hardware issue. However when I added 2 0’s to the speed variable, the steppers started running normally, including accelerating and decelerating properly.

I thought I had fixed the issue, however this fix did not work in the marlin firmware and thats pretty much where I am at now.

Any ideas what may be causing this? Or alternately, a guide on how marlin controls steppers would also be useful, if such a thing exists.

For further info, the project I am making is controlled with Gcode files, however I am making my own codes for this specific project. There is nothing in marlin that can do what I need. Specifically, the project does the same few actions repeatedly, based on some variables collected in the g code file (which is less than 10 lines in total)


Any help would be greatly appreciated
rq3
Re: Help with modifying Marlin (specifically, controlling steppers)
April 22, 2021 07:44PM
I have no idea if this may be related to your issue, but Marlin jumps between mm/second and mm/minute, depending upon whether you're looking at configuration files or the underlying C++ code for a particular function.

Adding a couple of zeros to a mm/minute function might make a sluggish stepper wake up and move somewhat as expected?

Just my $0.02 worth.
VDX
Re: Help with modifying Marlin (specifically, controlling steppers)
April 23, 2021 12:41AM
... why not using Marlin "as is" and positioning the steppers with G-codes?

I'm using a 4-axes-Board with Marlin4Due as CNC-controller (only two Axes XY and the I/O's with M-codes to control the US-senders and feedback) in big industrial ultrasound-cleaners with up to 4m horizontal traveling range with a VB-program, where I'm simply sending strings like "G0 X2750 Z0; G1 Z380 F3000 " to move the basket to a specific position ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Sorry, only registered users may post in this forum.

Click here to login