I recently created this project which I think is very cool. Basically it's framework to create your own PLC with visual programming based on AVR but you can also port it very easy on other devices. Here is link to project: https://community.atmel.com/projects/avr-visual-programming. Feedback is welcomed. Hope you like it.