An employee was stuck on the Cameron elevator when the encoder switch for the elevator failed. The elevator encoder was repaired and the employee was returned to the surface safely. EE was on the elevator for approximately 4 hours before the repair was completed.