plcpeople / mcprotocol

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

how can i read data from kv-ep21v connect sensor pr-g51n with mcprotocol #15

Open NguyenDucQuan12 opened 1 week ago

NguyenDucQuan12 commented 1 week ago

I have the following connectors: kv-3000, kv-c32x, kv-ep21v connected to the pr-g51n photoelectric sensor. I want to get the signal when the sensor is blocked, however I have tried most of the ways but still cannot read the signal, does this library work with Keyence plc? image image

plcpeople commented 1 week ago

I don't think it will work with a Keyence PLC - I have never used one but I can't find any information suggesting a Keyence PLC talks using the exact same protocol as a Mitsubishi. You might have better luck getting data out of it using Modbus/TCP, using the "mbtcpprotocol" library of ours or many other Modbus implementations in JS or other language. Can anyone comment who knows more about Keyence?