Page 1 of 2

Issue with MODBUS register address configuration

Posted: Sun Dec 08, 2024 11:31 am
by mit2003
Hi Friends,
I want to store data in the Holding register address from 44300 to 44500 (specific 200 registers) using MODBUS register starting address and number of addresses configuration (In flow code 4299 to 4499). But failed to compile.
1. I am using PIC18F46K42 microcontroller. I have configured modbus slave in my project with starting address "0" and number of addresses "100", It works fine, Data space occupied 8.7%.
2. Re-configured with starting address "1600" and number of addresses "1700", It works fine, Data space occupied 86.9%.
3. Once again re-configured with starting address "4300" and number of addresses "4400", Now compilation failed with 'could not find space'.
I realized that Flowcode Modbus Slave alwys access "0" as start address and considering the data given.
I don't know is it bug or doing something in wrong manner.
I have attache the program and screen-shots for reference.
Kindly help me to fix this issue. Thanks in advance for your valuable support.

Re: Issue with MODBUS register address configuration

Posted: Sun Dec 08, 2024 1:23 pm
by chipfryer27
Hi

It looks like you have run out of RAM. That chip has 4K and you need over 8K for your variable.

Might be wrong though.

Regards

Re: Issue with MODBUS register address configuration

Posted: Sun Dec 08, 2024 2:12 pm
by LeighM
Maybe your number of addresses should be 200

Re: Issue with MODBUS register address configuration

Posted: Tue Dec 10, 2024 1:19 am
by mit2003
Thanks a lot for your valuable time and support :P .

As you mentioned, Start address (4299), number of address (200) now there is no compilation error.
But i can't access the stored data from 44300 to 44499 and receive only "0".
in case of data stored in the address range from 0 to 100, that will works fine.

Kindly help me to get it happen.

Thanks in advance for your valuable time and support.

Re: Issue with MODBUS register address configuration

Posted: Tue Dec 10, 2024 1:46 pm
by BenR
Hello,

The addressing section of this page might be useful for you. It shows how Modbus addresses map to the Flowcode assigned addresses.

https://www.flowcode.co.uk/wiki/index.p ... Addressing

Re: Issue with MODBUS register address configuration

Posted: Tue Dec 10, 2024 4:58 pm
by medelec35
Hi mit2003 are you using Flowcode V7?

Re: Issue with MODBUS register address configuration

Posted: Wed Dec 11, 2024 4:51 am
by mit2003
Hi chipfryer, Leighm and AbhijitR (supported via PM),

Thanks for your valuable information. Yes i realized what kind of mistake i did.

For testing purpose, Slave Address (1), Starting address (0), number of address (200) now there is no compilation error.
Now what ever value set in these registers were successfully accessed and displayed in Modscan.

While switch over to actual scenario, Slave Address (1), Starting address (4299), number of address (200) now there is no compilation error.
Now what ever value set in these registers were not accessed and "0" displayed in Modscan.

Kindly help me to fix this issue. Thanks in advance for your valuable support.

Re: Issue with MODBUS register address configuration

Posted: Wed Dec 11, 2024 4:56 am
by mit2003
Hi Martin nice to see you in this post.
I am using Flowcode V8.

Kindly let me know how to solve this challenge.
Thanks in advance for your valuable time and support.

Re: Issue with MODBUS register address configuration

Posted: Wed Dec 11, 2024 5:12 am
by mit2003
Hi Ben nice to see you in this post.

I believe you and Martin can easily either highlight my mistake or fix this issue.

Thanks in advance for your valuable time and support.

Re: Issue with MODBUS register address configuration

Posted: Thu Dec 12, 2024 11:45 am
by mit2003
Hi Friends,

Any update or suggestion regarding data access failure ?

Still waiting for your valuable suggestion. :roll:

Thanks in advance for your valuable time and support.