The distributed plc system of the floodgate ' s opening measuring presented by the paper has many advantages such as high reliable operation , high measuring precision , having the network communication function , convenient installation and correction , etc . this thesis further studies the key device for the floodgate ' s opening measuring , the rotary encoder , selects the absolute rotary encoder adopting the binary cyclic code , studies the method for transforming the cyclic code to the binary data and according to the transforming formula designs the ladder diagram program 本論文研制的分布式plc閘門開度測量系統具有工作可靠、測量精度高、具有聯網通信功能、安裝和校正方便等特點。本論文深入研究了閘門開度檢測的關鍵器件? ?旋轉編碼器,選用了采用二進制循環碼編碼的絕對式旋轉編碼器,研究了將二進制循環碼轉換為二進制數的方法,根據轉換公式設計了plc的梯形圖轉換程序。