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

Allow declaring multiple banks of registers at a time #95

Open
salasidis opened this issue Jul 2, 2022 · 2 comments
Open

Allow declaring multiple banks of registers at a time #95

salasidis opened this issue Jul 2, 2022 · 2 comments
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@salasidis
Copy link

salasidis commented Jul 2, 2022

Got it to work on a Portenta H7 - only testing Holding Register reading (all required in my application).

I have a question about the software.

Is it possible to issue 2 configures as below

modbusTCPServer.configureHoldingRegisters(0, nSensors);
modbusTCPServer.configureHoldingRegisters(1000, nSensors*2);

I would like to have the first group be scaled integers, and the second group will be transmitted as floats. The user will decide which to access depending on their PLC etc

Thanks

@salasidis
Copy link
Author

Tested it - added 2nd group of configure registers, and able to transmit floats.

All is good.

Was extremely easy to implement.

Thanks

@salasidis
Copy link
Author

Actually, I thought it was working, but it was not - It looks like only one bank of registers can be declared at a time.

What I did to compensate was
-say I have 100 sensors
-I reserved space for 1000 + 100x2 holding registers. This first 100 resisters hold the Int representations, the last 200 registers the floats.
This wastes 900 register positions - almost 2k RAM presumably.

@per1234 per1234 changed the title Portenta H7 Only one bank of registers can be declared at a time Feb 14, 2024
@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Feb 14, 2024
@per1234 per1234 changed the title Only one bank of registers can be declared at a time Allow declaring multiple banks of registers at a time Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

2 participants