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

Append data to getAttributeSingle #64

Open
greg9504 opened this issue May 5, 2024 · 1 comment
Open

Append data to getAttributeSingle #64

greg9504 opened this issue May 5, 2024 · 1 comment

Comments

@greg9504
Copy link

greg9504 commented May 5, 2024

For explicit messages sent using getAttributeSingle it would be useful to add an optional parameter with a buffer. This buffer is appended to the message. Some ethernet/IP devices require additional information beyond the class/instance/attribute. See this issue for a description for such a case for a SEW drive #62
Code/documentation change for PR is here:
https://github.com/greg9504/ST-node-ethernet-ip/tree/ExplicitMsgWithData

@SerafinTech
Copy link
Owner

for connecting to a device for explicit messaging that is not a PLC I put Buffer.alloc(0) as the slot number. This will blank out the slot part of the path.

controller.connect('192.168.1.1', Buffer.alloc(0), false)

The devices I have tested will throw a error if you put a 0 for slot number

and I pushed your PR with a little change. I didn't add any documentation yet.

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

No branches or pull requests

2 participants