This document describes a system for controlling the temperature of a shell and tube heat exchanger using a TwinCAT PLC. The system uses sensors to measure the outlet temperature of the tube fluid and a control valve regulates the flow of cold water to maintain the outlet at the setpoint temperature. The TwinCAT PLC implements a control algorithm that compares the measured temperature to the setpoint and sends signals to adjust the control valve position. Testing showed the system successfully maintained the outlet temperature at the desired setpoint. The automated temperature control reduces maintenance costs compared to a non-automated system.