24???±?????¨??????

×??????°

ASP.NETVC++MySQLPHP°?×?JSPLinuxJava?ú??VBASP?????ú?????????¤??±????è??Flash
?ú?±?°?????????????¨?? > ±????è?????? >
?ì??????
±????????¨??
????????
??????????ר???á?????????ú×?±????è??????????2002?ê?????????????à???§?á???ó??±????è?????????¨????·????????????à???§???????ò??ר×????ù??ר??????×÷?????ó??·??????ú211/958?????????????°?????ú?è??????±??????°????5000?à?????§????????????×÷???????? ±ü???????§?????????????§???ì???????í??????????????·ì?????????ó·??????????ú×?±????è???ê???ó??ר?????????????????????????ê??????????±??è?ó?????§?????????????¨??,????????±???±????¤??
?ú×?±????è??
????????

?í???±????2018/12/20 ?ù????????±????è??????
PLC ?????ú±à???í???? PLC ?è??????????????????·??????ù?????????¨?????ú???? windows ?·????·??? IEC61131-3 ?ú??±ê×???±à???í????±????????÷?????????????ú????±???????????±à???????÷?í???ú?·????·??????ù????
??????????±?????????????

????

??????±à???????????÷?¨?ò?? PLC?????¨?×?????????¨?????í?÷???¤???è±???????????×°?????ü???????????????????¤??×????????????¨?????????????ú???????????????????????????ì?ò?????????°????·????????????ú?? PLC ·??????°???????????×?????ú?ú PLC ???ú???????????????? 10%??×÷?????????ó????????????·????????????????ì?????ú?ú PLC ????×????ú??????????·?????????????·? PLC ????×??§??????·??????? PLC ?????ú±à???í?????????ú???????á??????±à???????????????? PLC???ú????·¨???????????????ò???????á???????§????·?±??è?????????????ú?????¤???±?á?¨?ò?? IEC??????°????? PLC ±à?????????ú??±ê×? IEC61131-3????????±ê×??? PLC ±à???í??????·?×????????????ò??±à???è??±????à???ò????·?±????¤??

????±??????????÷??????????·????×?ù?? IEC61131-3 ±ê×??? PLC ?????ú?í???°???? STC89C52RC ?????ú×÷?????????????????? PLC ???????????ú?? PLC ?í???í??±à?????????á?????è?????à????????±????è?????????ú?í?????¨????????????????±í×÷??±à????????????·??é?è??·?·¨??????????·???????????????±í±à???÷???é??????????????±í??×??????é??????±í?? C ????×??????é???¨?????é???í?ó???í???é?????°·????à?????é??

?????????? PLC ?í??????·????????? VC++?? MFC ·?×°?à??×÷????·??¤???????????ù±??????? PLC ????±à???÷???è???????? PLC ±à???í?????¨????????????×÷?ò??·?±????????ú???????????????è?????à?·???????????¨?????ú???????????????á??±í?÷??±à???í???÷??????·????è?????ó?????ò???????????ú???????·??·??????????????????è??·?°???????????

???????ü??: ??±à???????÷ IEC61131-3 ?????? ????±í ±à???÷

Abstract

????Programmable logic controller (PLC) is one of the industrial equipment devices controlled by the processor. It realizes trinity, moving industrial automation, communication technology and computer technology into one body. Whenever, This technology owns wide application in the control field. However, The development of our country is still in the start stage. The domestic PLC shared only 10% of international market in our country. As a huge market capacity, It becomes very important to design a PLC with leading technology and new types. Our domestic PLC can not go further for the low machine structuring software programming, which is the most difficult part of the development of the PLC system. In order to improve the execution efficiency and convenience of design, The international electrotechnical commission(IEC) formally introduced the PLC programming language with the standard of IEC61131-3. It indicates that the PLC programming software will develop into a new order. The programming design will become relatively simple and conveniently maintenance.

????The main task of this subject is to design a set of PLC based on the IEC61131-3 standarded of PC software and using STC89C52RC MCU as the chip embedded PLC system. Reference of foreigner PLC software and structured method, The design of upper software platform selects the ladder diagram and instruction list as the programming language. The whole system is devided into ladder diagram module , instruction list editor module, ladder diagram instruction list table conversion module, C language conversion module, communication module, error processing module and monitoring module by using block design method.

????In the whole proceeding of PLC software, We use VC++ MFC wrapper class library as a tool. System has basically achieved the design of the PLC language compiler. The PLC software owns the characteristics of friendly interface, simply operation and convenience. The machine adopts light coupling design, multiple input and output. The results show that the programming software functions meet the design requirements through an example tested online. As the result, We found that the program downloaded to the next bit machine run correctly. The feedback is correct. system design scheme is feasible.

????Key words: Programmable Controller IEC61131-3 Ladder diagram Instruction list Compiler

????PLC?¨Programmable Logical Controller????????????±à???????????÷???ü?????????????í?÷???ù?????¤??×????????÷?????????÷??????????·???[1]??PLC ?????????ú?è?????à?????·????????±à???????? ROM ?????? RAM?????????? RAM ??????·????????????????á???????±??????·?????\?¨?±???à?????????¨?? PUSH ?????????????à???????ú???????¨???????????ò?????????ò?????????????????????????????ü??????????×???????????????????×÷???¨????×????????????????????÷??????????×÷?????ù???????????¤????????????PLC ×÷??????·??????????????÷?¤??×°?????ü??????????·????à??????°ü?¨?ò?????????????????????????????÷???????????????????±?????????í?÷?????????ü±????é????????????????????×??¤?????????????í?÷?????????????????§????????????±????ó??????????±??ú???????????????????????????????????????ì??×????????????????í?÷???????÷?????????????¨???¨?????????÷??·??????????????????±?à????·?±????¤?????????ü??????·????????????¤???·????????×??????¤×÷?????????ù??±?????????·??????????÷?????????????¤??×????????÷???????¤??[1]??

?????±?°???????ú?ú?è±???×??????ú?ú???????????????ó?????????ì???è?ó×?????????·??????ú?ú??????·??????????ú?·???ú?ú?????????à??·????ú?ú?¤?????ú?·????±à???????????÷?????????????÷?????????????ü?????????ì??×??????°?????????????????¤???????????è±??????????¨???????????÷???????????????????????????ò??????????±é???????????????????????????????ò??????????????±??¤??×÷??????????????????????????????????·??????ù?????à???????????????????????????????????????·???????à?????ó???ù?è???????????????è???????????????????ó??

???????? 20 ????????????????±????????????à?????????ú?ú???????¤·?????·¨???????????ú?ú???ù±???×??????ú?ú×°???????????????????ó??×?????×°???è??°??????¨?????ò?÷?????????????±?±???????????????????????????§???????é???????????????????ú?¨?????ù???ó?????????????????ò?????????????????ú???????è?????????????è??????????×????????????????????÷???è????°?×°????????·??±·????????????¤·???°????????????????±?±?????????????????????ò?????±??????×è°????????¤?????ò?°·???[2]????????±???×??????ú?¨??????????????????±ê???????à???????????????ì?è?????????????????????÷?¤??×°?????????ù??????20 ???? 60 ?ê?ú????Digital Equipment Corporation?¨?????ú DEC ????????·??????????¨??±à???????????÷?¨PLC?????????ú GM?¨?¨??????????×?????×°?????????????§??????????????PLC ?????÷????×??¨?????????????·?ò???????????????ú????????????????????×??? RAM ????°ü???????????????¨??????????????

???????ú????PLC ????·??????±?????????ò???¤???????ò?????????????°?????????????°???????·???????ì?§?????? 200 ?????ú?·????????°??????ó???ú?ú?§???÷??????±?????????OMRON(?·?·?ú)?????????ú?? SIEMENS(?÷??×?)??????·¨?ú?? TE?????????????????????ò??????????????

?????????ú???ó???? PLC?§???????????????????ú?·??·á??,???????ó?? PLC?????±?????????à?????? PLC , ?????????????§?á???ê???????×·????????????ú?í?×???????ú?????????¨???????????è????±à???í???????? IEC61131-3 ±ê×????¨??????????????????±í?????è?????????ó???§???? PLC ?????????à??·????????????????à?????????????? DCS ???????????????ê?????¤??????????[9]???±?????????ó?? PLC?§??????????·¨×??????¨??????±????í?????????ú?¨?ò?ú?·??????????[3]??

???????°???????ú???? PLC ??·????????????ì???ü?????????????????????í???ü???ù?????§???????????ü??????????±à???í???????§???ü?à??±à??·?????????????±à???í????×???·????ü?????????????ú???? PLC ±à???í???????????ó???÷??????????????·?±??????????????í?ó????????????????????·????????±?????????????????????????????????÷???¤?????????é??????????·??¤×÷???????????¤?????????×???ó?? PLC ?§?????÷???¤×÷?????ê??±à???í??????????????·????????¤????????????×?Windows 10 ??????????°??????ú????????????·???????±??????????????÷?????????é????????±????í?????÷??×???±à???í????

??????????PLC??????????

????????×??????é
????????×??????é

?????÷???????·
?????÷???????·

?????÷?¤×÷???·
?????÷?¤×÷???·

???????????·
???????????·

Altium Designer ?ú?? PCB °???
Altium Designer ?ú?? PCB °???

PLC ?í??????????
PLC ?í??????????

???¨?¤??
???¨?¤??

??????±à??????
??????±à??????

?? ??

?????? ??
????Abstract
?????? 1 ?? ?÷ ??
????????1.1 ??±à???????????÷?¨PLC?????ú?·
????????1.2 ??±à???????÷(PLC???ú??????·???×???
????????????1.2.1 ?ú?? PLC ??·???×???
????????????1.2.2 ?ú?? PLC ??·???×???
????????1.3 ??????????????????
????????????1.3.1 ??????????????
????????????1.3.2 ±????÷???¤×÷????
????????1.4 ±??????á
?????? 2 ?? ?????? PLC ????×????è??·?°?
????????2.1 ?í??×????è
????????????2.1.1 ?è???è?ó
????????????2.1.2 ?????? PLC ?í???è??·?°?
????????????2.1.3 ??·??¤????????
????????2.2 IEC61131-3 ±ê×?
????????????2.2.1 ????
????????????2.2.2 IEC61131 ±ê×???????
????????????2.2.3 IEC61131-3 ??±à??????
????????2.3 ?????è??????
????????2.4 ±??????á
?????? 3 ?? ?????? PLC ?í???????è??
????????3.1 ??????±à???÷???è??
????????????3.1.1 ???????????é??
????????????3.1.2 ??????±à???÷???è??
????????????3.1.3 ????????±í??
????????????3.1.4 ????????????
????????????3.1.5 ???????????????è??
????????3.2 ????±í±à?????é??????
????????3.3 ??????×?????????±í????
????????????3.3.1 ?????á??
????????????3.3.2 ???????í?ó???í??·?
????????????3.3.3 ??????×?????????±í??·¨
????????3.4 ????±í×???????????
????????????3.4.1 ×???????
????????????3.4.2 ????????????
????????3.5 ????±í?? C ??????×???
????????3.6 ????????????????
????????????3.6.1 ????????????·??????÷??
????????????3.6.2 C ????×????? 16 ??????????
????????3.7 ±à???????è??
????????????3.7.1 ?÷?ò???è??
????????????3.7.2 ?????è??
????????????3.7.3 ?¤?????è??
????????????3.7.4 ×????????è??
????????3.8 ±??????á
?????? 4 ?? ?????? PLC ?????¨???è??
????????4.1 RS-232 ?????¨???ò?é
????????4.2 PLC ??????·?
????????????4.2.1 ???¨?à????
????????????4.2.2 ?¨?????é?????¨
????????????4.2.3 ?????¨???ú??
????????4.3 ?à??????
????????4.4 ±???????
?????? 5 ?? ?????? PLC ???????·??????????
????????5.1 ???????é?é??
????????????5.1.1 ???????????·???é
????????????5.1.2 ?????÷?¤×÷???·???é
????????????5.1.3 ???????· PCB °?
????????5.2 ???ú????
????????5.3 ±??????á
?????? 6 ?? ×??á??????
????????6.1 ????×??á
????????6.2 ????????
?????? ??
???????????×

?¨???ú?è???é??±???±????è???????????ú??????·??÷????

    ?à??????
    ?????????¨???????÷?????ú?á???ú×?±????è???°?÷ר??±?????????×÷?¨??·?????
    ?ù????????×????ù?????????????í×??????°???????????????ù??????????·??????????à???§?°???÷??????????±?×?????×?????·?·¨??????
    ??????·??ú??°??¨?ò?????????ú?????????????????????????????¨???????á?????????????ò????????????!