The invention discloses a
code generation method and device, equipment and a storage medium. The method comprises the steps that at least one target
natural language instruction matched with original
natural language description input by a user is acquired from an industrial semantic
library; generating a PLC code file according to the PLC code sample, the logic
label and the standard document associated with the at least one target
natural language instruction; and converting the PLC code file into a PLC image. PLC code samples, logic tags and standard documents associated with various different natural language instructions are stored through an industrial semantic
library, so that the reliability of basic data is ensured, human errors are reduced, and therefore, basic support is provided for original natural language description input by a user by using the industrial semantic
library; according to the method, a natural language is accurately converted into a compliance code based on semantic-
logic mapping, the generated code is converted into a PLC image,
millisecond-level downloading is achieved, automatic starting and running are achieved, a complete technical link is formed, manual
programming and debugging time is saved, and
code development efficiency and code quality are remarkably improved.