Connecting 2 Duet3 boards with CAN
-
Hello. I have seen than in one of the last updates, now it is possible to connect 2 duet3 boards through CAN
I havent found information about this (sorry if Im wrong), so I have some questions:1.- I guess I just connect both boards using the CAN ports, but how do I know or setup wich is the main one and which is the "extension"?
2.- One of my boards need to update its firmware, can I do that using the can connection? I have tried uploading the firmware file but nothing happened (I did this into the board that is meant to be the "main" and it is already updated to 3.4.4, the other one is 3.3 I guess)
3.- Any other consideration regarding the connection?
Thanks in advance -
This post is deleted! -
@Tinchus See: https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m954-configure-as-can-expansion-board For how to set one of your boards to be an expansion board.
-
@Tinchus I saw my name being mentioned so......
To be clear, you want to connect two 6HC main boards together yes? Or a 6HC main board and an MB6XC with the MB6XC as an expansion board. That is to say one main board plus a second main board as an expansion board.
If that is so then for sure, I worked with the Duet guys to get this up and running so I can certainly help.
Ref your point 1, the first 6HC main board is set up as normal. The second 6HC has just a single command in config.g which is M954 https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m954-configure-as-can-expansion-board. You use this with the A parameter to specify the CAN address.
Ref point 2. You need to put a special IAP in the firmware folder of the expansion board SD card. It's called Duet3_CANiap32_MB6.bin. Mine came directly from DC's dropbox account but I'd think it must be available from the normal sources by now. Once you have that IAP installed, then firmware updates to all boards can be done by the normal zip file method.
Ref point 3 - Just note that 6HC main boards have only single CAN connector so the second "main" board has to be that last one in the string. So if you have an additional 3HC expansion board (as I do) then the main board is board 0 as normal, the 3HC would be board 1 and the 6HC as expansion board would be board 2.
-
@deckingman Thanks for your description. I'm going to add documentation on using a mainboard as an expansion board. Do we think this page is the best place for the info? https://docs.duet3d.com/en/User_manual/Machine_configuration/CAN_connection
Ian
-
@droftarts That looks like as good a place as any. Suggest you check with DC to make sure what I've said is right - I'm working from memory which at my time of life, isn't the best strategy
-
My only comment is on this:
@deckingman said in Connecting 2 Duet3 boards with CAN:
So if you have an additional 3HC expansion board (as I do) then the main board is board 0 as normal, the 3HC would be board 1 and the 6HC as expansion board would be board 2.
That could be taken to imply that the CAN addresses need to be in sequential order along the bus, which is not the case.
-
Thanks you all for the information. Im on the work. I will start by trying to do the update. Reading all the info I gathered, the command M954 states that this would be tipically the only one command on the config file of the "main expansion board".
I will try but in the meantime I will ask: my intention was having a communication between both boards using the CAN cable, so 1 of the boards is the "master" the other one is the "slave" but I though that by using a complete duet3 board, I could use all the power of the boair (its processor) to handle tasks in parallel, freeing resources in the main baord (like moving steppers with triggers detected by the slave board, so the printing on the main board is not paused, like it was happening my previous test using a normal expansion board). This will work? -
Firsts test has failed:
I have achieved to connect both duet3 boards connected throug CAN. And basically the same config I was using with the previous expansion card, work perfect with the new duet3 board as expansion card. But my objective was:
.- using the expansion board, when a triggered was detected, the execution of that triggered paused the print till that trigger finishes. Not good clearlu (the trigger reads a sensor and then moves a "D" axis with its stepper motor. This pauses the print because as @dc42 said in another post, this competes in this case with a resource, the motion system, even when this "D" axis is not related at all with the printing itself. It just used for moving the spool, a heavy spool by the way)My idea was connecting 2 duet3 boards, so using the CAN 1 of the boards could read the state of the sensors connected the other board. And the board where the sensors are connected, would handle this trigger and the stepper motor, so no pause on the print would happen.
This seems to not work, the CAN connection happens, but if I define an axis on the secundary board, looks like the connection is broken (at least looks like because defining a "D" axis on the sencond board is just ignored.
Any ideas?
-
@Tinchus It seems like you have misinterpreted the intention. You can now use a main board as an expansion board but you can't have two main boards running parallel processing. You can only define axes in one configuration file but additional axes can use the drivers on the expansion board. As I said, the configuration file on the second (expansion) board must have just a single M954 command.
-
@deckingman Well, I have this already working:
"main " board has its motion system defined and its axis (cartesian system). On the other board I have defined also a cartesion system and assigned axis to the drivers, and I can move both motion system so far (I have lauched a print on the main board, and I can move the X axis of the other board perfectly. And the CAN connectio is OK because MAIN board has defined a sensor on a IO.3 pin on the other board and receives the data) -
Somethig works, others no: I can see sensors state (and create them) from the main board. In my main config I have this to test:
M950 J9 C"!1.io1.in"
And It works, I can see the state of that ping on the objects model page. So the CAN connection is there.
On the other board, the config file is:
; Enable network
M552 P0.0.0.0 S1M669 K0
M569 P0 S1 D2
M569 P1 S0 D2
M569 P2 S1 D2
M569 P3 S1 D2
M569 P4 S1 D2
M569 P5 S0 D2
M584 X0 Y1 Z2M350 X16 Y16 Z16 I1
M92 X320 Y320 Z1600
M566 X200.00 Y200.00 Z300.00
M906 X1000 Y1000 Z1000
M208 X0 Y0 Z0 S1
M208 X220 Y220 Z200 S0M950 J9 C"!1.io1.in"
;M581 P9 T4 S1 R0M954 A1
That M950 doesnt work, I cant create a sensor located on the same board, but I can do it from the main board.
BUT, the motion system on the secondary board works. I have access through the web iterface and I can move the axes with no problem or issue movements commands indepently from the can connection.
daemon.g is also not working on the secondary board.I think the project will stop here
As a wich list to think about: having the ability to connect 2 duet3 boards is usefull, but if they cant have some kind of freedom, I dont really see why this would be better than using other extension biards, for sure would be cheaper.
So to unleash all the power, wouldnt it be super good to be able to connect them with the CAN but each board can have its independency?