Cloud-Automation / node-modbus

Modbus TCP Client/Server implementation for Node.JS
471 stars 175 forks source link

V3 Server - F15: Write Multiple Coils #186

Closed RenanGarcia closed 6 years ago

RenanGarcia commented 6 years ago

I found this problem with function 0x0F

Request 1: F15, Reference number: 0, values: 1111 (4 coils) expected in server.coils: <Buffer 5F 55 55>

Inicialization
server.coils:     <Buffer 55 55 55>

server.on('writeMultipleCoils'...     server.coils: <Buffer 55 55 55>
server.on('postWriteMultipleCoils'... server.coils: <Buffer 00 55 55>

Request 2: F15, Reference number: 6, values: 1111 (4 coils) expected in server.coils: <Buffer D5 55 55>

Inicialization
server.coils:     <Buffer 55 55 55>

server.on('writeMultipleCoils'...     server.coils: <Buffer 55 55 55>
server.on('postWriteMultipleCoils'... server.coils: <Buffer F5 55 55>

Request 3: F15, Reference number: 8, values: 1111 (4 coils) expected in server.coils: <Buffer 55 5F 55>

Inicialization
server.coils:     <Buffer 55 55 55>

server.on('writeMultipleCoils'...     server.coils: <Buffer 55 55 55>
server.on('postWriteMultipleCoils'... server.coils: <Buffer 55 D5 55>