If you started homing with the machine looking back, and you have joint4 on limit switch error, jump to Homed past homing sensor
It's important to open the head fiberglass cover on the head, and check inside the head that the cables are not twisted up, if they are follow Automatic homing fault instructions to be able to untwist them.
If you did not start homing with the machine looking back, then navigate to the I/O page in Orbit AitalMAC application, and keep an eye on the C homing sensor input, open the back cover on the head to access the C axis homing sensor tip, and place a metallic object in front of the tip of the sensor, if sensor is ok you will see the input change status on the screen, if sensor is working properly then jump to Automatic homing fault, if instead the input is not working jump to Bad sensor
Connect to the CNC via VNC , from the start menu in accessories open terminal or ctrl+alt+t as a shortcut, in the terminal windows write all this commands, if they give no error message after pressing enter then you typed them in correctly, otherwise press up arrow to bring it back and do modifications.
halcmd unlinkp joint.4.pos-lim-sw-in
halcmd unlinkp joint.4.neg-lim-sw-in
halcmd setp joint.4.pos-lim-sw-in 0
halcmd setp joint.4.neg-lim-sw-in 0
halcmd setp comp.4.hyst 999999999
halcmd setp halio.fb.4.use 0
On machines made from 2020 after also write this command
halcmd setp halio.pos.enable_save 1
On machines after 2022 or if this command above gives an error, this enable save is now moved to the AitalMAC user interface in parameters, Machine tab and it's called Save Self Motor Homing, and needs to be set back to 0 after homing successfully.
On older machines this will give a not found error
Take off the fiberglass cover on top of the head, if your cables are twisted, move in the direction to get them untwisted, you can use the joint tab in the Orbit AitalMAC application, select the C joint and home selected, and then stop with esc, after doing that you will be able to move as desired to untwist the cables.
After moved successfully to the correct turn, send this command now, in the terminal we opened before
halcmd setp halio.fb.4.use 1
You should now be able to home again, to check that the homing is proper, the cables should not be twisted when C is at position 180.
Make sure to restart the CNC controller after you have successfully homed! Hold the power button for 6 seconds till the lights on top of the panel go off, or turn off machine from the main to achieve this.
Replace the sensor, make sure the sensor reads the long upside down T steel that's supposed to read, if you have the sensor sticking out exactly as before and the sensor is same length then will be ok, otherwise open cover behind the head, and find the steel where the sensor should read and set the sensor tip and about 1mm distance from the sensor.
After sensor is replaced you need to realign the C axis, use dial gauge on the blade, and move X to figure out your displacement, open the 5axis folder, open the 5axis.ini file, find the section [JOINT4] and edit HOME_OFFSET parameter to make adjustments to the homing position, save the file, and hold the power button for 6 seconds till the lights on top of the panel go off and then press once more and wait for light to come back on, this is to restart the CNC controller, home again and then check again alignment, repeat this process till you find proper alignment, the dial gauge reads millimeters, but the HOME_OFFSET is in degrees you can use this slope calculator to figure out how many degree you should move.
On the right side of the Orbit AitalMAC application, find the Override Limits check mark, select it, switch on, then wait for axis to come green, then go in joint tab, select C from the list, and use Move - button to move C axis away from limit, once in a good position home again.