Skip to content

feat(inputs.s7comm): Add support for LREAL and LINT data types #16999

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

Merged
merged 8 commits into from
May 16, 2025

Conversation

andriizaiets
Copy link
Contributor

Summary

This pull request adds support for two additional Siemens S7-1200/1500 PLC data types in the inputs.s7comm plugin:

  • LREAL (64-bit floating point)
  • LINT (64-bit signed integer)

Tested in real data:

online

Config:

fields = [
        {name="SPAC1_Wp", address="DB226.LR208"},
        {name="SPAC1_Wq", address="DB226.LR216"},
     ]

Test run:

./telegraf.exe --config ./TP.conf --test --print-plugin-config-source
2025-05-13T08:12:04Z I! Loading config: ./TP.conf
2025-05-13T08:12:04Z I! Starting Telegraf unknown (customized) brought to you by InfluxData the makers of InfluxDB
2025-05-13T08:12:04Z I! Available plugins: 8 inputs, 0 aggregators, 1 processors, 2 parsers, 1 outputs, 0 secret-stores
2025-05-13T08:12:04Z I! Loaded inputs: s7comm
+--------+------------+
| NAME   | SOURCE(S)  |
+--------+------------+
| s7comm | ./TP.conf |
+--------+------------+
2025-05-13T08:12:04Z I! Loaded aggregators:
2025-05-13T08:12:04Z I! Loaded processors:
2025-05-13T08:12:04Z I! Loaded secretstores:
2025-05-13T08:12:04Z W! Outputs are not used in testing mode!
2025-05-13T08:12:04Z I! Tags enabled: host=DESKTOP-*******
2025-05-13T08:12:04Z W! [agent] The default value of 'skip_processors_after_aggregators' will change to 'true' with Telegraf v1.40.0! If you need the current default behavior, please explicitly set the option to 'false'!
> TP4,host=DESKTOP-******* SPAC1_Wp=1392694.4442324082,SPAC1_Wq=157475.73630031067 1747123925000000000

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #16985

@telegraf-tiger telegraf-tiger bot added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels May 13, 2025
@telegraf-tiger
Copy link
Contributor

Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @andriizaiets! Just two small style suggestions...

@srebhan srebhan self-assigned this May 13, 2025
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two more small things then we are good to go...

Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks @andriizaiets!

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label May 16, 2025
@srebhan srebhan assigned skartikey and mstrandboge and unassigned srebhan May 16, 2025
@skartikey
Copy link
Contributor

@andriizaiets Thanks for your contribution!

@skartikey skartikey merged commit 370f050 into influxdata:master May 16, 2025
23 of 24 checks passed
@github-actions github-actions bot added this to the v1.35.0 milestone May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[inputs.s7comm] Add support for LREAL and LINT data types
4 participants