When the autopilot (AP) is engaged the sidesticks are locked in placed by a solenoid. This prevents the Pilot Flying (PF), or Pilot Not Flying (PNF) from accidentally bumping or moving the sidestick when AP is on. However with a certain amount of force the pilots can still override the solenoid disengaging the solenoid and disconnecting AP (FCOM reference).
The solenoid AP solenoid function has been simulated using an Arduino and relay switch.
The lock was initially planned to be engaged when the Flight Control Unit (FCU) AP1 and AP2 output LED is turn on. It was was decided further logic needed to be implemented because the aircraft light test also turns on the FCU AP1 and AP2 output. Jean Luc, developer of FMGS provided us a hint – when the light test is on the FCU speed indicator displays ‘888’.
Pizman82 on the MobiFlight forum was able to help us with the logic. Create a Output which monitors the FCU speed – Speed FCU Readout with the offset 0x73C1 with 2 bytes, and all the mask values enabled. Next, create an Autopilot Solenoid Lock output, using Offset 0x7390 and mask values of Byte 0, and 1 (AP 1 and AP2 light engaged). Create a precondition Speed FCU Readout != 888 (AND). With this logic the solenoid will only engage when the FCU is not reading 888 (speed reading) and either AP1 or AP2 light is engaged.
You can download Pizman82 mcc file here.