The article provides practical insights into the development of a specialized machine for automating the assembly of components based on customer-specified parameters. The initial design undergoes a risk analysis in accordance with the EN ISO 13849 standard, ensuring safety compliance. For the software aspect, we create sequences and algorithms for the machine's individual components using standardized formats within the TIA Portal software. To expedite programming and real-time debugging, a virtual commissioning approach utilising the fe.screen-sim program is employed. This allows us to address any issues or deficiencies in the virtual model, which mirrors the actual machine, optimizing the time needed for final physical adjustments.