Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    RepRap execution flow questions

    Scheduled Pinned Locked Moved
    Firmware developers
    3
    3
    271
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jazbaatbadalgayeundefined
      jazbaatbadalgaye
      last edited by jazbaatbadalgaye

      From my understanding this is how the firmware works :

      1. Read the move G codes (String Parser)

      2. Store basic moves in buffer

      3. ReadMove() reads all the moves stored in the buffer and performs segmentation

      4. Moves are put in the move queue where the move has acc, dec segments describing the DDA

      5. Input shaping

      6. Attach a DM to DDA for each set of local drive.

      7. Step time calculations are performed and total no of steps, initial direction, time of first step measured are calculated

      8. DMs are attached to DDA in a time step manner

      9. Interrupt is scheduled for the time at which the first step is required as indicated by the first DM

      10. ISR iterates through all the DMs at the start of the linked list and generates time steps for the due drives

      11. 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?

      albertshaoundefined dc42undefined 2 Replies Last reply Reply Quote 0
      • albertshaoundefined
        albertshao @jazbaatbadalgaye
        last edited by

        learning.

        1 Reply Last reply Reply Quote 0
        • dc42undefined
          dc42 administrators @jazbaatbadalgaye
          last edited by

          @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

          Duet WiFi hardware designer and firmware engineer
          Please do not ask me for Duet support via PM or email, use the forum
          http://www.escher3d.com, https://miscsolutions.wordpress.com

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA