Take a look at Triangle Research. They have a line of inexpensive (I think under a hundred dollars,) PLC's that can be programmed with their software that includes both ladder logic and Basic. Just Google Triangle Research PLC and take a look. I have seen their ads in Circuit Cellar magazine for a number of years now. It might be cheaper and easier to use theirs than to design your own.

Good Luck!

Jerry.