An operation program preparation device capable of reducing labor and cost
for preparation of a robot operation program. Work operations of a robot
includes work operations that are common to individual workpieces or
operation objects and independent of workpiece type, and work operations
that vary depending on workpiece. Operation-program definition data are
set and stored, which includes a first program part requiring
workpiece-dependent alteration and a second program part not depending on
workpiece type. Workpiece-type related data representing workpiece
position/orientation information is input and stored. In accordance with
the first program part not having been subject to the workpiece-dependent
alteration and the workpiece-type related data, the first program part is
subject to alteration to complete the first program part, whereby the
entire operation program is completed. As for a new workpiece, the
operation program can be prepared only by inputting workpiece-type
related data, making it possible to easily prepare the operation program
adapted to various types of workpiece.