The new expanding recipe algorithm is presented. The function of the new algorithm solved the problem that the recipe func- tion in SIMATIC $7-200 PLC can＇ t operate parameters in different recipes at the same command. The algorithm of the original recipe function is studied and assignment of the parameters data storage area is analyzed. By using the indirect addressing method with the pointer, operation including query, set and get parameters is explained and expansion of the algorithm is searched. The application of the algorithm is introduced in the way of taking the input shaft press machine of a automobile transmission assembly line for an example. The practical result shows that the algorithm optimizes the product process, raises the production efficiency and product quality and has good maneuverability and practicability.