Dave3891 wrote:Is there any way to auto switch to world mode after the home sequence?
I think it is possible, but a bit fiddly. There has been a suggestion that it could be an INI file option.
If you have halui loaded (which requires HALUI = halui in the [HAL] part of the INI file) then you have the pins halui.mode.joint and halui.mode.teleop to set the joint/world mode and the pins halui.mode.auto and halui.mode.manual too.
There is some interaction between the 4 pins that I have not quite figured out. You can experiment by typing (for example) "step halui.mode.teleop" in the machine->show HAL config window. (You might have to expand the window to see the command entry box)
Those pins, twiddled in the right order, allow you to change between world and joint modes. You could, in HAL, net the axis.0.homed , axis.1.homed etc pins into a "logic" component (which is a fairly easy way to get a 4-way AND and XOR pin output) and net those to the halui.mode pins.
It ends up looking like this.
loadrt logic personality=0x704
addf logic.0 servo-thread
net X-homed axis.0.homed logic.0.in-00
net Y1-homed axis.1.homed logic.0.in-01
net Z-homed axis.2.homed logic.0.in-02
net Y2-homed axis.3.homed logic.0.in-03
net all-homed logic.0.and halui.mode.manual halui.mode.teleop
net some-unhomed logic.0.xor halui.mode.joint
But after the machine is homed I run the program and after that it's joint mode again. Or I switch to MDI and then to Manual and it's joint mode again. I use joints_axes3.
The perfect behavior would be automatic going to joint mode only when HOME_ALL button pushed (even in world mode) and return to world mode forever after homing.