-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Issues with initializing the registers in the server #615
Comments
What value do you use for |
Hi Stephane, Sorry for the late reply, I use any random value rather than 0 and <= 65535. I have allocated 10 registers. Thanks, |
The next documentation will include a better explanation: The different starting addresses make it possible to place the mapping at any mb_mapping = modbus_mapping_new_start_address(0, 0, 0, 0, 340, 10, 0, 0); The newly created
The clients can read the first register by using the address 340 in its request. mb_mapping->tab_registers[0] = 42; |
I think your documentation has an error. parameter 5 and 6 are for holding registers, not input registers. _The newly created mb_mapping will have the following arrays: tab_bits set to NULL Unless I'm missing something fundamental, but I've looked into your modbus.c code and it clearly shows parameters 5 and 6 are for nb_registers, NOT nb_input_registers Please update the documentation because this is SUPER confusing. |
Hi,
I am using the below statement to create a memory with different start addresses.
then I tried to initialize this memory like below
mb_memory_section ->tab_registers[ start_registers ] = 555;
I tried to get the value using the client at start_registers address but it is zero.
Worked case:
When I initialized the memory like below it is working
mb_memory_section ->tab_registers[0] = 555;
I tried to get the value using the client at this
start_registers
address and it is 555Is this the expected behavior? or a bug.
Hardware: NVIDIA Jetson Xavier NX board
OS: Ubuntu
libmodbus version: latest (built from sources)
Thanks,
Ramakrishna
The text was updated successfully, but these errors were encountered: