@deckingman:
Curiouser and curiouser. So moving the head manually moves the Z axis in the correct direction. i.e. a negative move goes toward the nozzle and a positive move goes away from the nozzle. Likewise when you home the bed, it moves towards the nozzle then triggers the switch. But, what you are saying is that when you print, Z moves are reversed. It doesn't make sense.
Unless…...If for some reason the gcode file contains relative Z moves but the Duet is expecting absolute Z moves (as set up by G90 at the start of config.g). Then a relative move of plus 0.3 from say a height of 1.8mm will send it to the absolute position of 0.3mm from home instead of 2.1mm (1.8 plus 0.3).
One quick question. When you move the head manually and do say Z+10 which should move it 10 mm away from the nozzle, is that before or after you have homed the printer? If it's before you've homed it, can you home the printer then try Z+10 again and see if you get the same behaviour? Just wondering if there is something amiss with your homing files that changes anything.
Possibly the G-code file movement is different. I will investigate when I get a chance.
Z+10 works before or after homing.
Another thing is while printing, I added +Z movement from the web control and it did move, but on the next layer, Z moved all the way home, not 0.2mm as per the G-code.