Issue with MODBUS register address configuration

Any bugs you encounter with Flowcode should be discussed here.
mit2003
Posts: 8
http://meble-kuchenne.info.pl
Joined: Thu Apr 15, 2021 1:20 pm
Has thanked: 2 times

Issue with MODBUS register address configuration

Post 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.
Attachments
Screenshot 2024-12-08 161859.png
Screenshot 2024-12-08 161859.png (150.91 KiB) Viewed 1289 times
Screenshot 2024-12-08 161915.png
Screenshot 2024-12-08 161915.png (235.22 KiB) Viewed 1289 times
SLAVE_MODBUS_Reg_44300_to_44600.fcfx
(21.89 KiB) Downloaded 65 times

chipfryer27
Valued Contributor
Posts: 1376
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 331 times
Been thanked: 479 times

Re: Issue with MODBUS register address configuration

Post 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

LeighM
Valued Contributor
Posts: 421
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 76 times
Been thanked: 232 times

Re: Issue with MODBUS register address configuration

Post by LeighM »

Maybe your number of addresses should be 200

mit2003
Posts: 8
Joined: Thu Apr 15, 2021 1:20 pm
Has thanked: 2 times

Re: Issue with MODBUS register address configuration

Post 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.

BenR
Matrix Staff
Posts: 1912
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 496 times
Been thanked: 674 times

Re: Issue with MODBUS register address configuration

Post 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

medelec35
Matrix Staff
Posts: 1665
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 581 times
Been thanked: 556 times

Re: Issue with MODBUS register address configuration

Post by medelec35 »

Hi mit2003 are you using Flowcode V7?
Martin

mit2003
Posts: 8
Joined: Thu Apr 15, 2021 1:20 pm
Has thanked: 2 times

Re: Issue with MODBUS register address configuration

Post 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.

mit2003
Posts: 8
Joined: Thu Apr 15, 2021 1:20 pm
Has thanked: 2 times

Re: Issue with MODBUS register address configuration

Post 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.

mit2003
Posts: 8
Joined: Thu Apr 15, 2021 1:20 pm
Has thanked: 2 times

Re: Issue with MODBUS register address configuration

Post 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.

mit2003
Posts: 8
Joined: Thu Apr 15, 2021 1:20 pm
Has thanked: 2 times

Re: Issue with MODBUS register address configuration

Post 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.

Post Reply