check out automation direct, I've used the DL series of PLC's for years. But the software, like most vendors, isn't free.
Other choice is use a RaspberryPi board with an I/O board that plugs into it. All depends on your application.
And Abi you're correct, the I/O needs are determined by the system which the OP failed to even mention, so thus the rather abstract answer. DC in and out? AC?
Seriously folks if your going to ask a question of what part to use, give some specifics on the design.