Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalData while trying to write multiple coils #51

Open
Ziemix opened this issue Nov 26, 2019 · 0 comments
Open

IllegalData while trying to write multiple coils #51

Ziemix opened this issue Nov 26, 2019 · 0 comments

Comments

@Ziemix
Copy link

Ziemix commented Nov 26, 2019

I'm trying to write multiple coils at once but I'm getting IllegalData error. I can write single coils without any problem, maybe that's not the format that I should use? If not, what should I use instead? Also, how should I format the buffers for writing registers?

modbus.tcp.connect(device.port, device.ip, { debug: null }, (err, connection) => {
                connection.writeMultipleCoils({address: address, value: [1,0,0,0,1,1,1,0], extra: {unitId: device.id_slave}}, (err, data) => {
                });
          });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant