In a set of experiments related to obtaining lipids from microalgae, a system was required that would automatically control some vital process variables (pH, temperature, wavelength, and light/dark cycles) in the growth of such microorganisms. This article shows the design of such system, based on the emulation of a layered software architecture in the programming of a Programmable Logic Controller (PLC). Because this type of controller is exclusively programmed using logic blocks, the challenge of programming the PLC following a