sunnykmc
SunnyKMC
級(jí)別: 工控俠客
精華主題: 0
發(fā)帖數(shù)量: 286 個(gè)
工控威望: 3745 點(diǎn)
下載積分: 28918 分
在線時(shí)間: 413(小時(shí))
注冊(cè)時(shí)間: 2014-04-20
最后登錄: 2024-08-27
查看sunnykmc的 主題 / 回貼
樓主  發(fā)表于: 2019-01-14 16:37
三菱FX2N有什么指令可BIT轉(zhuǎn)移給d寄存器值
及d寄存器值反轉(zhuǎn)BIT值回中號(hào)
d寄存器最大值不知能否到255(及反轉(zhuǎn)時(shí))或者最大到?
比如
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)轉(zhuǎn)為D寄存器值或反轉(zhuǎn)BIT值回M
M0~M254只要一個(gè)沒有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重新編輯 ]
w45062099
多做事,少說話!
級(jí)別: 略有小成
精華主題: 0
發(fā)帖數(shù)量: 340 個(gè)
工控威望: 450 點(diǎn)
下載積分: 1293 分
在線時(shí)間: 1045(小時(shí))
注冊(cè)時(shí)間: 2014-10-23
最后登錄: 2024-12-20
查看w45062099的 主題 / 回貼
1樓  發(fā)表于: 2019-01-14 19:25
DECO、ENCO
本帖最近評(píng)分記錄:
  • 下載積分:+5(sunnykmc) 真誠(chéng)感謝!
  • 每天只要小小一步都是在進(jìn)步!
    w45062099
    多做事,少說話!
    級(jí)別: 略有小成
    精華主題: 0
    發(fā)帖數(shù)量: 340 個(gè)
    工控威望: 450 點(diǎn)
    下載積分: 1293 分
    在線時(shí)間: 1045(小時(shí))
    注冊(cè)時(shí)間: 2014-10-23
    最后登錄: 2024-12-20
    查看w45062099的 主題 / 回貼
    2樓  發(fā)表于: 2019-01-14 22:44
    字時(shí)只能K4
    每天只要小小一步都是在進(jìn)步!