The invention discloses a PLC incremental compiling method of a BS architecture based on a PLCope standard, which comprises the following steps: initializing a PLC
programming environment, establishing communication connection between a compiling
server and a
client IDE, and loading a relevant
library and a configuration file of the PLCope
XML standard; the
client IDE formats a user program into a PLCopen
XML structure and submits a PLC program compiling request, and a compiling
server analyzes
program modification content and a program dependency relationship by using a PLCopen standard format; and the compiling
server traverses the user program again according to the dependency relationship, determines the content needing to be recompiled in the current project, compiles the content to obtain a target file generated by incremental compiling, links the target file with the target file of the unmodified part to generate a final execution file, and stores the final execution file. And sending the file as a response of a compiling request to a
client IDE, downloading the file into a connected PLC device, starting operation, and completing incremental compiling. According to the invention, the PLC
programming and debugging efficiency is improved, and the consistency and stability of the
system are ensured.