Problem Reading Modbus Registers

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
Steven_SS
Posts: 46
Joined: Wed Jul 18, 2018 6:33 pm
Has thanked: 18 times
Been thanked: 3 times
Contact:

Problem Reading Modbus Registers

Post by Steven_SS »

I am having an issue working on this MEGA2560 board trying to read Modbus Slave registers.
The strange deal about it, is that everything looks fine; the slave addressing, baud rate, COM Port, addressing of registers.
I've tested it with another MEGA2560 board and same result. Could it potentially be something in the Modbus module?

What could be causing this issue and how can I resolve it? Thanks
I've attached a test program that I'm using.
Attachments
AtMega2560 Modbus Test.fcfx
(87.37 KiB) Downloaded 199 times
I'm just trying to keep learning & growing in a infinite loop... unless I wanna break. Cheers :)
Steven

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Problem Reading Modbus Registers

Post by Benj »

Hi Steven,

What sorts of problems have you been seeing so I can try and narrow things down? I've had a look through your program and not spotted anything obvious so far.

Steven_SS
Posts: 46
Joined: Wed Jul 18, 2018 6:33 pm
Has thanked: 18 times
Been thanked: 3 times
Contact:

Re: Problem Reading Modbus Registers

Post by Steven_SS »

Hi Benj,
The program compiles fine and it uploads to the board fine, then I open up the Modbus client-server and set up the registers from 40001-so on.
When I run it to read the Modbus slave registers... no values appear, no reply is returned, nothing is coming back through the RX... :(

[Edit]Is it possible that I could get the raw code of the modbus slave module? I'm running out of ideas and thinking it might be something in there
I'm just trying to keep learning & growing in a infinite loop... unless I wanna break. Cheers :)
Steven

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Problem Reading Modbus Registers

Post by Benj »

Hi Steven,

What version of Flowcode are you using?

Steven_SS
Posts: 46
Joined: Wed Jul 18, 2018 6:33 pm
Has thanked: 18 times
Been thanked: 3 times
Contact:

Re: Problem Reading Modbus Registers

Post by Steven_SS »

Benj wrote: What version of Flowcode are you using?
Currently using Flowcode V8...
I'm just trying to keep learning & growing in a infinite loop... unless I wanna break. Cheers :)
Steven

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Problem Reading Modbus Registers

Post by Benj »

Hi Steven,

I've sent you a PM.

Post Reply