PLC?
http://en.wikipedia.org/wiki/Program...gic_controller