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

Bug when writing more than 12 Boolean variables #8

Open
FiloCara opened this issue Oct 18, 2022 · 0 comments
Open

Bug when writing more than 12 Boolean variables #8

FiloCara opened this issue Oct 18, 2022 · 0 comments

Comments

@FiloCara
Copy link

FiloCara commented Oct 18, 2022

Hello

There is a bug which prevent to write more than 12 Boolean variables at the same time.
This issue is strictly related to the one I opened a while ago for the node-red-contrib-s7 package (st-one-io/node-red-contrib-s7#90)

Steps to reproduce:
Write more than 12 Boolean variables at the same time using the writeItems method of the S7ItemGroup class. This raises a request timeout.

Problem:
After investigating, the problem seems related to the way the reqItemLength variable is computed.

A writing_var (s7) request for multiple Boolean variables requires the following bytes:

  • HEADER: 10 bytes
  • PARAMETERS: 2 bytes + 12 bytes per variable
  • DATA: 4 bytes per variable + 1 byte per variable + 1 extra fill byte per variable (something like a separator character)

The reqItemLength does not take into account the fill byte.
I'm going to open a pull request to fix it.

Filippo

FiloCara pushed a commit to FiloCara/nodes7 that referenced this issue Oct 18, 2022
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

1 participant