GCodes for the next-generation Duet
-
Oh yeah @dc42, on the new boards you'd better make sure the silkscreen labels match the physical designator scheme. Labelling things with their logical uses on the Duet2 and Duex5 was very confusing for me when I started out.
Labelling them with their physical capabilities would be the best option.
drive
2 pin pwm out (2PO)
3 pin in (3IN)
low power mosfet (LPM)
high power mosfet (HPM)
etc. -
@dc42 said in GCodes for the next-generation Duet:
@joergs5 said in GCodes for the next-generation Duet:
@dc42 The more drivers, fans and heater you support the more problems with counting ("what is my P8?") will arise. So an optional labeling would be nice, maybe implemented as preprocessor. Then the user can name it as one's will and it can be displayed in the panel. It is easer to recognise "Heater Back Top" than H7.
So in the command you used to assign the name "Heater Back Top" to a heater, how would you specify which heater that is?
I would take option 1 in this case to be back compatible. The function is recognisable by the label, you have to assign it only one time at the beginning.
-
Option #3 is the most intuitive.
To second @gtj0, the naming on the boards should be totally neutral. I mean, don't use X, Y, Z, just numbers, so routing between drives, hotends, endstops is not confusing. I would also put all drivers together, all endstops inputs together, all fans input together... Aslo, if all I/O could have the same behavior, it would be great (on the current board, Duet endstops and Duex ones can't do the same things, like monitoring filament sensor...).
Anyway, I'm sure the next hardware will be awesome!
-
@projectr3d said in GCodes for the next-generation Duet:
I think option two would be my first choice with the third coming next. Also if there will be the possibility to daisy chain more than one expansion would the drivers on the first expansion be 101, 102, 103.... while the next expansion in the line be 201, 202, 203...?
To achieve that numbering, you would need to set the ID switch on the first expansion board to 1, and the ID switch on the second board to 2.
-
@gtj0 said in GCodes for the next-generation Duet:
Oh yeah @dc42, on the new boards you'd better make sure the silkscreen labels match the physical designator scheme. Labelling things with their logical uses on the Duet2 and Duex5 was very confusing for me when I started out.
Labelling them with their physical capabilities would be the best option.
drive
2 pin pwm out (2PO)
3 pin in (3IN)
low power mosfet (LPM)
high power mosfet (HPM)
etc.We're planning to label the connectors Motor0, Motor1, Out0, Out1 etc. Some of the Out ports will have a higher power capability than others, but all will be configurable as motors, fans or general purpose output.
-
@gtj0 said in GCodes for the next-generation Duet:
@projectr3d said in GCodes for the next-generation Duet:
I think option two would be my first choice with the third coming next. Also if there will be the possibility to daisy chain more than one expansion would the drivers on the first expansion be 101, 102, 103.... while the next expansion in the line be 201, 202, 203...?
FWIW, I think option 3 will result in even more "this is too fricking hard to configure" posts.
Why do you think option 3 is harder than option 2? They are logically the same, but for option 2 you need to do the (100 * board_id + device_id) calculation yourself.
Just to be clear: if you don't have any expansion boards then you will just need to specify the device number on the main board as now; although if we adopt option 3 then I would allow "0.1" as an alternative to "1" and so on.
-
I think option 3 is by far the cleanest. If labelling is added too, it becomes even more clear, e.g. if you set the label of expansion board 1 to "MyAwesomeExpansion" and one of it's drives to "ZAxis", you get super easy to visually parse
M569 S1 PMyAwesomeExapnsion.ZAxis
-
I think option 3 is best. If only because that is an existing standard.
-
@dc42 said in GCodes for the next-generation Duet:
@gtj0 said in GCodes for the next-generation Duet:
@projectr3d said in GCodes for the next-generation Duet:
I think option two would be my first choice with the third coming next. Also if there will be the possibility to daisy chain more than one expansion would the drivers on the first expansion be 101, 102, 103.... while the next expansion in the line be 201, 202, 203...?
FWIW, I think option 3 will result in even more "this is too fricking hard to configure" posts.
Why do you think option 3 is harder than option 2? They are logically the same, but for option 2 you need to do the (100 * board_id + device_id) calculation yourself.
Just to be clear: if you don't have any expansion boards then you will just need to specify the device number on the main board as now; although if we adopt option 3 then I would allow "0.1" as an alternative to "1" and so on.
Sorry, I meant option 2 would result in more "this is too...". I'm totally on board with option 3.
-
@keyz182 said in GCodes for the next-generation Duet:
I think option 3 is by far the cleanest. If labelling is added too, it becomes even more clear, e.g. if you set the label of expansion board 1 to "MyAwesomeExpansion" and one of it's drives to "ZAxis", you get super easy to visually parse
M569 S1 PMyAwesomeExapnsion.ZAxis
Some sort of device tree overlay could be used to make the labeling...
-
@dc42 said in GCodes for the next-generation Duet:
@gtj0 said in GCodes for the next-generation Duet:
Oh yeah @dc42, on the new boards you'd better make sure the silkscreen labels match the physical designator scheme. Labelling things with their logical uses on the Duet2 and Duex5 was very confusing for me when I started out.
Labelling them with their physical capabilities would be the best option.
drive
2 pin pwm out (2PO)
3 pin in (3IN)
low power mosfet (LPM)
high power mosfet (HPM)
etc.We're planning to label the connectors Motor0, Motor1, Out0, Out1 etc. Some of the Out ports will have a higher power capability than others, but all will be configurable as motors, fans or general purpose output.
YAY!
-
@fma Could be an interesting idea, especially it the DTO is stored on the expansion (seeing as they're getting more intelligent, with CanBus). Plug'n'Play
-
Another vote for option 3.
And another vote for neutral naming on the silkscreen, and exactly matching the silkscreen number to the gcode number.
And... EVERYTHING should use a CONSISTENT index origin. The first thingie should always be the zero-eth thingie. Always. In a all silkscreen, configuration addressing, documentation, DWC text, etc, etc.
-
I like #3, but could a 4th idea be an additional parameter? eg. P for board, Q for it's driver. Maybe that complicates it more...
-
Hi,
#3 for sure.
Frederick
-
We're planning to label the connectors Motor0, Motor1, Out0, Out1 etc. Some of the Out ports will have a higher power capability than others, but all will be configurable as motors, fans or general purpose output.
Labelling as you are planning - Option 3 is fine if this is aimed at CNC machining users but not sure how a slicer would cope - post processors seem to be sadly missing from the usable ones.
-
@pawprinter said in GCodes for the next-generation Duet:
I like #3, but could a 4th idea be an additional parameter? eg. P for board, Q for it's driver. Maybe that complicates it more...
I like this idea but why can't we use "B" for board or "E" for expansion board.
So e.g M569 B0 P0 means drive 0 on board zero. The default if no "B" value is present would be the main board so M569 P0 would mean the same thing and would be backwardly compatible for the majority of users with just one main board. Then M569 B1 P2 would mean drive 2 on (expansion) board 1.
Come to that, why the hell do we have to use "P" for drive number? Why not "D" M569 B1 D2 would make a lot more sense.
Some consistency of letters within gcode commands would make a lot of sense too. e.g. when referring to heaters, in M143, M570 M307, we use "Hn" which is fine. But in M305 we have to use "Pn" to refer to heater number. In M563 we have to use "Pn" to define tools. Why not "Tn". We use "Tn" in gcode files, why do we have to use "Pn" to refer to the same thing in configuration files? In M106 we have to use "Pn" again to refer to fan number. Why not "Fn"?
No wonder new users get confused and frustrated.
-
@pilotltd said in GCodes for the next-generation Duet:
We're planning to label the connectors Motor0, Motor1, Out0, Out1 etc. Some of the Out ports will have a higher power capability than others, but all will be configurable as motors, fans or general purpose output.
Labelling as you are planning - Option 3 is fine if this is aimed at CNC machining users but not sure how a slicer would cope - post processors seem to be sadly missing from the usable ones.
My intention is that only GCodes used for configuration (and normally used only in config.g) would use the <board_id>.<device_id> format. So a slicer would have no reason to use it.
-
@deckingman said in GCodes for the next-generation Duet:
@pawprinter said in GCodes for the next-generation Duet:
I like #3, but could a 4th idea be an additional parameter? eg. P for board, Q for it's driver. Maybe that complicates it more...
I like this idea but why can't we use "B" for board or "E" for expansion board.
So e.g M569 B0 P0 means drive 0 on board zero. The default if no "B" value is present would be the main board so M569 P0 would mean the same thing and would be backwardly compatible for the majority of users with just one main board. Then M569 B1 P2 would mean drive 2 on (expansion) board 1.
That's a possibility, but it presupposes that B or E is not already used for another purpose by any of the GCode commands affected. Also it potentially makes it harder to identify the device when reading the GCode command, because the B or E parameter might be at one end of the line of GCode and the other parameter at the other end.
Come to that, why the hell do we have to use "P" for drive number? Why not "D" M569 B1 D2 would make a lot more sense.
Some consistency of letters within gcode commands would make a lot of sense too. e.g. when referring to heaters, in M143, M570 M307, we use "Hn" which is fine. But in M305 we have to use "Pn" to refer to heater number. In M563 we have to use "Pn" to define tools. Why not "Tn". We use "Tn" in gcode files, why do we have to use "Pn" to refer to the same thing in configuration files? In M106 we have to use "Pn" again to refer to fan number. Why not "Fn"?
No wonder new users get confused and frustrated.
At the time I became involved with RRF, GCodes such as M305, M106 and M563 were already defined and generally used P to identify the "thing" (i.e. fan, heater or tool) number that the command was defining. So we're stuck with them now, unless we cause existing users a lot of hassle by changing them. I have tried to be more consistent in GCode commands that I added, for example by using H for heater number and F for PWM frequency.
-
G-Code 'language' is pushed to its limits... Maybe it's time to create something better... Like it's time to drop STL format...