In this paper a digital twin of a manufacturing material system will be built in Tecnomatix-Siemens PLM (Product Life-cycle Management) software. The virtual cell will interact with a Programmable Logic Controller (PLC), specifically the Siemens S7-1500 Digital manufacturing tools are important new technologies to support the creation of complex manufacturing processes. The present work will guide not only the creation of the virtual prototype, but also to validate the PLC code inside the virtual model. The purpose of this is to enable faster, more flexible, and more efficient processes to produce higher-quality goods at reduced costs. The virtual environment allows us to test various programs in different scenario situations and check for defects before it is implemented on the physical system.