You can get CODESYS Development System V3 for free and play with it. https://store.codesys.com/en/codesys.html
It comes with a soft PLC simulator, also a cheap Raspberry Pi with some I/O module(s) can be used as a Codesys simple PLC or buy some of the Codesys based PLCs
It comes with a soft PLC simulator, also a cheap Raspberry Pi with some I/O module(s) can be used as a Codesys simple PLC or buy some of the Codesys based PLCs