Extend Follower on the machine that moves and Leader on the one that drives. The session, safety, correlation and recording come with them.

Follower

Three methods are required. The rest are there when your hardware needs them.

Leader

Two methods, and nothing to write.
The leader has no connect() or disconnect(). Open your device in __init__, and close it when your program ends.

Rules

Call super().__init__() last. It runs your descriptor() and limits(), so anything they use has to exist by then.
Let failures raise. If the bus does not answer, raise. The follower stops the arm, which is safe. Returning the last known position instead leaves it moving on numbers that are no longer true.
Add torque_enable() before setting on_starvation=TORQUE_OFF. Without it, construction fails rather than promising to cut power it cannot cut.
Three smaller ones:
  • Keep your reads and writes quick. Both have to finish inside one tick, 20 ms at 50 Hz. Slower shows up as overruns in stats().
  • Report the units you really use. slew, limits() and every recorded row are read in whatever your descriptor says.
  • Share your joint names between the two machines. Put them in one module both import, since a follower and leader that disagree cannot run together.

Follower

Every constructor argument, and the methods you can override.

Custom

The same thing as a guide, with a working two-machine example.