Build a PLC with STM32 Nucleo-F401RE board, Industrial I/O expansion board (X-NUCLEO-PLC01A1 and/or X-NUCLEO-OUT01A1) and Wi-Fi expansion board (X-NUCLEO-IDW01M1).
With these boards and X-CUBE-PLC1 (industrial I/O software expansion for STM32Cube), you manage I/Os at 24 V, timers and counters, with a Ladder logic interface.
The I/Os are driven by a high-speed digital current limiter (CLT01-38SQ7) and an octal high-side smart-power solid-state relay (VNI8200-XP or ISO8200BQ), for the output.