Anh_21

Any question about Modbus FX3U block size & PLC mapping

8 posts in this topic

I'm working on PLC FX3U Modbus, i have several question that i don't really understand :

1. I wonder : Is the Coil is a block, the Inputs is a block and the Input Registers is a block only ? So the Modbus Memory Area has 4 block only (Coil, Input Registers, Input, Holding Registers) or One of them (e.x the Coil) has much blocks ?

2. Why in the Modbus manual they write Device code next to Size, and Size next to Head Device? Is the Head Device (D8471) first device of the block or something ? (Picture 2, Picture 5)

2. In the third & fourth picture :

Section 9.4.2 shows that the Device Code of D8470 has 4 bits, is it for the Device Code as 5H, CH, 0H in the MOV command? (Picture 3)

3. In the PLC Mapping column (Picture 3), D8470 is mapped from X0 -> X37. That's up to 38 bits, but the block size (D8470) is only 12 bits, with 2 Word. How does the D8470 contains from X0 -> X37 (38 values).

 

Please explain to help me, thanks.

a1.jpg

a2.jpg

a3.jpg

a4.jpg

5.jpg

Edited by Anh_21

Share this post


Link to post
Share on other sites

Most of your questions are related to the Modbus Mapping in the PLC, and not the actual Modbus communication... May I ask what your problem with the default mapping is? And why is it causing issues for you? Is your master expecting/demanding different or other areas when requesting information from the slave (FX3U)?

I don't know why Mitsubishi chose to map the way they did. I've used ModbusRTU a lot and never really had a problem with the mapping...

1 person likes this

Share this post


Link to post
Share on other sites
44 minutes ago, kaare_t said:

Most of your questions are related to the Modbus Mapping in the PLC, and not the actual Modbus communication... May I ask what your problem with the default mapping is? And why is it causing issues for you? Is your master expecting/demanding different or other areas when requesting information from the slave (FX3U)?

I don't know why Mitsubishi chose to map the way they did. I've used ModbusRTU a lot and never really had a problem with the mapping...

Thank you for comment. I'm new to Modbus Mapping, and i have not see any error when programming. Everything is working fine. But i don't really understand about PLC Mapping of Mitsu FX. So i want to ask you clearly.

Edited by Anh_21

Share this post


Link to post
Share on other sites

As @kaare_t said It is about config FX3U to be Modbus Slave.

FX3U only support mapping for coils and holding registers only.

You can create Modbus mapping maximum at 8 groups.

For each group can create maximum at 2048 blocks.

1 Blocks contain 16 coils or 1 holding registers.

In example at Modbus mapping device 1 you use D8470 and D8471

For D8470 have 2 sections that device type and block size in example use 5H for X input type and use 2 for block size 16 * 2 = 32 coils

For 1 word contain 16 bits that means 4 digits that means 5H(4 bit) and 002H(12 bit) when combined it will be H5002 you should use ---[MOV H5002 D8470]

and D8471 use for assign Head Start address in example  ---[MOV H0 D8471]

you will mapping X0 - X37 because FX Series are count X and Y in 8 bit format (X0 - X7, X10 - X17, X20 -X27 and X30 - X37) that means 8 * 4 = 32 coils

For your 2nd question it would use Modbus master command not slave command as your picture shown.

Share this post


Link to post
Share on other sites
2 hours ago, Wasan said:

As @kaare_t said It is about config FX3U to be Modbus Slave.

FX3U only support mapping for coils and holding registers only.

You can create Modbus mapping maximum at 8 groups.

For each group can create maximum at 2048 blocks.

1 Blocks contain 16 coils or 1 holding registers.

In example at Modbus mapping device 1 you use D8470 and D8471

For D8470 have 2 sections that device type and block size in example use 5H for X input type and use 2 for block size 16 * 2 = 32 coils

For 1 word contain 16 bits that means 4 digits that means 5H(4 bit) and 002H(12 bit) when combined it will be H5002 you should use ---[MOV H5002 D8470]

and D8471 use for assign Head Start address in example  ---[MOV H0 D8471]

you will mapping X0 - X37 because FX Series are count X and Y in 8 bit format (X0 - X7, X10 - X17, X20 -X27 and X30 - X37) that means 8 * 4 = 32 coils

For your 2nd question it would use Modbus master command not slave command as your picture shown.

Thank you very much, i forgot that X & Y only keep address from 0 - 7, not 8...I understood.

But, as you said : For 1 word contain 16 bits that means 4 digits that means 5H(4 bit) and 002H(12 bit) when combined it will be H5002 <=== So, 002H is block size ? That mean when i convert 002H from Hexa to Int, it will be 2. And 2 is block size ?.

For the Holding Registers : these Holding Registers use 16 bit to represent ?

Share this post


Link to post
Share on other sites
25 minutes ago, Anh_21 said:

Thank you very much, i forgot that X & Y only keep address from 0 - 7, not 8...I understood.

But, as you said : For 1 word contain 16 bits that means 4 digits that means 5H(4 bit) and 002H(12 bit) when combined it will be H5002 <=== So, 002H is block size ? That mean when i convert 002H from Hexa to Int, it will be 2. And 2 is block size ?.

For the Holding Registers : these Holding Registers use 16 bit to represent ?

For holding registers 1 word use 1 block.

Share this post


Link to post
Share on other sites
56 minutes ago, Wasan said:

For holding registers 1 word use 1 block.

So, summary :

1 Groups contain 1 data type, e.x Coil data type. For example : inside 1 Coil data type Group, it can contains maximum 2048 blocks. And inside 1 block contains 16 coils. If i use WORD, it will be 1 WORD. Right ?

Share this post


Link to post
Share on other sites
6 minutes ago, Anh_21 said:

So, summary :

1 Groups contain 1 data type, e.x Coil data type. For example : inside 1 Coil data type Group, it can contains maximum 2048 blocks. And inside 1 block contains 16 coils. If i use WORD, it will be 1 WORD. Right ?

Yes alright

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