M241/M221 Modubs TCP/IP

lesmar96

Lifetime Supporting Member
Join Date
May 2017
Location
PA
Posts
520
HI,

I am working at a program where the M241 is the main brain of the control system, but we have a little M221 off the side doing its own thing. I need communication between these two. The M241 needs to know the status of the I/O points on the M221. Do I understand it right that the %IWM and %QWM or the status words for the I/O? I would appreciate a little direction on the best way to do this. I have done it between M221's before, but wasn't sure the best way to do it from the M241 side. Thankyou.
 
I have not used the 241 but i imagine it supports IOScanner?

I would use a BIT to word instruction to take all the physical IO and pack them into two constitutive %MW registers (16 bit so should be able to fit all your IO)

Then set up an IOScanner link from the 241 to read the %MW registers, and Word to Bit to unpack them again.

I like to allocate a block of consecutive words incase i want to add further stuff in future. Doing one read like this makes things more efficient.
 
Ok. Thank you for this advice.

I am trying to figure out how to set up an IO Scanner for the 241 in Somachine 4.3. I can find it in the documentation, but it doesn't show up under the Generic Modbus TCP Slave tab. How do I know for sure if this controller supports it.

Please see this link..............http://www.schneider-electric.us/en/faqs/FA304472
 
Hi,

I have a sample project that I can send you to your Inbox. I am writing to one output on the M221 via M251 ModbusTCP. Similarly you can read inputs. I am not using the Scanner but you could.

M241 - Modbus TCP is the same.


Hope this helps.

Thanks.
 
Last edited:
Do I have to add anything in the device tree to make this work? I noticed your program has a Scanner Manager under Ethernet 2. This plc does not have Ethernet 2. Does that make any difference?
 
Hi,

On M241 there is only one ETH port.

If you want to use the IO Scanner instead of Read/Write var then please check attached pictures.

- > M241 -> Eth -> Industrial manager (Modbus TCP) -> Add slave and channel

-> M221 -> Enable Modbus TCP (gives you %IWM and %QWM registers) -> Pack your data into the %IWM and %QWM

You will see/manipulate the data on the M241 under Mdb tcp slave IO mapping.

Hope this helps.

Thanks.

M241_DataPoll.jpg M241_MdbTCPIOScan.jpg M221_1.jpg M221_2.jpg
 
Thank you for your help on this. Today I setup this communication today and tested it. It was working pretty well for me.
 

Similar Topics

Hello, Recently I was asked to analyze the logic of the air conditioning system in one of our departments. The PLC that controls this system is...
Replies
2
Views
137
Hi all, I've read the thread below which is similar to my situation... https://www.plctalk.net/qanda/showthread.php?t=127711 But I am unable to...
Replies
3
Views
554
I have a machine that has M241 PLC. I need to add a couple of outputs to the program, and I don't have the original code. Am I screwed or can I...
Replies
1
Views
459
Hello everyone! I have a Schneider M241 as master of a CAN network with several encoders and whatnot, everything is working fairly well. Now...
Replies
3
Views
1,690
Hello, I just wanted to thank in advance for taking the time to read and help if possible. I'm currently working on a project creating the Logic...
Replies
3
Views
1,694
Back
Top Bottom