RepRap execution flow questions
-
From my understanding this is how the firmware works :
-
Read the move G codes (String Parser)
-
Store basic moves in buffer
-
ReadMove() reads all the moves stored in the buffer and performs segmentation
-
Moves are put in the move queue where the move has acc, dec segments describing the DDA
-
Input shaping
-
Attach a DM to DDA for each set of local drive.
-
Step time calculations are performed and total no of steps, initial direction, time of first step measured are calculated
-
DMs are attached to DDA in a time step manner
-
Interrupt is scheduled for the time at which the first step is required as indicated by the first DM
-
ISR iterates through all the DMs at the start of the linked list and generates time steps for the due drives
-
For each of those DMs, the next step due time is calculated and inserts them in correct place to maintain the step time order of the linked list
Q1. Assuming cartesian printer having axes X Y Z, what is a single move and how many DMs will be associated with each DDA? i.e. for a move eg G0 X4 Y4 Z3 will there be 3 DMs associated with the DDA? I am led to believe so due to the following statement :
For each DM the total number of steps, initial direction, and time of the first step measured from the move start time are calculated
Why will there be multiple dms for a single move if my above interpretation is incorrect?
Q2. What does
ISR iterates through the DMs at the start of the linked list
mean in the following statement?When the interrupt occurs, the ISR iterates through the DMs at the start of the linked list to identify the ones for which a step is due or almost due
Does it mean that ISR will iterate through all the DMs associated with the current DDA? i.e. for a move G0 X4 Y4 Z9, the ISR will iterate through the X,Y and Z DMs and arrange them in step time order?
-
-
learning.
-
@jazbaatbadalgaye I'm sorry I missed this when you first posted it.
A1. There is one DM for each axis or extruder that is moving. Each DM controls one motor (or one set of motors that all move together).
A2. It will iterate through the DMs in the linked list until it finds one for which the next step isn't due or almost due. Then it stops, because any remaining DMs in the list can't be due either.
HTH David