sunnykmc
SunnyKMC
级别: 工控侠客
精华主题: 0
发帖数量: 286 个
工控威望: 3745 点
下载积分: 28918 分
在线时间: 413(小时)
注册时间: 2014-04-20
最后登录: 2024-08-27
查看sunnykmc的 主题 / 回贴
楼主  发表于: 2019-01-14 16:37
三菱FX2N有什么指令可BIT转移给d寄存器值
及d寄存器值反转BIT值回中号
d寄存器最大值不知能否到255(及反转时)或者最大到?
比如
M0 = OFF,M1 = OFF,M2 = OFF,M3 = OFF <=>则D0 = 00
M0 = ON,M1 = OFF,M2 = OFF,M3 = OFF <=>则D0 = 01
M0 = OFF,M1 = ON,M2 = OFF,M3 = OFF <=>则D0 = 02
M0 = ON,M1 = ON,M2 = OFF,M3 = OFF <=>则D0 = 03
M0 = OFF,M1 = OFF,M2 = ON,M3 = OFF <=>则D0 = 04
M0 = ON,M1 = OFF,M2 = ON,M3 = OFF <=>则D0 = 05
M0 = OFF,M1 = ON,M2 = ON,M3 = OFF <=>则D0 = 06
M0 = ON,M1 = ON,M2 = ON,M3 = OFF <=>则D0 = 07
M0 = OFF,M1 = OFF,M2 = OFF,M3 = ON <=>则D0 = 08
M0 = ON,M1 = OFF,M2 = OFF,M3 = ON <=>则D0 = 09
M0 = OFF,M1 = ON,M2 = OFF,M3 = ON <=>则D0 = 10
M0 = ON,M1 = ON,M2 = OFF,M3 = ON <=>则D0 = 11
M0 = OFF,M1 = OFF,M2 = ON,M3 = ON <=>则D0 = 12
M0 = ON,M1 = OFF,M2 = ON,M3 = ON <=>则D0 = 13
M0 = OFF,M1 = ON,M2 = ON,M3 = ON <=>则D0 = 14
M0 = ON,M1 = ON,M2 = ON,M3 = ON <=>则D0 = 15



==========以下新增另一延伸问题==========
如果要"范围单一M"(M0~M254)转为D寄存器值或反转BIT值回M
M0~M254只要一个没有ON,则D0=0
M0=ON <=>D0=1
M1=ON <=>D0=2
M2=ON <=>D0=3
M3=ON <=>D0=4
M4=ON <=>D0=5
M5=ON <=>D0=6
M6=ON <=>D0=7
M7=ON <=>D0=8
M8=ON <=>D0=9
M9=ON <=>D0=10
M10=ON <=>D0=11
M11=ON <=>D0=12
M12=ON <=>D0=13
M13=ON <=>D0=14
M14=ON <=>D0=15
M15=ON <=>D0=16
:
M254=ON <=>D0=255
又有何指令支援
[ 此帖被sunnykmc在2019-01-14 17:21重新编辑 ]
money11
教养体现细节.细节展示素质.
级别: 略有小成
精华主题: 0
发帖数量: 174 个
工控威望: 345 点
下载积分: 1195 分
在线时间: 132(小时)
注册时间: 2007-11-19
最后登录: 2024-12-03
查看money11的 主题 / 回贴
1楼  发表于: 2019-01-15 14:23
书上不是都有吗    整页指令表随便用