解2:X000X001Y000X002X003Y001X004Y002X005Y003图6-79 题6-11程序X000N0=M100X001MCN0M100Y000X002X003MCN1=M101X004X005N1M101Y001LD X000 LD X004MC NO OUT Y002 M100 LDI X005LD X001 OUT Y003OUT Y000 MCR N1LD X002 MDR N0OUT Y001LDI X003MC N1 M101Y002MCRY003MCRMCRN1N0
6-12. 设计一个四组抢答器,任一组抢先按下按健后,显示器能及时显示该组的编号并使蜂鸣器发出响声,同时锁住抢答器,使其它组按下按键无效。抢答器有复位开关,复位后可重新抢答,设计其PLC程序。 解:
PLC的I/O接点分配输入接点分配SB0SB1SB2SB3SB4X000X001X002X003X004输出接点分配abcdefY001Y002Y003Y004Y005Y006ag1组蜂鸣器2组蜂鸣器3组蜂鸣器4组蜂鸣器Y007Y011Y012Y013Y014SB0SB1SB2SB3SB4复位1组2组3组4组X000X001Y001Y002Y003Y004Y005Y006Y007Y011Y012Y013Y014COMbcdefgefabFX-16MRX002X003X004g2NcdCOMVccPLC的I/O接线图显示器的驱动真值表及驱动方程输入驱动输出显示组号 辅助继电器Y001(a)Y002(b)Y003(c)Y004(d)Y005(e)Y006(f)Y007(g)1 M12 M23 M34 M4Y001=M2+M3Y005=M20110111110110110Y003=M1+M3+M4Y007=M2+M3+M401000001Y004=M2+M30111Y002=M1+M2+M3+M4Y006=M4
梯形图程序如下:
X000M0MCN0=M100X001M1X002M2X003M3X004M4M1M2M3M1M2M4M1M3M4M2M3M4N0M0M100M1Y011M2Y012M3Y013M4Y014M2Y001M3Y004M1M2M3M4M1M3M4M2Y005M4M2M3M4MCRN0Y006Y007Y003Y002adbcefgEND
X000M0MCN0=M100X001X002X003X004M5M0N0M5M100X001M1X002M2X003M3X004M4M2M5M1M5M2M5M3M5M4Y001M3Y004M1M2M3M4M1Y003M3M4M2Y005M4M2M3M4M5Y000T1K10T1Y000adbY002cefgY006Y007MCRENDN0
6-13 设计一个节日礼花弹引爆程序。礼花弹用电阻点火引爆器引爆。为了实现自动引爆,以减轻工作人员频繁操作的负担,保证安全,提高动作的准确性,采用PLC控制,要求编制以下两种控制程序。
(1)1~12个礼花弹,每个引爆间隔为;13~14个礼花弹,每个引爆间隔为。 (2)1~6个礼花弹引爆间隔,引爆完后停10s,接着7~12个礼花弹引爆,间隔,引爆完后又停10s,接着13~18个礼花弹引爆,间隔,引爆完后再停10s,接着19~24个礼
花弹引爆,间隔。引爆用一个引爆启动开关控制。 解:
X000Y000T200T200Y001T201K10T201Y002T202T202Y003T203K10T203Y004T204T204Y005T205K10T205Y006T206T206Y007T207T207Y010T208T208Y011T209K10T209Y012T210T210Y013T211T211Y014T212T212Y015K20K20T210Y013T211K1000T209K10K10T209Y012T210K10T222Y027T221Y026T222K10T208Y011K10T207Y010T208K10T220Y025T221K10K10T206Y007T207K10T219Y024T220K10T205K10Y006T206K10T218Y023T219K10T205K1000T217Y022T218K10K10T204Y005T203Y004T204K10T203Y021T217K1000T203K10T215Y020T216K10K10T202Y003T201Y002T202K10T214Y017T215K10K10T200Y001T201K10T213Y016T214K10Y000T200K10T212Y015T213K10A’T211Y014T212K10B’X000ENDABEND(1)(2)6-15 设计3分频、6分频功能的梯形图。