A control device (110) for controlling at least one collimator is disclosed, wherein the collimator has a plurality of parts being designed for collimating and shaping rays, wherein the rays are generated for treating a predefined body part of a patient, wherein the control device (110) comprises a programmable logic controller (112), a plurality of controller nodes (114), a plurality of device controllers (118), and a plurality of real-time bus interfaces (116).Herein, the programmable logic controller (112) is designated as a first master device (122) with respect to each of the controller nodes (114), wherein the programmable logic controller (112) is designed for superordinate control of the plurality of parts of the collimator. Further, each of the controller nodes (114) is designated as a first slave device (124) with respect to the programmable logic controller (112), wherein the controller node (114) is designated as a second master device (126) with respect to at least one corresponding device controller (118), wherein the controller node (114) is designed for controlling at least one corresponding part of the collimator, wherein the controller node (114) is connected to the programmable logic controller (112) by one of the real-time bus interfaces (116). Further, each of the device controllers (118) is designated as a second slave device (128) with respect to a corresponding controller node (114), wherein each of the device controllers (118) is designed for controlling at least one of an actuator (130) and a sensor (132), wherein the actuator (130) is designed for adjusting a corresponding part of the collimator, and wherein the sensor (132) is designed for providing data related to position and/or velocity information with respect to the corresponding part of the collimator, wherein the device controller (118) is connected to the corresponding controller node (114) by one of the real-time bus interfaces (116).