Welcome! Log In Create A New Profile

Advanced

Step signals for Z motor

Posted by srinidhi 
Step signals for Z motor
October 03, 2022 02:20AM
I was viewing the step signals of Z motor on an oscilloscope and found that the signals were just of a 10 percent duty cycle and were very less in number compared to what the required steps per mm demanded. Anybody can guide me on where to look for the step signal generation source code of Marlin as I'd like to understand the logic behind it? I have gone through the header files in Marlin but I'm not able to grasp it.
Thanks in advance!
VDX
Re: Step signals for Z motor
October 03, 2022 03:22AM
... normally the stepper motors aren't driven by PWM, but are "flank-triggered" and the pulses are calculated for set speeds in the G-code vs. moving length.

The parameters in the config.h for the "steps per mm" value will define the amount of steps and the "frequency" will be calculated by the E-value in the G-code for the specific Z-length ...


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]
Re: Step signals for Z motor
October 03, 2022 05:00AM
Do you mean the F value?
Example: I'm giving a gcode of G1 Z10 F600
Speed = 600 mm/min
Assuming Steps per mm = 100
So total pulses = 100*10 = 1000
And frequency is 1/(10*100) Hz
Is this right?

Edited 1 time(s). Last edit at 10/03/2022 05:01AM by srinidhi.
VDX
Re: Step signals for Z motor
October 03, 2022 05:52AM
... oh, my fault! - jes, the F-value ... was to deep into extruder pulsing for the lasers eye rolling smiley

Forget "frequency"! - it's not a static pulsing, but every pulse/pause is calculated separately and contains acceleration/decceleration at begin/end too.

It's simply a relation of moving from one "step"-position to the next for the actual vector (only Z or XY+Z) -- so - regardless, how fast or slow the move is - the next pulse is not set for time, but for calculated 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