Patent ID: 7757025

Claim:
A peripheral device for a programmable logic controller, comprising: a processor; and a memory storing software modules, the software modules comprising: an instruction table for storing instructions and storing corresponding input/output types of parameters for the instructions, wherein the input/output types of the parameters for the instructions comprise an input type, an output type, and an internal type; a search and determination means for searching the instruction table for an instruction in a code in a portion of a sequence program selected as diversion data from an existing diversion-source sequence program, to determine a corresponding input/output type of a parameter for the instruction; a search result creating and storing means for creating and storing a search result table by combining at least one of input/output address and internal address in the code in the selected portion of the sequence program, with the determined corresponding input/output type; a component data creating means for creating a variable data table by automatically replacing the determined corresponding input/output types stored in the search result table with variable names, and for creating component data by adding the corresponding variable names to variables and to circuit information; a component data diversion means for diverting the component data into an arbitrary position in a designated sequence program; a sequence-program-component storing means for storing into a component storage the created component data as a sequence program component; a sequence-program-component displaying device for displaying the sequence program components stored in the component storage; a sequence-program-component selecting means for selecting a desired sequence program component from the sequence program components displayed by the sequence-program-component displaying device; and a sequence-program-component diversion means for diverting the selected sequence program component into a new sequence program.