In this master’s thesis, an industrial control system together with a network camera and servo motors were used to automate a ball and plate labyrinth system. The two servo motors, each with its own servo drive, were connected by joint arms to the plate resting on two interconnected gimbal frames, one for each axis. A background subtraction-based ball position tracking algorithm was developed to measure the ball-position using the camera. The camera acted as a sensor node in a control network with a programmable logical controller used together with the servo drives to implement a cascaded PID control loop to control the ball position. The ball reference position could either be controlled with user input from a tablet device, or automatica...