This paper presents a general-purpose data acquisition system is designed for control and test applications. In this data acquisition system, the connections of the input-output ports and peripherals are performed by employing the STM32L4 microcontroller with ARM-Cortex M4 architecture. The microcontroller communicates with the MATLAB-Simulink, transmits given commands to peripheral units, and receives data from the environment. The system has four digital input-output, two analog inputs, two analog outputs, four pulse width modulation outputs, an L298 driver, and encoder inputs. The connections of the peripherals with the microcontroller are transferred to the printed circuit board in the Altium Designer program to perform real-world applications and test. Universal Serial Bus (USB) is used to maintain communication between Simulink library and controller. This communication process provides not only the control of input-output, sensors and driver ports but also opportunity of transfer the process of sampled data. The library created in the MATLAB-Simulink environment interprets and observes the system’s data and controls the peripherals. This library contains blocks to control the overall system and each input-output. Proposed system is intended to be low-cost, accurate, reliable, high resolution, and compatible with various environments that may communicate over the USB port.