{}

Our Brands

Impact-Company-Logo-English Black-01-177x54

Welcome to the Schneider Electric Website

Welcome to our website.
How can we help you today?
Does the M221 controller support read Modbus request with object %I (FC02)?
  • M221 acting as Modbus Master or Modbus TCP Client and sending a read request:

When executing the Read_Var function block with the parameter ObjType defined as %I, according SoMachine/Machine Expert - Basic Help:

ObjType: The type of objects to read can be:
  • 0 : %MW (Mbs 0x03): memory words (default)
  • 1 : %I (Mbs 0x02): input bits
  • 2 : %M or %Q (Mbs 0x01): internal or output bits
  • 3 : %IW (Mbs 0x04): input words
The types of Modbus read function codes are:
  • Mbs 0x03: equivalent to Modbus function code FC03
  • Mbs 0x02: equivalent to Modbus function code FC02
  • Mbs 0x01: equivalent to Modbus function code FC01
  • Mbs 0x04: equivalent to Modbus function code FC04

Depending on the type of slave and the slave address, an internal bit should be a %M or %Q; an input bit should be a %I or %S, an input register should be a %IW or a %SW and an internal register should be a %MW or a %QW.


If the Slave device or Modbus Server supports the Modbus request FC02 and provides the content of its %Ix values within the response, then the M221 will find within the %MW reception table (defined by the parameter IndexData) the values of %I inputs of the device.

  • M221 acting as Modbus Slave or Modbus TCP Server and receiving a read request:

When receiving a read Modbus request with a Modbus function code 02, the M221 behaves same as it received a read Modbus request with a Modbus function code 01. In consequence,  it will provide into the response the content of its %Mx internal bits area.

Explanation:
The M221 does not support read %I request, but instead of rejecting the function code FC02, it has been decided to provide the same response content as when receiving Modbus function code FC01 (also to have the same behavior as a Twido PLC application) with %M values.

Note:
The above explanations are valid for both Modbus RTU and Modbus TCP/IP communications.

Schneider Electric UK

Explore more
Range:
Articles that might be helpful Users group

Discuss this topic with experts

Visit our Community for first-hand insights from experts and peers on this topic and more.
Explore more
Range: