我想让4个彩灯循环移动,可我找的例子全是8个彩灯循环移动。8个彩灯循环移动的例子,程序如下:
Network 1
LD SM0.1
MOVB 16#05, QB0 将00000101 送给QB0,这是8位,实现8位循环移动 ,怎么才能变成4位循环移动?这里16#05是个任意初始值。
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