  The PIP-II Machine Protection System (MPS) requires a dedicated set of tools
for configuration control and management of the machine modes and beam modes of
the accelerator. The protection system reacts to signals from various elements
of the machine according to rules established in a setup database in the form
of a Look-Up-Table filtered by the program Mode Controller. This is achieved in
accordance with commands from the operator and governed by the firmware logic
of the MPS. This paper describes the architecture, firmware logic, and
implementation of the program mode controller.
