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

    Understanding CAN-FD Message Structures

    Scheduled Pinned Locked Moved
    General Discussion
    toolboard can bus duet 3 hc6
    4
    12
    664
    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.
    • nhofundefined
      nhof
      last edited by nhof

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators
        last edited by

        See https://github.com/Duet3D/CANlib/blob/master/doc/Duet 3 CAN protocol.odt for an overview.

        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
        • crispusundefined
          crispus
          last edited by

          Thank you, this is exactly what I needed.

          Best Regards,

          Christian

          1 Reply Last reply Reply Quote 0
          • crispusundefined
            crispus
            last edited by crispus

            @dc42 Thanks again for your help, I have made good progress based on the information that you shared.

            May I ask a follow up question?

            When I receive timeSync messages (type 30) I am only seeing 64 bits, enough to unpack 'timeSent' and 'lastTimeSent'. I was expecting another 64 bits containing 'lastTimeAcknowledgeDelay' and 'realTime' but never see them. Is this expected or do I need to start investigating where the other 64 bits have gone?

            Many Thanks,

            Christian

            Edit: oops - Corrected 64 bytes to 64 bits

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

              @crispus said in Understanding CAN-FD Message Structures:

              @dc42 Thanks again for your help, I have made good progress based on the information that you shared.

              May I ask a follow up question?

              When I receive timeSync messages (type 30) I am only seeing 64 bits, enough to unpack 'timeSent' and 'lastTimeSent'. I was expecting another 64 bits containing 'lastTimeAcknowledgeDelay' and 'realTime' but never see them. Is this expected or do I need to start investigating where the other 64 bits have gone?

              Many Thanks,

              Christian

              Edit: oops - Corrected 64 bytes to 64 bits

              Which firmware version are you using? The 'realTime' field was added after the initial release, and in the latest 3.3 firmware it is only included when the time has changed.

              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
              • crispusundefined
                crispus
                last edited by

                I am currently using the 3.2 release.

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

                  That's odd, because realTime is working in the 3.2 release.

                  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
                  • crispusundefined
                    crispus
                    last edited by

                    Here are two consecutive messages:

                    ISR - MB 16  OVERRUN: 0  LEN: 16  EDL: 1 EXT: 1 TS: 53390 ID: 1E007F Buffer: 2B D1 92 DB 3A 87 90 DB 0 0 0 0 0 0 0 0 
                    ISR - MB 16  OVERRUN: 0  LEN: 16  EDL: 1 EXT: 1 TS: 56781 ID: 1E007F Buffer: 1A 1B 95 DB 2B D1 92 DB 0 0 0 0 0 0 0 0 
                    

                    I am receiving 16 bytes but as you can see, the last 8 are always zeros. Looking at the first 8 bytes, I can see the current 'timeSent' become the 'lastTimeSent' in the next message.

                    1 Reply Last reply Reply Quote 0
                    • Phaedruxundefined
                      Phaedrux Moderator
                      last edited by

                      Double check your installed firmwards with M122 and M122 B1

                      Z-Bot CoreXY Build | Thingiverse Profile

                      1 Reply Last reply Reply Quote 0
                      • crispusundefined
                        crispus
                        last edited by

                        @Phaedrux thanks for the suggestion. Here is what I get:

                        M122
                        === Diagnostics ===
                        RepRapFirmware for Duet 3 MB6HC version 3.2 running on Duet 3 MB6HC v1.01 or later (SBC mode)
                        Board ID: 08DJM-956BA-NA3TN-6JTD2-3S46M-9BAYS
                        Used output buffers: 1 of 40 (10 max)

                        M122 B121
                        Diagnostics for board 121:
                        Duet TOOL1LC firmware version 3.2 (2021-01-05)
                        Bootloader ID: SAMC21 bootloader version 2.2 (2021-01-16b1)

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

                          The realTime field will be zero until you connect to the Duet from DWC, at which time DWC sends the current time to the Duet. Until then, the Duet doesn't know the time.

                          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