Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84702members
354078posts

Help transmiting data from M241 to modbus device

Modicon PAC Forum

A forum for topics related to the scope of Modicon PAC offers and ecosystem along the whole lifecycle: Modicon M580 and 340, EcoStruxure Control Expert, EcoStruxure Process Expert (Unity Pro) and more.

Kers
Crewman
Crewman
0 Likes
1
653

Help transmiting data from M241 to modbus device

Hello guys,

 

I have created some structures in somachine in order to be transmitted with modbus from a M241 PLC. The problem is that all these data are being transmitted but not correctly. For example I have the following data:

 

W:int:=50;

VA:int:=1000;

Varpower:int:=2000;

Hz:udint:=50;

TotWhInj:ulint:=100;

TotWhAbs:ulint:=100;

 

So these data are being transmitted with modbus and I am checking with modbus poll whether the transmission is okay or not. So when I check on modbus poll I found out this:

- When I change the value of Hz (That occupy 2 modbus registers) it doesn't change the registers of Hz but change one register of Hz (The second one) and the first register of the next variable. 

 

I am not sure why that is happening. But what I know is that If change the types from udint and ulint to uint everything works fine.

 

If someone could help me I would appreciate a lot. Thanks in advance!

 

 

Tags (1)
1 Reply 1
AlastairF
Lieutenant Lieutenant
Lieutenant
0 Likes
0
628

Re: Help transmiting data from M241 to modbus device

You may find that the structure is effectively even word aligned because of the udint.

There could be a dummy word inserted after the Varpower variable so the Hz variable is sitting on an even word boundary.

If this was a Modicon M340 or M580, that is exactly what we would get.

There is some description on Help at this location:

Machine Expert > V1.2 > Controllers > M241 Logic Controllers > M241 Logic Controller - Programming Guide > Memory Mapping

Tags (1)