plcpeople / mcprotocol

node.js implementation of the MC (MELSEC communication) protocol to exchange data with Mitsubishi FX programmable controllers.
MIT License
99 stars 40 forks source link

Question about mcprotocol.js writing to X017 #2

Closed armour23 closed 5 years ago

armour23 commented 5 years ago

Hi

Firstly, thank you for developing this interface. It is very useful.

I have an FX3U-64M with an FX-ENET-ADP. I was testing the writing of X017 and based on the manual for FX-ENET-ADP the MC code should be: 00 FF 0A 00 11 00 00 00 20 58 01 00 10

However, mcprotocol.js seems to be writing the code: 00 FF 0A 00 0F 00 00 00 20 58 01 00 10

and it works. Can you let me know how does "X017" translate to the fifth hex character to be "0F" instead of "11"? "11" is the hex representation of 17.

Thanks!

armour23 commented 5 years ago

Hi there

I found the answer - turns out that the X inputs are from X000 - X007, X010 - X017, X020 - X027, and X030 - X037. Their corresponding MC codes are in running order in hexadecimal.

Thanks for reading!

plcpeople commented 5 years ago

Great - it's good to hear the software is working well for you.