Patent ID: 9645567
Date: 2017-05-09
CPC Classifications: G05B,H04L

Claim:
1. A data setting device including a processor, the processor configured to rewrite a variable set in a PLC (Programmable Logic Controller) through a network, generate a frame, and cause the PLC to rewrite a rewriting target variable by transmitting the frame to the PLC, the frame indicating at least the rewriting target variable, an offset from a head address of a data area of the rewriting target variable, and data to be written at a position designated by the offset, wherein, when the rewriting target variable is a variable-length data type variable terminated by a predetermined terminal code, and when a whole size of the data to be written in the variable exceeds a maximum size transmittable in one frame, the processor further divides the data to be written into a plurality of pieces of divided data of the maximum size or less to calculate the offset of each piece of divided data, transmits a frame issuing an instruction to the PLC to write the predetermined terminal code in the head address of the data area, transmits a frame issuing an instruction to the PLC to write the divided data at a position of the corresponding offset from the head address of the data area with respect to the divided data except a head divided data, and transmits a frame issuing an instruction to the PLC to write the head divided data in the head address of the data area.