Programmable joint simulator with force-locking and motion feedback