What are the methods to connect ac servo drive to the computer and control it in realtime?
Controlling AC Servo Drives from PC or Micro-controller depends on which communication mechanism is used.

Manufacturers of Industrial AC Servo Drives implement different communication protocols to their products, deciding which one is best fitted in your application is depending on a number of requirements, such as: communication speed, number of Master/Salve devices in your system, distance between Masters and Slaves, maximum number of Slaves in your system.

Differences Between Communication Mechanisms


Rs-232


Single Master / Single Slave Protocol.
Limited communication speed (Max 115 kbit/sec).
Limited length of signal wires.

Rs-485


Single Master / Multi Slave Protocol (up to 127 Slaves in the same system).
Limited communication speed (Max 115 kbit/sec).
Extended length of signal wires.

CAN Bus


Multi Master / Multi Slave Protocol.
Moderate communication speeds ( Can reach 10 Mbit/sec or more).

Ether-Cat


Single Master / Multi Slave Protocol (up to 127 Slave devices).
Extremely fast communication speed (up to 100 Mbit/sec).
Extended length of signal wires.



Last of all your application will decide to use one of these protocols depending on the requirements given above, sometimes its not required to use a powerful communication protocol due to it's not essential in your application and its going to add more unwanted cost.