Skip to content

add: modbus example server and client, requirements and Chinese README - #2978

Open
sjysjy8868 wants to merge 1 commit into
pymodbus-dev:devfrom
sjysjy8868:add-modbus-examples
Open

add: modbus example server and client, requirements and Chinese README#2978
sjysjy8868 wants to merge 1 commit into
pymodbus-dev:devfrom
sjysjy8868:add-modbus-examples

Conversation

@sjysjy8868

Copy link
Copy Markdown

No description provided.

@janiversen janiversen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please solve the CI problems (ruff formatting)

Easiest way is to use ./check_ci.sh, that makes the changes automatically.

Comment thread client_poll.py
@@ -0,0 +1,64 @@
#!/usr/bin/env python3

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This example belongs in examples/contrib, we do not allow files at top level.

Comment thread README.md
@@ -0,0 +1,47 @@
# pymodbus 示例:本地 Modbus TCP 从站(模拟器)与轮询客户端

@janiversen janiversen Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You cannot overwrite the standard README !!!

I suggest you make a directory: examples/contrib/chinese and add your files there.

Or change the names of the files so they start with chinese_

Comment thread server.py

def main():
# Create initial data blocks (100 items each)
store = ModbusSlaveContext(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is no longer being used, please use SimData instead.

Comment thread server.py
@@ -0,0 +1,64 @@
#!/usr/bin/env python3

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please explain what is the difference between the standard example and this one ??

Comment thread requirements.txt
@@ -0,0 +1 @@
pymodbus>=2.5

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You cannot overwrite the standard requirements.txt !!!

Pymodbus do NOT support python 2.5 !

@janiversen

Copy link
Copy Markdown
Collaborator

Any progress on the requested changes ???

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

Successfully merging this pull request may close these issues.

2 participants