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

add modbus gateway approach (slave tcp - master serial) #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alisitsyn
Copy link
Owner

This example demonstrates using of FreeModbus stack port implementation for ESP32 targets as a TCP gateway device.
This implementation is able to read/write requests from external TCP Master and translate them to the slave devices connected into Modbus segment. The Modbus data dictionary is not used but the mapping areas are defined in the Modbus TCP Slave to reflect the values in its memory (this can be disabled). The Gateway gets requests from Slave TCP instance and translates the request to installed Modbus Master instance previously configured. The translation and mapping technique uses the approach with wrapped callback read/write functions to make the adapter to translate the data between instances. This example is prepared from scratch to just demonstrate possible approach for the gateway. Other approaches can be used to override the component sources and realize the gateway object for data translation. The adapter functionality is located in mb_lib library which exposes some internals of installed modbus library.

@alisitsyn alisitsyn force-pushed the mb_support/add_slave_tcp_to_serial_gateway branch 3 times, most recently from 3e35969 to ba31c64 Compare August 13, 2024 15:16
@alisitsyn alisitsyn force-pushed the mb_support/add_slave_tcp_to_serial_gateway branch from ba31c64 to 7e454ba Compare September 6, 2024 13:48
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.

1 participant