MODULE MainModule VAR signaldi signaldi14; PROC main()
//di14_test 数字输入信号 WHILE di14_test = 1 DO ycld; SetGO go_07deng, 0; // 灯 组信号 FOR i FROM 1 TO 6 DO pmd; ENDFOR ENDWHILE ENDPROC PROC line_ligth() //流水灯 SetGO go_07deng, 1; WaitTime 1; SetGO go_07deng, 3; WaitTime 1; SetGO go_07deng, 7; WaitTime 1; SetGO go_07deng, 15; WaitTime 1; SetGO go_07deng, 31; WaitTime 1; SetGO go_07deng, 63; WaitTime 1; SetGO go_07deng, 127; WaitTime 1; SetGO go_07deng, 255; WaitTime 1; SetGO go_07deng, 0; ENDPROC
PROC run_ligth() // 跑马灯 SetGO go_07deng, 1; SetGO go_07deng, 0; WaitTime 0.5; SetGO go_07deng, 2; SetGO go_07deng, 0; WaitTime 0.5; SetGO go_07deng, 4; SetGO go_07deng, 0; WaitTime 0.5; SetGO go_07deng, 8; SetGO go_07deng, 0; WaitTime 0.5; SetGO go_07deng, 16; SetGO go_07deng, 0; WaitTime 0.5; SetGO go_07deng, 32; SetGO go_07deng, 0; WaitTime 0.5; SetGO go_07deng, 64; SetGO go_07deng, 0; WaitTime 0.5; SetGO go_07deng, 128; SetGO go_07deng, 0; WaitTime 0.5; ENDPROC ENDMODULE