我想讓4個(gè)彩燈循環(huán)移動(dòng),可我找的例子全是8個(gè)彩燈循環(huán)移動(dòng)。8個(gè)彩燈循環(huán)移動(dòng)的例子,程序如下:
Network 1
LD SM0.1
MOVB 16#05, QB0 將00000101 送給QB0,這是8位,實(shí)現(xiàn)8位循環(huán)移動(dòng) ,怎么才能變成4位循環(huán)移動(dòng)?這里16#05是個(gè)任意初始值。
Network 2
LD I0.0
EU
LD I0.0
EU
A M0.0
NOT
LPS
A M0.0
= M0.0
LPP
ALD
O M0.0
= M0.0
Network 3
LD M0.0
AN T37
TON T37, 10
Network 4
LD I0.1
EU
LD I0.1
EU
A M0.1
NOT
LPS
A M0.1
= M0.1
LPP
ALD
O M0.1
= M0.1
Network 5
LD T37
LPS
A M0.1
RLB QB0, 1
LPP
AN M0.1
RRB QB0, 1