Hi,
The numbering in the firmware and on the board itself can be confusing.
For example there is support for three heaters and two extruders on the Duet itself.
The heaters are numbered 0, 1, 2 while the extruders are numbered 0, 1.
Heater 0 is the bed heater which means that heater 1, 2 match up with extruders 0, 1.
For the expansion connector for the Duex5 the same issue continues.
There is support for 5 heaters, 5 extruders and 5 PWM outputs.
Continuing from where the Duet left off, the heaters are numbered 3, 4, 5, 6, 7 while the extruders are numbered 2, 3, 4, 5, 6.
The PWM outputs on the Deux5 board are numbered 1, 2, 3, 4, 5 but they use the signal lines for heaters 3, 4, 5, 6, 7.
To use a PWM output you first need to prevent the needed signal line from being used for a heater.
The M307 command takes care of that: M307 H# A-1 C-1 D-1
The # will be the heater number 3, 4, 5, 6, 7 which match up with PWM outputs 1, 2, 3, 4, 5.
The M280 command will then control the BLTouch: M280 P# S###
The # will be heater number 3, 4, 5, 6, 7 - the same number used in the M307 command.
The ### is the "servo position" that the BLTouch responds to for a given operation.
For example using 160 will clear an alarm condition in the BLTouch.
Frederick