begin to control machines using programs

i would like to be able to control different motors and machines using my pc. i want to learn how to program for machines.
i would like to write a program that would be able to control the whole machine at a factory with a pc.
want to learn to program real world devices, get input form different devices, output to machines.
i am good with c++ programming.
please suggest me some books or tutorial to get me started with this.
Topic archived. No new replies allowed.