首页 > 专家说

plc编程实例

来源:新能源网
时间:2024-08-17 10:18:34
热度:

plc编程实例【专家解说】:TITLE=程序注释
Network 1 // 网络标题
// 网络注释
LD SM0.1
MOVW +0, VW0
Network 2
LD I0.

【专家解说】:TITLE=程序注释 Network 1 // 网络标题 // 网络注释 LD SM0.1 MOVW +0, VW0 Network 2 LD I0.0 EU INCW VW0 Network 3 LDW>= VW0, +2 AN Q0.2 = M0.0 Network 4 LDW>= VW0, +3 AN Q0.3 = M0.1 Network 5 LD I0.2 EU A M0.0 O Q0.2 AN Q0.3 AN T37 TON T37, +80 = Q0.2 Network 6 LD Q0.2 ED -I +2, VW0 Network 7 LD M0.0 LD SM0.5 A Q0.2 OLD = Q0.0 Network 8 LD I0.3 EU A M0.1 O Q0.3 AN Q0.2 AN T38 TON T38, +80 = Q0.3 Network 9 LD Q0.3 ED -I +3, VW0 Network 10 LD M0.1 LD SM0.5 A Q0.3 OLD = Q0.1 Network 11 LD Q0.2 ED LD Q0.3 ED OLD O Q0.4 AW> VW0, +0 = Q0.4 Network 12 LD I0.4 O Q0.5 AW> VW0, +0 = Q0.5 Network 13 // LD SM0.5 EU A Q0.5 DECW VW0 我编了个你看看i0.0 1元硬币i0.2 买汽水i0.3 买咖啡i0.4 退币q0.0 汽水灯q0.1咖啡灯q0.2倒汽水q0.3倒咖啡q0.4退币指示灯q0.5退币