The invention provides a method and device for converting a ladder diagram into an
instruction list, a storage medium and
electronic equipment. The method comprises the steps that the ladder diagram of a
programmable logic controller is converted into a
directed graph; the
directed graph is converted into an N-way
tree structure according to a link structure of the
directed graph, the link structure comprises at least one of a serial path, a convergence parallel path and a
branch parallel path, the convergence parallel path is a parallel path extending from the same starting node to the same ending node through a plurality of directed edges, and the
branch parallel path is a
branch path extending from the same ending node through a plurality of directed edges; the bifurcated parallel path is a parallel path extending from the same starting node to different termination nodes through a plurality of directed edges; the N-way
tree structure is traversed to generate an instruction table, the instruction table comprising a plurality of output instructions. According to the method, the N-way tree is adopted, the depth of the tree can be effectively reduced, the number of
layers of calling stacks during recursive traversal is reduced, the
stack overflow risk is reduced, the parallel connection relation is subdivided into convergence parallel connection and branch parallel connection, and the accuracy of logic conversion of the complex ladder diagram is improved.