6.12. Interlock¶
The interlock
module switches the interlock according to the requests that are
made to it. It checks the feedback line of the interlock periodically.
6.12.1. Module Files¶
- Driver:
embedded-software\mcu-common\src\module\interlock\interlock.h
(interlock.h)embedded-software\mcu-common\src\module\interlock\interlock.c
(interlock.c)
- Driver Configuration:
embedded-software\mcu-primary\src\module\config\interlock_cfg.h
(interlock_cfg.h)embedded-software\mcu-primary\src\module\config\interlock_cfg.c
(interlock_cfg.c)embedded-software\mcu-secondary\src\module\config\interlock_cfg.h
(interlock_cfg.h)embedded-software\mcu-secondary\src\module\config\interlock_cfg.c
(interlock_cfg.c)
6.12.2. Structure¶
Fig. 6.17 shows the statemachine managing the interlock in foxBMS.

Fig. 6.17 Interlock state machine
Two states are implemented:
CLOSED
OPEN
- Requests are made to the interlock statemachine by
BMS
.BMS
closes the - interlock when entering
STANDBY
and opens the interlock when entering theERROR
state.
The interlock feedback is checked periodically. If the set value dose not
match the measured feedback (e.g., the interlock was opened outside of
foxBMS), the corresponding error flag will be set. The application
implemented in BMS
will then get the information and react accordingly.
6.12.3. Interaction¶
The bms
module uses the contactor
module APIs.