燕山大学PLC课程设计报告书
2.7 流程图
开始SB1SA1-2开关选择SA1-1交通系统正常工作SA1-3南北向绿灯常亮,东西向红灯常亮,数码管显示99
东西向交通灯常绿,南北向南北方向东西方向东西方向红灯常亮,数码管显示99南北向绿灯亮25s南北向绿灯闪东西向红灯亮烁3s30s南北黄灯亮2s东西向绿灯亮25s南北向红灯亮东西向绿灯闪烁3s东西向黄灯亮2s图2.7 十字路口交通灯流程图9
燕山大学PLC课程设计报告书
2.8 状态转移图
M8002初始化脉冲X000X001S0X002X003X004S41Y000南北绿灯常亮T0S21X002X003X004南北绿灯亮25sK250东西红灯亮30sK300X002X003X004Y000T0S31T5Y005T5S51南北红Y002灯常亮Y003东西绿灯常亮数码管显示99不变Y005东西红灯常灭数码管显示99不变25s倒计时S32S23T1K530s倒计时Y003T6东西绿灯亮25sK250T6T1S22M03s倒计时S24Y000C0T2T7C0S35C0南北绿灯闪3s25s倒计时K3K5S34T7K5S33Y003C1东西绿灯闪3sK3K5M13s倒计时T2T2T8S23C1T8S25南北黄灯Y001亮2sRSTT3T3C0K20S36Y004RSTT9东西黄灯亮2sC1C1T8S342s倒南北红灯计时亮30sS26Y002T4K300T9K202s倒计时T430s倒计时S0RETEND图2.8 十字路口交通灯状态转移图
10
燕山大学PLC课程设计报告书
2.9 步进梯形图
X000M100X001M100M8002S0STLM100SETX002X003X004SETX002X002X003X003X004X004SETS51Y000Y000T0Y000MOVY000Y000Y000M8013T0BCD D10T0T0T0DECT0SETSETS22S23M10M10T10M10MOVM10M10T10BCD D40T10SEGDM8013T10DECD40K1M0K2Y010K2M0K3D40K30D10K2M0K28D10K250SETSETS21S31S41S0S21STL SEGDSEGDK1M0K1M4K2Y010K2Y020S22STLS23STLM11T1T1M11K5S24Y000C0T2C0T2SETS23S25C0T2SETRETK3K5SETS24STLY000Y000S22STLS24STLS25STLY001Y001Y001MOVY001Y001M8013T3T3BCDT3T3SEGDK1M0D50K2RSTT3Y001C0K20D50K2M0K2Y010DECD10S26Y002T4K300D60K2M0S26STLSETY002Y002Y002Y002Y002M8013S31STLT4T4MOVBCDT4SEGDT4SEGDK1M4K1M0K30D60K2Y010K2Y020DECD60Y005T5K300D20K2M20Y005Y005Y005Y005Y005M8013T5T5DECSETT5BCDT5SEGDT5SEGDK1M24K1M20D20MOVK30K2Y030K2Y040D20S32
11
燕山大学PLC课程设计报告书
S32STLY003Y003T6Y003MOVY003Y003Y003M8013T6BCD D70T6T6T6DECT6SETSETS33S34M12M12T11M12MOVM12M12T11BCD D80T11SEGDM8013T11DECD80K1M20K2Y030K2M20K3D80K30D70K2M20K28D70K250 SEGDSEGDK1M20K1M24K2Y030K2Y040S33STLS34STLM21T7T7M21K5S35Y003C1T8C1T8SETS34S36C1T8SETRETK3K5SETS35STLY003Y003S33STLS35STLS36STLY004Y004Y004MOVY004Y004M8013S41STLM3T9BCDT9T9SEGDK1M20D90K2RSTT9Y004C1K20D90K2M20K2Y030DECD90M3Y000M3Y005Y000MOVY000BCDY000SEGDY000SEGDY005MOVY005BCDY005SEGDY005S51STLM4Y002M4Y003Y002MOVY002BCDY002SEGDY002SEGDY003MOVY003BCDY003SEGDY003S26STLS36STLT4T9SETRETS0SEGDK1M0K1M0K2Y030K2Y040D30K1M0K9D30K1M0K2Y020K1M0K2Y010D30K1M0K9D30SEGDK1M0K1M0K2Y030K2Y040M4D30K1M0K9D30K1M0K2Y020K1M0K2Y010D30K1M0K9D30
图2.9 步进梯形图
12