A modular filter has been designed for the white-beam undulator/wiggler beamlines at the Advanced Photon Source. For a typical hard x-ray application, the filter assembly consists of four filter banks, and each bank has five beam apertures. Therefore a maximum of 625 filter combinations is mechanically possible. To prevent any mistaken setup, which could either damage the filter itself or downstream optical components, a programmable logic controller (PLC) based protection system has been designed. Fuzzy logic was used in this system to limit the memory size and improve the system performance. Ten different storage-ring beam currents and ten insertion-device gap setups have been chosen to cover a large dynamic operation range. Aspects of the system fuzzy logic design as well as an example of the calculated results for the control database are presented in this paper.