Skip to content
Discussion options

You must be logged in to vote

Hello @qq547176052 ,

Thank you for a very good question on how to share the register data between two slaves and synchronize the data access between them.

For this approach to share the same device memory as registers between the TCP slave instance and the serial slave instance, I can think of several realizations.

Each Modbus instance has its own lock (__lock_t semaphore - mutex object from #include "sys/lock.h" ) sections to protect the data access while mapping. Unfortunately, it is not possible to override this lock mechanism using the existing API.

Approach 1:

  • Create and initialize in the application two instances of slave TCP and slave Serial.

  • Set up the area descriptors to the …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by alisitsyn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants