Patent ID: 8473889

Claim:
A routing storage structure based on directional grid points installed on a computer and help a user to compile a program which will be downloaded to PLC from the computer, when the computer performs the routing storage structure, the user need to provide information of blocks and points of the blocks need to be connected in a plane, the routing storage structure comprising: a grid matrix generation module for transforming the plane full of blocks with points need to be connected into a grid matrix, wherein the grid matrix having N×M grid points for storing a grid identifier corresponding to each grid point, wherein both N and M are natural numbers; a grid value acquisition module for acquiring the grid identifier corresponding to the current grid point from the grid matrix during a routing operation; and a grid value setting module for setting at least one of the grid points contained by the blocks in the routing plane and/or the grid points that the routing passes through as corresponding grid identifiers in accordance with a predetermined setting rule; a determining module for determining whether the router is able to pass through the current grid point according to the grid identifier corresponding to the current grid point; a selecting module for selecting an optimal path from a plurality of heuristic paths, wherein the optimal path has a shortest length and fewest inflection points; and an update module for updating the grid matrix according to the grid identifier set by the grid value setting module.