PLC培训讲义(欧姆龙PLC).pdf
?1-1?.?60?1968?GM?1?2?3?4?5?6?7?115v?8?115v?2A?9?10?4K?1969?DEC?GM?1980?NEMA?Programmable Controller?PC?.?1969?PLC?PLC?70?PLC?70?80?PLC?1.PLC?PLC?1984?48?150?PLC?1987?63?243?PLC?1996?70?300?PLC?AB?Allen?Bradley?MODICON?GE?FANUC?TI?Texas Instrument?WESTHOUSE Electric?IPM?International Parallel Machines?PLC?60?:?Siemens?1973?PLC?Klockner Moeller Gmbh?AEG?TE(Telemecanique?(?Selectron?1971?PLC?PLC?PLC?40?(MITSUBISHI),?(OMRON),?Fuji Electric?,?TOSHIBA?,?KOYO),?MEW?,?IDEC?,?(SHARP?,?2.PLC?1974?75?1979?MODICON?584?PLC?PLC?1985?PLC?MELSEC-F?PLC?1990?Siemens?Allen Bradley?PLC?1995?PLC?PLC?PLC?Siemens?PLC?PLC?PLC?70?80?PLC?PLC?PLC?PLC;?AB?PLC?PLC;?OMRON?;?Siemens?3.PLC?1?CPU?nS?2M?2?3?PLC?4?I?0?5?6?OMAC?open Modular Architecture for Control?4.PLC?Automation Research Co?ARC?1994?PLC?5?PLC?:SIEMENS?Allen?Bradly?Rockwell)AEG Schneider?,OMRON(?1996?PLC?1-2?PLC?IEC?1982?11?1985?1?“?”?PLC?1?I?O?I?O?32?PLC?I?O?32?128?PLC?I?O?128?256?PLC?I?O?256?1024?PLC?I?O?1024?PLC?I?O?4000?PLC?I?0?2?PLC?PLC?CPU?I?0?PLC?PLC?PLC?CPU?I?0?PLC?PLC?PLC?PLC?PLC?PLC?1?(I/O)?2?PLC?8K?PLC?256K2M?3?PLC?PLC?1K?ms/K?4?PLC?PLC?(?3-5?PLC?PLC?I/O?PLC?SIEMENS?Windows?IEC1131?3?PLC?1-3?PLC?PLC?80?PLC?8?PLC?PLC?1?CPU?nS?2M?2?3?PLC?4?I?0?5?6?OMAC?open Modular Architecture for Control?2-1 PLC?PLC?CPU?ROM/RAM?/?I/O? PLC?COM?COM?物紊网精空?紊种C?CPU?EPROM?RAM?PLC? 1?Central Processor Unit?CPU?CPU?1?2?3?4?CPU?5?CPU?1?8086?80286?80386?2?8031?8096?3?AMD-2900 2?1?ROM?PLC?CPU?2?RAM?EPROM?EEPROM?CPU?按钮按钮按钮按钮 选 择选 择选 择选 择开关开关开关开关 限 位限 位限 位限 位开关开关开关开关 电源电源电源电源 接触器接触器接触器接触器 电磁阀电磁阀电磁阀电磁阀 指示灯指示灯指示灯指示灯 电源电源电源电源?PLC?3?ON/OFF?/?ON/OFF?A/D?PLC?3?/?/?PLC?I/O?COM X0 X1 X2 X3 X4 X5 X6 X7 汇点式汇点式汇点式汇点式 4?Power Supply?CPU?I/O?5VDC?24VDC?200mA?5?,?PLC?6?“?”?“?”?PLC?PLC?PLC?PLC?(CRT)?PLC?7?I/O?PLC?I/O?8?Programmer?COM1 Y0 Y1 COM2 Y2 Y3 分组式分组式分组式分组式 YO COM0 Y1 COM1 Y2 COM2 分割式分割式分割式分割式 ?LCD?CRT?.?1?:?:?2?:?PLC?9?PLC?EPROM?PLC?1?2?2-2?PLC?“?”?1?a?SB1?KM1?KM1?KM2?KT?1?a?CPU?/?1?b?1?b?PLC?PLC?CPU?PLC? PLC的等效电路图:的等效电路图:的等效电路图:的等效电路图:PLC SB1 SB2 ST KOM 0000 0000001 0000002 000?0000 0500 0001 0002 0500 公共端公共端公共端公共端 公共端公共端公共端公共端 输入部分输入部分输入部分输入部分 输出端子输出端子输出端子输出端子 输入端子输入端子输入端子输入端子 用户程序用户程序用户程序用户程序 输出部分输出部分输出部分输出部分 PLC SB1 SB2 KM ST 0000 0001 0002 0500 KOM KM FU KH M 3 Q KM KOM 0500 主电路主电路主电路主电路 PLC接线接线接线接线 ?PLC?PLC?OMRON P?用继电器控制:通过变换接线改变控制功能;用继电器控制:通过变换接线改变控制功能;用继电器控制:通过变换接线改变控制功能;用继电器控制:通过变换接线改变控制功能;用用用用PLC控制控制控制控制:通过改变程序改变控制功能。通过改变程序改变控制功能。通过改变程序改变控制功能。通过改变程序改变控制功能。用继电器控制与用用继电器控制与用用继电器控制与用用继电器控制与用PLC控制的区别:控制的区别:控制的区别:控制的区别:KM Q FU KH M 3 SB1 SB2 KM KH KM KM PLC SB1 SB2 KH 继电器控制接线继电器控制接线继电器控制接线继电器控制接线:PLC控制接线:控制接线:控制接线:控制接线:PLC的的的的 负负负负载载载载 PLC的输入设的输入设的输入设的输入设备备备备 I/O?I/O?I/O?WDT?WDT?,?I/O?PLC?PLC?PLC?PLC?T T=?+?+?+I?0?PLC?I?0?=?+?+?+?T?1ms?ms?空工?Y憾恶?X憾?Y43?3-1?Sequential Function Chart=SFC?1?2?3?LAD?Ladder Diagram?1?2?1?2?3?1?2?Function Block Diagram=FBD?Instruction List?PLC?S7?PLC?STL(Statement List)?SR S1 Q1 R AND OR Test1 Test2 Sw1%1X3 Reset start ?Structured Text=ST?IEC1131-3?PASCAL BASIC C?32 PLC?1?/?2?3?XO YO X1 Y1 Y2 X3 Y3 LD X0 OUT Y0 LDI X1 OUT Y1 OUT Y2 LD X3 OUT Y3?X0X1X影Y?4?5?6?憾 憾 憾 憾?种D X?工 种D X 工影 A 算 D X 影恶 精 网B憾 精 芯 脉 Y?执 执 执 执?种D X工工 A算D X影影 精网 X?恶 精芯脉 Y? 33 OMRON PLC?PLC?16?0?1?(?)?OMRON PLC?24?0015?1?/?I/O?1?PLC?PLC?000019?2?PLC?PLc?010019?种DX?工种D X工影精网X影恶A算B憾精芯脉Y?执 执 执 执?憾 憾 憾 憾? 2?IR?PLC?PLC?IR200IR235?3?SR?PLC?SR?SR236SR299?SR?SR25313?SR25314?SR25315?SR25400?1?30?30?SR25401?0.02?0.01?0.01?SR25500?0.1?0.05S?0.05S?SR25501?0.2?0.1S?0.1S?SR25502?1?0.5S?0.5?SR25503?ER)?SR25504?CY)?SR25505?GR)?SR25506?EZ)?SR25507?LE)?4?AR?AR?AR?AR00AR27?AR0000AR2715?5?DM?DM?16?DM?DM0000DM6143?DM6144DM6655?DM?DM?DM0000DM0999?6?HR?/?HR?PLC?HR?HR00HR99?HR0000HR9915?7?LR?PLC?PLC?PLC?LR?LR00LR63?LR0000LR6315?8?/?TC?TC?TC?TIM000TIM512?CNT000CNT512?9?(TR?)TR?8?LD?OUT?TR?TR?TR?TR00TR07?3-4?工富种D?种D?种D?A算D算精脉?工 精芯脉工?种D?影 A算D?恶 影富种D算精脉?种D算精脉?种D算精脉?A算D算精脉工?精芯脉工?影 种D算精脉?影 A算D?恶 精芯脉工?恶 恶富A算D?A算D?种D? A算D?工 精芯脉工?影 种D算精脉?影 A算D?恶 精芯脉工?恶 憾富A算D算精脉?A算D算精脉?种D?A算D算精脉?工 精芯脉工?影 种D算精脉?影 A算D算精脉?恶 精芯脉工?恶 执富精网?精网?种D?精网?影 A算D算精脉?工 精芯脉工?影 换富精网算精脉?精网算精脉?种D?精网算精脉?影 A算D算精脉?工 精芯脉工?影 握富A算D种D?A算D种D?种D? 精网算精脉?影 种D算精脉?工 精网?恶 A算D种D 精芯脉工?影8?OR LD?OR LD?LD 00000 AND NOT 00001 LD NOT 00002 AND 00003 OR LD OUT 10002 9?OUT?LD 00000 AND NOT 00001 OUT 10002 LD NOT 00002 AND NOT 00003 OUT 10003 10?TR?TR?LD 00000 OUT TR0 AND NOT 00001 OUT 10002 LD TR0 AND 00003 OUT 10003 11?SET?RESET?00000?,?10002?.?00002?,?10002?.?00000?00002?,RESET?.LD 00000 SET 10002 LD 00002 RESET 10002 12?TIM-?(?)?00000?,?,?20?,?TIM000?,?10002?.?00000?,?,?10002?.LD 00000 TIM 000#200 LD TIM000 OUT 10002 13?CNT-?(?)?00000?CNT000?,?CNT000?200?,?CNT000?,?10002?.?00001?,?10002?.LD 00000 LD 00001 CNT 000#200 LD CNT000 OUT 10002 14?CNTR-?/?,?II?DI?,?0?SV?.?00000?,?1.?00001?,?1.?,?.?0000?,?SV?,?CNTR 000?,?10002?.LD 00000 LD 00001 LD 00002 CNTR 000 SV=200 LD CNTR 000 OUT 10002 ?1.?NOP?(FUN 00)?2.?END?(FUN 01)?3?IL(02)?ILC(03)?IL?ILC?1?IL?2?3?4?IL?ILC?5?IL?ILC?6?IL-IL-ILC?LD 00000 AND 00001 IL(02)LD 00002 AND NOT 00003 OUT 10000 LD 00004 OUT 10001 ILC(03)4?JMP(04)?JME(05)?00000?00001?1?00000?00001?2?00000?00001?JMP?JME?/?3?JMP-JME?8?8?JMP?4?JMP-JMP-JME?LD 00000 AND 00001 JMP(04)LD 00002 AND NOT 00003 OUT 10000 LD NOT 00005 AND 00004 OUT 10001 LD 00006 OUT 10002 JME(O5)5?SFT?FUN10)?1?2?SFT?-?3?HR000-HR915?4?32?+1?LD 00000 LD 25502 LD 00001 SFT(FUN10)010 010 LD 01000 OUT 10000 LD 01001 OUT 10001 LD 01015 OUT 10015 6?KEEP?FUN11)?1?2?a.?1?1?b.?1?0?c.?3?4?00000?1600?10000?10001?7?FUN12)?1?00000?0?1?2.1500.?00002?1500?1499.?00001?2?1?2?3?4?3?DM?8?DIFU(FUN13)?DIFD(FUN14)?1?DIFU?DIFU?00000?10000?2?DIFD?DIFD?00000?10000?9?MOV(FUN21)?MVN(FUN22)?1?MOV?MVN?MOV?MVN?IR,SR,AR,DM,HR,TC,LR,#?IR,SR,AR,DM,HR,LR.?2?1?1.?16?000?PLC?00000-00015?16?HR0?HR000-HR015.?100?PLC?10000-10015?00100?2?00000?1600?#F8C2?HR2?10?CMP(20)?16? C1?C2?ON?C1?C2?C1 C2?25505 ON?C1=C2?25506 ON?C1 C2?25507 ON?11?ADD?30?ADB?50?语句格式:CMP(20)C1 C2 CMP(20)C1 C2 图形符号 20000 CMP(20)00 HR0 00000 DIFU(13)20000 25506 25505 25507 01002 01001 01000 1 LD 00000 2 DIFU?13?20000 3 LD 20000 4 CMP?20?00 HR0 5 LD 25505 6 OUT 01000 7 LD 25506 8 OUT 01001 9 LD 25507 10 OUT 01002 MOV(21)#0016 LR00?6?00100 ADB(50)DM0000 DM0001 DM0002 END 20001 BSET#0000 DM0000 DM0004 MOV#0025 LR01 BIN(23)LR00 DM0000 BIN(23)LR01 DM0001 ADD(30)LR00 LR01 DM0100 MOV(21)DM0002 010 BCD(24)DM0002 DM0003 DIFU(13)20000 20000 00101 DIFU(13)20001?010? ?PLC?41?PLC?1.?a.?PLC?b.?c.?2.I/O?a.?PLC?b.?PLC?3.?a.?b.?c.?4.?PLC?5.?a.?(?b.?END?c.?6.?5?7.?42?1?1?PLC?E?PLC?PLC?PLC?2?3?PLC?I/O?PLC?X0?X1?X2?X3?Y0?Y1?4?X 工Y?Y?X 影Y 工Y工Y工Y?X影X工?0 LD X1 7 LD X2 14 END 1 OR Y0 8 OR Y1 2 ANI Y1 9 ANI Y0 3 ANI X2 10 ANI X1 4 ANI X0 11 ANI X0 5 ANI X3 12 ANI X3 6 OUT Y0 13 OUT Y1 CNT000 TIM001#0005 TIM001 DIFD?14?1000 ?PLC?1?2?CPM1A?PLC?1?00100=ON?1?2?3?DM0000DM0002?00101=ON?2?0010000107?010000107?00104=ON?5?0100001004?0100501007?0100001007?00011111?1FH?00104=OFF?5?1?1?1?2?TIM/CNT?1?TM?3s?2?1?2?31s?2?00100?END 00101 00100?1?1?00101 MOV#0001 DM0000 MOV#0002 DM0001 MOV#0003 DM0002 BSET#0000 DM0000 DM0002 ?2?3?1?2?TIM/CNT?1?CNT?TIM?2?2?00100?01001?01002?01003)?01001?01002?01003?1?2?3?4?2?5.5s 7s 10s 8.5s END 20000 00100?3?2?01001 TIM000 TIM001 TIM000 TIM001 TIM002 TIM001 TIM002 TIM003 TIM002 01003 01003 01002 01003 00100 01000 TIM000 5.5S 01002 01001 01003 01002 01003 TIM002 10S TIM003 8.5S TIM001 7.0S DIFD 20000 ?CNT?1?CNT?CNT?0?ON?1?25500?0.1s?2?4?1?2?1?SFT?8?2?SFTR?0.2s?1?5?1?BIN?2?/?BIN?(123+321)影恶委影恶憾执工影恶 END?5?1?20000 25502 SFT 010 010 00100 20000 01008 25314 CNT 010#0003 END 20001?4?2?CNT010 20001 20000 01001 CNT011 20001 01002 01003 20000 01002 01001 CNT 011#0003 20000 CNT 012#0003 CNT012 01003 00100 DIFU 20001 20001 20000 ?1?00101=ON?00100=ON?2?DM0000DM0010?/?6?1?2?7?35s?30s?30s?1s?0.5s?0.5s?3s?2s?2s?25s?20s?20s?3s?2s?2s?I/O?00100?01000?01001?01002?01100?01101?01102?8?00101?6?00100 SBB DM0001#2345 DM0002 ADB#123#321 DM0000 MLB DM0000#23 DM0001 DVB DM0002#123 DM0003 END 00100 BSET#0000 DM0000 DM0004 ?1?2?1s?25502?3?9?7?s 30 3 2 20 3 2 30?8? PLC?PLC?握富换?1?复?复?复?复?复?复?复?善?)复紊种C?善?紊种C?END 00100?9?TIM001 TIM002 TIM001 TIM000 01002 TIM000 01100 TIM000 30S 01001 01000 TIM001 33S TIM005 TIM002 35S TIM003 55S TIM004 58S TIM005 60S 25502 01002 01101 01002 TIM004 TIM002 TIM003 01100 25502 01102 TIM003 01101 TIM004 TIM005 01002 01000 01001 01102?)?复 紊种C?复?复?紊种C复?紊种C?复?复?复?2?PLC?紊种C?复?善工)?紊种C?复?紊种C?紊种C?紊白D?复紊种C?复?紊种C?善影)?复?复?白屋?散复?紊种C?善恶)?紊种C?复紊种C?复?紊种C?白屋精?复?紊种C?紊种C?复?白屋精?复?影恶?紊种C?白屋?复?紊种C复?紊种C?复?善憾)紊种C?复紊种C?复?紊种C?白屋?紊种C?复?紊种C?复?白屋?白屋精?白屋?紊种C?复?紊种C?善执)?紊种C?紊白D?复?白屋精?紊种C?紊种C?复?复?复?复?委紊种C?复?善换)?紊种C?紊种C?复紊种C?紊种C?C网脉?紊种C?3?白屋?紊种C?复?白屋精?憾复散复工换复恶影?换憾?复?1?复?工工?草复影影?草?复?2?复?复?复?复?复?复?复?复?复?复?复?4?1?善?)?善?)?复?复?2?紊种C?复?紊种C?复?紊种C?紊种C复?样?紊种C复?复?复?紊种C?3?紊种C?白屋?复?白屋?复?复?紊种C复?复?复?复?复?复?复?4?复?紊种C?5?复?复?复?复?复?复?复?复?复?换?紊种C?复?复?复?复?紊种C?复?善?)?复?善?)?复?复?复?复?复?复?复?紊种C?复?复?复紊种C?7?复?紊种C?复?复?紊种C?复?8?复?复?复?更?紊种C?样?紊种C?复?复?样?样?复? 71?复?紊种C?紊种C?工富?复?富?复?复?复?复?复?复?影富?复?复?复?复?紊种C?复?善?复?)?复?复?复?恶富?复?复?复?复?复?复?复?憾富?复?复?复?复?紊种C?复?复?握委工?工富?复?复?复?复?复?复?善?)复?复?善?)?复?复?复?复?精?复?复?复?复?复?复?复?复?复?复? 72 影富?善工)?善?)?复?善?)?善影)?复?复?复?复?联握委影?脉验oo?善恶)?复?复?复?善憾)?C紊芯?复?善执)?复?复?善换)?复?复?善握)?精善散)?复?精?复?恶富?复?复?复?复?复?执?复?4.?复?复?复?复?复?复?复?复?复?复?复?复?复?复?复?复?复?复?复?复?执富?复?复?复?复?复?换富?复?复?复?更 73 善工)?善影)?复?复?善恶)?