Schneider Modicon PLC Connectivity

ProtoTwin Connect supports the Modbus TCP protocol for connection to Schneider Modicon PLCs, including the M221, M241, M251, M262, M258 and LMC058.

Server Configuration

Click the “Add Server” button in the “Servers” tab of the IO Browser and configure the server as follows:

  • Protocol: Select “Modbus/TCP” from the list.
  • Type: Select “Modicon” or “Modicon (M221)” from the list.
  • Name: Enter a (preferably) unique name, which will be used to identify the server.
  • Host: Enter the static IP address of the PLC.
  • Port: Enter the port number for the Modbus TCP server.
  • Unit ID: Enter the unit/slave ID for the Modbus TCP server (typically 255).
  • Scan Rate: Enter the desired scan rate, which is the interval (in seconds) at which ProtoTwin Connect will read and write tag values.

Note that the scan rate is the desired interval at which tags are read and written. The actual rate will depend on the performance of the PLC and networking latency. You can set the scan rate to zero in order to read/write as fast as possible.

Save the configuration to add the server.

Addressing

When Modicon or Modicon (M221) is selected as the Type of the server, you should specify the Modbus addresses in the format used by EcoStructure Machine Expert or Machine Expert Basic. Some examples are provided below:

Modicon M221

The Schneider Modicon M221 does not support reading/writing to physical input (%I) or physical output (%Q) addresses using Modbus. You can only read and write to holding registers (%M, %MW, %MD, %MF).

  • %M0: The first coil bit (read/write).
  • %MW0: The word stored in the first holding register (read/write).
  • %MD1: The double word stored in the second and third holding registers (read/write).
  • %MF3: The floating point number stored in the fourth and fifth holding registers (read/write).
  • %MW0.0: The first bit of the first holding register (read/write).
  • %MW1.15: The last bit of the second holding register (read/write).

Note the address ranges %MW, %MD and %MF overlap. For example, %MD0 and %MW1 overlap since %MD0 occupies the first and second word, corresponding to %MW0 and %MW1 respectively.

Modicon M241, M251, M262, M258 and LMC058

All other Modicon PLCs do not support reading internal bits (%M). They do however support reading and writing holding registers (%MW, %MD and %ML). You can also write digital inputs (%I) and read digital outputs (%Q).

  • %IX0.0: The first digital input (write).
  • %QX0.0: The first digital output (read).
  • %QW1 The word stored in coils 16 to 31 inclusive (read/write).
  • %MW0: The word stored in the first holding register (read/write).
  • %MD1: The double word stored in the third and fourth holding registers (read/write).

Note the address ranges %MW, %MD and %ML overlap. For example, %MD0 and %MW1 overlap since %MD0 occupies the first and second word, corresponding to %MW0 and %MW1 respectively.