-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
fix(inputs.s7comm): Fix bit queries #14068
Conversation
Limit extra param to [0-7]. Allows query of bit address 0.
Do you think it will take long before robinson/gos7 will be patched? |
Working on a PR to fix this. At least 2b34129 is necessary anyway. |
Can you mark specifically what needs to be reverted when the fix is released upstream? |
Both needs to be changed back to telegraf/plugins/inputs/s7comm/s7comm.go Line 43 in f4c56e1
telegraf/plugins/inputs/s7comm/s7comm_test.go Line 260 in 0c1e213
|
Please mark that in the code. (If @srebhan agrees to that) |
@phagemann I would love to see this fixed upstream in Can you fix this upstream? I've created some PRs there and usually they are quick in merging that stuff... |
That's fine with me. I will do the upstream fix and come back afterwards 😃. |
@phagemann it looks like your upstream issue was closed due to your fix in robinson/gos7#65 Are we good to update the version of s7comm instead of this PR now? |
Then the title and commit message need to be updated, @phagemann needs to confirm my original question, and afterwards we can re-review |
@powersj In order to solve this, I need to adjust the MR. Just updating won't work. Shouldn't be much work, but I would like to test it on a real system. If everything works well, I will have one available by the end of the week.
|
Correct Typo. Co-authored-by: Thomas Casteleyn <[email protected]>
Co-authored-by: Thomas Casteleyn <[email protected]>
Thank you all, but I found the fix made to resolve【Allow PDU-size to be set as config option】 problem( https://github.com/influxdata/telegraf/pull/14045) were not included |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@phagemann looks good overall, only two minor comments from my side...
Co-authored-by: Sven Rebhan <[email protected]>
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 👍 This pull request doesn't change the Telegraf binary size 📦 Click here to get additional PR build artifactsArtifact URLs |
I tried to use the last PR(telegraf-1.29.0~92c29c75_windows_amd64) to fetch about 90 items data from a smart 200 PLC, the log shown error message as below:[ I set pdu_size = 200] |
The error message is produced by Gos7. You should not exceed a pdu-size of 20. This is the maximum number of elements contained in a request batch. It does not limit the number of total items. Please try to set set it back to 20 or lower.
|
But when I set pdu-size to 20 , the message in log will shown: 2023-11-13T00:19:27Z D! [inputs.s7comm] Reading batch 1... |
Now your CPU (smart 200) complains about the pdu-size beeing too large. Try lowering it, until the CPU stops reporting this error. Not sure, whether this is this the right place, as it referring to a already closed issue. It is not relevant for this MR. |
Thanks, this method resolved the problem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this @phagemann!
(cherry picked from commit 19c3d26)
resolves #14043
Update Gos7 to allow query of bits. Enforce valid range (0-7).