Abstract. The paper presents an implementation of knowledge representation and task representation, based on ontologies for an Industrial Robotic Application. The industrial application is to insert up to 56 small pins, e.g., sealants, in a harness box terminal for the automotive industry. The number of sealants and their insertion pattern vary significantly with the production requests. Based on the knowledge representation of the robot and also based on the tasks to be performed, plans are built and then sent to the robot controller based on the seal pattern production order. Moreover, the robotic system is capable to perform re-planning when an insertion error is reported by a machine vision system. The ontologybased approach was used to define the robot, the machine vision system, and the tasks that were needed to be performed by the robotic system. The robotic system was validated experimentally by showing its capability to correct seal insertion errors, while re-planning.