Technical FAQs

Ask a Question

Does the M221 support Modbus request operation read object %I ?


1)When this is the M221 which is sending the Modbus request
 With a Read_Var ( with parameter ObjType defined as %I), according SoMachineBasic Help:
ObjType       The type of objects to read:
  • %MW (Mbs Fct 3): memory words (default)
  • %I (Mbs Fct 2): input bits
  • %Q (Mbs Fct 1): output bits
  • %IW (Mbs Fct 4): input words
The types of Modbus read function codes are:
  • Mbs Fct 3: equivalent to Modbus function code 03
  • Mbs Fct 2: equivalent to Modbus function code 02
  • Mbs Fct 1: equivalent to Modbus function code 01
  • Mbs Fct 4: equivalent to Modbus function code 04
If the slave connected device supports the Modbus request FC02 and provides the content of it’s %Ix value within the answer , then the M221 will find within the %MW reception table (define by the parameter Indexdata ) the value of input %I of such slave device
2) When the M221 receives a read Modbus request with a Modbus function code 02 , it behaves same as it received a read Modbus request with a Modbus function code 01:
so it will provide into the answer the content of its %M internal bit area.
 the M221 does not support read %I request, but instead of rejecting the function code 02, it was decided to provide same answer content as when received Modbus function code FC01 ( and also to have same behavior as a Twido PLC application) 

  The above explanations are valid for both  Modbus Serial line and Ethernet TCP  connection
Was this helpful?
What can we do to improve the information ?