If you have the maintenance manual, look at section 7.5.15 If not I recommend buying them from Toyoda if you have to. They should have PDF copies available.
Replace the battery.
You will need to turn on MGU edit That should be in the custom screen on the control for the FA400, some models have a switch in the cabinet.
Put the control in jog mode.
Then using the hand unit (paying attention to the U/D key/mode for changing the button functions) press:
U for U mode
EDT for edit
Parameter for parameter
D for D mode
54 then set (shows P054 now)
3 then set (shows P054 0000003)
Turn the machine off for 10 seconds
Turn on, but you can leave it in e-stop
Parameter
D for D mode
54 then set (P054)
00000000 then set (P054 00000000)
Off then on again.
--That clears the error. you can turn off MGU edit if the physical and drive position match at 0 or 180
If the twin arm is vertical then the position should be 0 or 180000 (0 or 180 deg)
Jog with M907 if not vertical -- I never had the arm and position mismatch so don't know how to physically set that
If you have to set the position to match the arm... P800 will set the position 0 to 360000 (0 to 360 deg)
FYI the tool chain is the same, but the pocket positions are 0 - 360000 starting at 0 for pocket 0 (or pocket 1 if 90 or 120 tool chain) each pocket is 360000/# of pockets (27, 41, 61, 90 or 120)