Henry Watson

M241 Modicon Modbus TCP Slave input register reading problem

4 posts in this topic

I have been trying to configure my Modicon M241 PLC to act as a Modbus TCP slave using the built-in 'ModbusTCP_Slave_Device' option. I am using Radzio Modbus Master as TCP Master Simulator on my PC. Problem is I am able to read and write the Holding registers but not able to read the input registers. The Modbus Master simulator returns the message : 'Modbus Timeout Error'. On sniffing the traffic using WireShark, the PLC Modbus slave seems to reply Illegal Function, error code = 1 in response to a read request made by the master for input registers. Can you guys suggest some solution for this?

Do we need to separately set the read permission for input registers of Modbus TCP map - if so, how?

p1.PNG

Share this post


Link to post
Share on other sites

I normally write the inputs and outputs to %MW or %M. Then you shouldnt have a problem. Not all modbus softwares allow all the modbus functions. But most should allow reading x3 and x4 which will be %mw and %m

Share this post


Link to post
Share on other sites

Hello, I have the same problem. Did you solve the problem?? Is there any soultion or mistake I am doing?

 

Thanks in advance.

Share this post


Link to post
Share on other sites

Few years late for this one but i was having the same issue and just got it figured out so figured id share my solution for anyone with the same problem in the future.

I think normally with modbus, your master writes to your holding register using your 4xxx channel, and then reads using your 3xxx channel. Schneider seems to do this different.

On my hmi, if im writing to my holding register, i set the tag to memory type 4, and then the adress im writing to.

For example if i have 3 holding registers and im wanting to write to the 3rd one, it will be memory type 4, address 3.

But too read from the input register, schneider have it set so that instead of using chanel 3, instead i use chanel 4, and the adress will be whatever input register im trying to reach +my holding registers.

So again say im trying to reach input register 5, and i have 3 holding registers, i will read from it by using chanel 4, address 8.

 

Hope this helps.

Edited by Hayesinv

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now