您好,欢迎访问三七文档
当前位置:首页 > 建筑/环境 > 工程监理 > codesys编程手册(下)-(第2部分-共2部分)
乎ᑣ㸼92㸼.NO.ᦣ䗄˖WAGO-I/O-PRO32⊼˖55-5ᰃ55-6ᰃ55-7ᰃ55-8ᰃ55-9ᰃ55-10ᰃ55-11ᰃ55-12ᰃ55-13ᰃ55-14৺55-15ᰃ55-16ᰃ55-17ᰃ56-1STᣛҸᰃ56-2ᰃ56-3ᰃ56-4ᰃ56-5ᰃ56-6ᰃ56-7ᰃ56-8ᰃ56-9ᰃ56-10ᰃ57-1ᔶ䇁㿔৺57-2ᰃ57-3৺57-4ᰃ57-5৺57-6ᰃ㞾⬅ⱘFBDЁ57-7৺57-8ᰃ㞾⬅ⱘFBDЁ57-9৺57-10ᰃWAGO-I/O-SYSTEM759WAGO-I/O-PRO32乎ᑣ㸼93㸼.NO.ᦣ䗄˖WAGO-I/O-PRO32⊼˖57-11৺57-12ᰃ57-13৺57-14ᰃ㞾⬅ⱘFBDЁ58-1ᔶᠻ㸠ࠊ(䏇䕀䖨ಲ)ᰃ58-2ᰃ58-3ᰃ58-4ᰃ58-5ᰃ58-6ᰃ58-7ᰃ58-8ᰃ59-1ࡼ↡㒓ᰃ59-2ᰃ60-1LD䖲ܗӊᰃ60-2ᰃ61-1㾺⚍ᰃ61-2ᰃ61-3ᰃ61-4ᰃ61-5৺61-6৺61-7৺61-8৺62-1㒓ᰃ62-2ᰃ62-3ᰃ62-4ᰃ62-5৺62-6৺62-7৺62-8৺WAGO-I/O-SYSTEM759WAGO-I/O-PRO32乎ᑣ㸼9462-9৺䱣খ᭄ᠻ㸠乍Ⳃ˖ᦣ䗄˖WAGOI/OPRO322.1.1Փ⫼ᆊ⡍᳝ᄫヺՓ⫼’$’Ϣ’#’ˈᔶ䇁㿔Ёϡᖙ⫼’!’’|’˄ܼൟ࣪˅DŽ2.1.2ᷛ䆚ヺⱘ᳔䭓ᑺ≵᳝䰤ࠊ2.1.5⊼䞞ⱘ᳔䭓ᑺ≵᳝䰤ࠊ2.2.3.1ᣕ㓁ᯊ䯈ⱘ㣗ೈ2^32↿⾦=49,712.3.1TIMEব䞣ⱘ㣗ೈTIME_OF_DAYব䞣ⱘ㣗ೈDATE_AND_TIMEব䞣ⱘ㣗ೈ1970-01-01-00:00.2106-02-06-06:28:151970-01-01ü2106-02-062.3.3᭄㒘ϟᷛⱘ᳔᭄㒧ᵘܗ㋴ⱘ᳔᭄↣ϾໄᯢЁব䞣ⱘ᳔᭄3≵᳝䰤ࠊ≵᳝䰤ࠊ2.3.3.1ᵮВؐⱘ᳔᭄ϡᬃᣕ2.3.3.2ᄫヺІব䞣ⱘ咬䅸᳔䭓ᑺᄫヺІব䞣ܕ䆌ⱘ᳔䭓ᑺ80ᄫヺ255ᄫヺ2.4.1.1ㄝ㑻ⱘ᳔᭄䘏䕥⠽⧚ᇘ4⠽⧚ᇘ2.4.1.2᳔ϟ᳔᭄ᷛϟᷛ㣗ೈ᳔㒧ᵘԧㄝ㑻364KB≵᳝䰤ࠊ2.4.3↣ϾໄᯢЁব䞣ⱘ᳔᭄≵᳝䰤ࠊ2.5POUᠻ㸠ᯊ䯈ⱘֵᙃϡᬃᣕ2.5.1.1ࡳ㛑㸼䖒ⱘᮍ⊩ৡᄫ2.5.1.5ᠽሩࡳ㛑ⱘ᳔䕧᭄ܹ≵᳝䰤ࠊ2.5.2.3.3䅵᳔఼᭄ᇣؐ䅵᳔఼᭄ؐ-32768+327672.5.3ᑣᆍ䞣䰤ࠊ32KB2.6.2ऩℹऴ⫼ᯊ䯈㊒ᑺ↣ϾSFCⱘ᳔ℹ᭄1ms≵᳝䰤ࠊ2.6.3↣ℹ↣ϾSFCⱘ᳔䕀ᤶ᭄≵᳝䰤ࠊ2.6.4ࡼᠻ㸠ᴎࠊㅔऩℹЁ↣Ͼᕾ⦃ᠻ㸠ϔϾࡼˈᔧIEC-StepsЁⱘℹ㹿▔⌏ᯊˈࡼḍࡼࠊഫⱘ䇗⫼㒧ᵰᴹᠻ㸠2.6.4.2↣ϾℹЁⱘࡼഫⱘ᳔᭄↣ϾIEC_StepЁࡼഫⱘ᳔᭄110WAGO-I/O-SYSTEM759WAGO-I/O-PRO32乎ᑣ㸼95乍Ⳃ˖ᦣ䗄˖WAGOI/OPRO322.6.5ℹ⢊ᗕⱘᔶᰒ⼎Ӵ䗕ᮁᓔᯊ䯈䲚Ёߚᬷ㒧ᵘⱘ᳔ᆑᑺℹব៤㪱㡆ϔϾࠊᕾ⦃ݙ≵᳝䰤ࠊ2.7.1RESOURCEᑧⳂᔩϡᬃᣕ2.7.2ӏࡵḍⳂᷛˈӏࡵᬃᣕӬܜ䴲Ӭܜ䇗ᑺˈ䗮䖛џӊᅮᯊ఼㾺থˈৃҹߚ䜡Ӭܜ㑻˄0-31˅DŽ3.3.2.3CASE䗝ᢽⱘ᳔᭄≵᳝䰤ࠊ3.3.2.4FORᕾ⦃Ёⱘ᳔㒜ࠊব䞣ؐϞ䰤ؐⱘৢ䴶ϔℹ4.1.1ᔶ㸼⼎⊩ѢFBD㒧ᵘⱘ㔥㒰ᢧᠥ䰤ࠊ᠔᳝ᔶҙĀᷥൟā㸼䖒ᓣܕ䆌ᏺϾЁ䯈㒧ᵰDŽे䰸њ䌟ؐ㒧ᵰˈϡ㛑ᇚ䕧ߎ㒓ߚ↉DŽぎ䯆FBDЁⱘ㔥㒰ᢧᠥ≵᳝䰤ࠊDŽ4.1.3䖨ಲᕾ⦃ⱘ䌟ؐ乎ᑣѢFBDⱘ㒧ᵘЁˈᢧᠥϡᬃᣕᰒᗻᕾ⦃DŽ䱤ᗻᕾ⦃Ёˈ䌟ؐ乎ᑣ⬅⫼᠋ᅮНDŽぎ䯆FBЁᬃᣕᰒᗻᕾ⦃DŽ䌟ؐ乎ᑣ⬅⫼᠋ᅮН˗ডПˈ⫼᠋ৃᅮН䌟ؐ乎ᑣ˄ҢᎺࠄেˈҢϞࠄϟ˅᭄⌕䌟ؐ乎ᑣ˄Ң䕧ܹࠄ䕧ߎ˅DŽWAGO-I/O-SYSTEM759WAGO-I/O-PRO32乎ᑣ㸼96WAGO-I/O-SYSTEM759WAGO-I/O-PRO32খ㗗᭛⤂9721খ㗗᭛⤂21.1㣅᭛R.W.Lewis“ProgrammingindustrialcontrolsystemsusingIEC1131-3”TheinstitutionofElectricalEngineers,LondonISBN0-8529695-0-3;PleasenoteUPDATEDIN1997Dr.Monari,Prof.BonfattiandDr.Sampieri“IEC1131-3ProgrammingMethodology”SoftwareengineeringmethodsforindustrialautomatedsystemsISBN2-9511585-0-521.2ᖋ᭛Hans-JoachimAdam,MathiasAdam“SPS”ProgrammiereninAnweisungslistenachIEC1131-3ElektorVerlag,AachenISBN3-89576-048-XKarl-HeinzJohn,MichaelTiegelkamp“SPS-ProgrammierungmitIEC1131-3KonzepteundProgrammiersprachen,AnforderungenanProgrammiersysteme,EntscheidungshilfenSpringerVerlagBerlinHeidelberg1997ISBN3-540-62639-5WAGO-I/O-SYSTEM759WAGO-I/O-PRO32খ㗗᭛⤂98PeterNeumann,EberhardE.Grötsch,ChristophLubkoll,RenéSimon“SPSStandard:IEC61131”ProgrammierunginverteiltenAutomatisierungssystemenR.OldenbourgVerlagMünchenWien1998,ISBN3-486-27005-2VDE-Schriftenreihe-Normenverständlich“IEC61131-3-Wozu?”I.Rolle(Hrsg.)A.Lehmann,H.-P.Otto,L.Trapp,H.WegmannVDE-Verlag,BerlinISBN3-8007-2309-3PeterWratil“ModerneProgrammiertechnikfürAutomatisierungssysteme”EN61131(IEC1131)verstehenundanwendenVogelVerlagWürzburg1996ISBN3-8023-1575-821.3㔥ഔᴃ䇁㸼9922ᴃ䇁㸼㒱ᇍഄഔ(AbsoluteAddress)Փ⫼⡍⅞ᄫヺІᴹ㸼⼎ऩ⣀ⱘݙᄬऩܗ˖ϔϾᄫヺ˖ⱒߚো˄%˅ѠϾᄫヺ˖ഄഔऎ˄I=䕧ܹഄഔऎˈQ=䕧ߎഄഔऎˈM=ݙᄬഄഔऎ˅ϝϾᄫヺ˖ݙᄬ䭓ᑺ˄X=ԡˈB=ᄫ㡖ˈW=ᄫˈD=ঠᄫ˅᳔ৢᄫヺ˖ഄഔ՟བ˖%IX4.15䜡㕂˄Configuration˅1ϾPLC㋏㒳ⱘ᳔催㑻߿ˈࣙ1Ͼ㢹ᑆϾ䌘⑤DŽ᭄㉏ൟ˄Datatype˅⫼ѢᅮНব䞣ⱘⳌ݇ሲᗻˈ՟བ᭄ؐ㣗ೈϢԡⱘ䭓ᑺDŽໄᯢഫ˄Declarationblock˅POUЁব䞣ⱘໄᯢ䚼ߚࣙ᠔ໄᯢⱘব䞣߫㸼DŽᇐߎ᭄㉏ൟ˄Deriveddatatypes˅ᰃѢᴀ᭄㉏ൟⱘ㞾ᅮН᭄㉏ൟDŽᴀ᭄㉏ൟ˄Elementarydatatypes˅ヺড়IEC61131-3ᷛޚⱘ乘ᅮНᴀ᭄㉏ൟDŽՓ㛑䕧ܹ˄ENInput˅Փ⫼ẃᔶLDࡳ㛑ഫFBD㓪ᯊˈ⫼ѢPOUⱘՓ㛑䕧ܹッDŽᔧՓ㛑䕧ܹッⱘ᭄ؐЎTRUEᯊˈ䆹POUᠻ㸠DŽWAGO-I/O-SYSTEM759WAGO-I/O-PRO32ᴃ䇁㸼100FBࡳ㛑ഫ˄FunctionBlock˅ⱘ㓽ݭFBDᑣ䆒䅵䇁㿔-ࡳ㛑ഫ˄FunctionBlockDiagram˅ⱘ㓽ݭࡳ㛑ഫᅲ՟˄FBinstance˅ᰃࡳ㛑ഫⱘ㒧ᵘ᭄ഫⱘࠊˈҢ㗠ܕ䆌ᇍᏆ㒣߯ᓎⱘ㒧ᵘ˄՟བˈᷛޚࡳ㛑ഫ˅ҹϡৠⱘখ᭄䖯㸠Փ⫼DŽ᭄ഫݙ䚼ᄬټⴔࡳ㛑ഫⱘݙ䚼᭄ؐϢ⢊ᗕDŽඳ˄Field˅Ⳍৠ᭄㉏ൟⱘϔ㋏߫ܗ㋴DŽᷛ䆚˄Flag˅⠽⧚ഄഔᄬټऎFUNࡳ㛑˄Function˅ⱘ㓽ݭFunctionࡳ㛑POUˈⳌৠⱘ䕧ܹؐᘏᰃ៤⫳Ⳍৠⱘ㒧ᵰ˄Ў䖨ಲؐ˅ˈ↣䇗⫼ৢϡֱᄬЎሔ䚼ব䞣DŽFunctionblockࡳ㛑ഫPOUˈᠻ㸠ᯊӮᕫࠄϔϾϾ᭄ؐˈৃҹЎϔϾሔ䚼ব䞣˄“ݙᄬ”˅ֱᄬDŽFunctionblockdiagram(㓽ݭЎFBD)Ѣ㔥㒰ᔶˈࣙᣀࡳ㛑ࡳ㛑ഫⱘᑣ䆒䅵䇁㿔DŽPOUⱘ䘏䕥Ϣ䖤ㅫҹഫ˄Block˅ⱘᮍᓣ㸼⼎DŽIEC61131-3WAGO-I/O-SYSTEM759WAGO-I/O-PRO32ᴃ䇁㸼101Ң1993ᑈᓔྟⱘ᳝PLCࡳ㛑ⱘ⦄ҷ㋏㒳ⱘ䰙ᷛޚˈᰃѢϔ⾡㒧ᵘ࣪ⱘ䕃ӊᓣˈᅗᅮНњϔ㋏߫催ᗻ㛑ⱘ㓪䇁㿔⫼Ѣ⾡㞾ࡼ࣪ӏࡵDŽILᑣ䆒䅵䇁㿔-䇁হ㸼˄InstructionList˅ⱘ㓽ݭInstructionlist˄㓽ݭЎIL˅ᑨ⫼ᑓ⊯ⱘѢ᭛ᴀ䇁㿔ⱘPLCᑣ䆒䅵䇁㿔ˈ䖥ԐѢ∛㓪䇁㿔(ϢStep5/Step7㉏Ԑ)I/OperipheryϔϾ㡖⚍Ёᏺ⠽⧚䖛ڣഄഔⱘ䕧ܹ䕧ߎᵓDŽLadderDiagram˄㓽ݭЎLD˅Ѣᔶⱘᑣ䆒䅵䇁㿔ˈ݊ॳ⧚ᰃ⫼㾺⚍㒓ⱘ⬉ᄤಲ䏃ᴹ㸼⼎䖲DŽLDᑣ䆒䅵䇁㿔-ẃᔶ˄LadderDiagram˅ⱘ㓽ݭPLCৃ㓪䘏䕥ࠊ఼˄ProgrammableLogicController˅㓽ݭDŽPOULibraryϔ㒘POUⱘ䲚ড়ˈ⫼Ѣ㓪Ҏਬᇍࠊᑣⱘ߯ᓎDŽPROGᑣ˄PROGRAM˅ⱘ㓽ݭDŽProgramᑣᰃ᳔催ㄝ㑻ⱘPOUˈᑣЁৃҹ䇗⫼ࡳ㛑ࡳ㛑ഫDŽᑣⱘᠻ㸠ᯊ䯈ḍӏࡵᴹ⹂ᅮDŽWAGO-I/O-SYSTEM759WAGO-I/O-PRO32ᴃ䇁㸼102ProgrammableFieldbusControllerৃ㓪⦄എᘏ㒓ࠊ఼-WAGOᏺPLCࡳ㛑ⱘ⦄എᘏ㒓䗖䜡఼ˈ⫼Ѣ-ֵোⱘ乘໘⧚-䇈ᯢ⦄എᘏ㒓ᬙ䱰ᚙމϟⱘডᑨ-ߚᏗᓣᱎ㛑䆒ProgrammableLogicController˄㓽ݭЎPLC˅⫼ѢᎹϮ㞾ࡼ㋏㒳Ёࠊǃ䇗㡖ǃⲥ㾚ǃৃ㾚࣪ҹঞ᭄䞛䲚᭄໘⧚ⱘ䚼ӊDŽProjectࣙᣀϔϾࠊᑣⱘ᠔᳝ᇍ䈵˄POUǃ᭄㉏ൟǃৃ㾚ᗻ࣪ܗ㋴ǃ䌘⑤Ϣᑧ᭛ӊ˅DŽ䌘⑤˄Resource˅䜡㕂䇁㿔ܗ㋴ˈ䌘⑤ᰃ⬅ӏࡵᑣߚ䜡ⱘDŽSequentialFlowDiagram˄㓽ݭЎSFD˅乎ᑣ⌕ᑣ䆒䅵䇁㿔ˈᑣЁᦣ䗄ϡৠࡼⱘᯊ䯈乎ᑣDŽSFC乎ᑣ⌕˄SequentialFlowChart˅ⱘ㓽ݭDŽST㒧ᵘ࣪᭛ᴀ˄StructuredText˅ⱘ㓽ݭDŽᷛޚࡳ㛑ഫ˄StandardFunctionblocks˅⬅IEC1131-3ᅮНⱘ⒵䎇ࠊ㋏㒳Џ㽕ࠊ㽕∖ⱘࡳ㛑ഫDŽWAGO-I/O-SYSTEM759WAGO-I/O-PRO32ᴃ䇁㸼103ℹ˄Step˅SFCᑣЁ⫼ѢࣙᣛҸⱘऎඳDŽᔧ䆹ℹ㹿▔⌏ᯊˈ݊ᣛҸ㹿ᠻ㸠DŽStructuredText˄㓽ݭЎST˅ࣙϔ㋏߫ᣛҸˈᠻ㸠ᮍᓣ㉏Ԑᷛޚ䇁㿔˄՟བPascal˅ⱘᑣ䆒䅵䇁㿔DŽ՟བ߸ᮁ䇁হ(IF...THEN...ELSE)ᕾ⦃䇁হ(WHILE...DO)DŽӏࡵ˄Task˅⫼ѢᅮНᑣࡳ㛑ഫⱘᠻ㸠DŽ䕀ᤶ˄Transition˅ձ䕀ᤶ⢊ᗕˈҢϔϾSFCℹ䕀ᤶࠄϟϔℹDŽ䕀ᤶᴵӊ˄Transitionconditions˅SFCᑣЁᠻ㸠ϟϔℹⱘᴵӊ(Ꮧᇨؐ)DŽব䞣˄Variable˅䗮䖛ব䞣ໄᯢˈҹᶤϔϾ᭄㉏ൟ᠔ᅮНⱘ᭄ࣙؐⱘ᭄ᄬټऎDŽৃҹ㒭ব䞣ߚ䜡⠽⧚ഄഔ˄䕧ܹǃ䕧ߎǃᷛᖫヺ˅DŽব
本文标题:codesys编程手册(下)-(第2部分-共2部分)
链接地址:https://www.777doc.com/doc-1463616 .html