发表于:2005/3/6 14:51:00
#0楼
我刚开始搞PLC,用的是S7-200。就是以下这个程序,//NETWORK COMMENTS
//
LD SM0.1
S M0.0, 1
NETWORK 2
LD M0.0
A I0.1
S M0.1, 1
R M0.0, 1
NETWORK 3
LD M0.1
A I1.0
S M0.2, 1
R M0.1, 1
NETWORK 4
LD M0.2
A I0.2
S M0.3, 1
R M0.2, 1
NETWORK 5
LD M0.3
A I0.4
S M0.4, 1
R M0.3, 1
NETWORK 6
LD M0.4
A I0.6
S M0.5, 1
R M0.4, 1
NETWORK 7
LD M0.5
A I1.2
S M0.6, 1
R M0.5, 1
NETWORK 8
LD M0.6
A I0.7
S M0.7, 1
R M0.6, 1
NETWORK 9
LD M0.7
A I0.5
S M1.0, 1
R M0.7, 1
NETWORK 10
LD M1.0
A I0.3
S M0.0, 1
R M1.0, 1
NETWORK 11
LD M0.1
O M0.2
O M0.3
O M0.4
= Q0.0
NETWORK 12
LD M0.3
O M0.4
O M0.5
O M0.6
O M0.7
= Q0.1
NETWORK 13
LD M0.4
O M0.5
O M0.6
= Q0.2
NETWORK 14
LD M0.5
= Q0.3
NETWORK 15
LD M0.6
= Q0.4
NETWORK 16
LD M0.7
= Q0.5
NETWORK 17
LD M1.0
= Q0.6
我把程序下到PLC上,只有刚把电源接上的一个回合是正确的,运行第二次就是错的,
我用STEP 7-MicroWIN 32把PLC调制成STOP,然后RUN,在没有输人的情况下就有输出,肯请各位老师帮助!!
//
LD SM0.1
S M0.0, 1
NETWORK 2
LD M0.0
A I0.1
S M0.1, 1
R M0.0, 1
NETWORK 3
LD M0.1
A I1.0
S M0.2, 1
R M0.1, 1
NETWORK 4
LD M0.2
A I0.2
S M0.3, 1
R M0.2, 1
NETWORK 5
LD M0.3
A I0.4
S M0.4, 1
R M0.3, 1
NETWORK 6
LD M0.4
A I0.6
S M0.5, 1
R M0.4, 1
NETWORK 7
LD M0.5
A I1.2
S M0.6, 1
R M0.5, 1
NETWORK 8
LD M0.6
A I0.7
S M0.7, 1
R M0.6, 1
NETWORK 9
LD M0.7
A I0.5
S M1.0, 1
R M0.7, 1
NETWORK 10
LD M1.0
A I0.3
S M0.0, 1
R M1.0, 1
NETWORK 11
LD M0.1
O M0.2
O M0.3
O M0.4
= Q0.0
NETWORK 12
LD M0.3
O M0.4
O M0.5
O M0.6
O M0.7
= Q0.1
NETWORK 13
LD M0.4
O M0.5
O M0.6
= Q0.2
NETWORK 14
LD M0.5
= Q0.3
NETWORK 15
LD M0.6
= Q0.4
NETWORK 16
LD M0.7
= Q0.5
NETWORK 17
LD M1.0
= Q0.6
我把程序下到PLC上,只有刚把电源接上的一个回合是正确的,运行第二次就是错的,
我用STEP 7-MicroWIN 32把PLC调制成STOP,然后RUN,在没有输人的情况下就有输出,肯请各位老师帮助!!