Modsak Manual v3.15 - 2.3.5. Example address mappings

Download manual: PDF HTML

2.3.5. Example address mappings

  • The default address mapping used by Modsak is shown below:

    Table 2. Default address mapping

      Base Address Number of Addresses
    Holding Register 0 65536
    Input Register 0 65536
    Coil 0 0
    Discrete Input 0 0

    This mapping overlays input registers and holding registers, and makes message addresses and model addresses identical. It effectively disables discrete inputs and coils by setting the sizes of these address ranges to zero.

  • Another example mapping is the traditional non-overlaid setup used by Modicon (also known as 5-digit addressing):

    Table 3. Traditional Modicon 5-digit address mapping

      Base Address Number of Addresses
    Holding Register 40001 9999
    Input Register 30001 9999
    Coil 1 9999
    Discrete Input 10001 9999

  • A more recent version of the traditional Modicon scheme uses 6-digit addresses:

    Table 4. Modicon 6-digit address mapping

      Base Address Number of Addresses
    Holding Register 400001 65536
    Input Register 300001 65536
    Coil 1 65536
    Discrete Input 100001 65536

  • The following table shows a "simple" example of overlaying coils with holding registers:

    Table 5. Overlaid address mapping

      Base Address Number of Addresses
    Holding Register 0 65536
    Coil 100 96

    With this mapping, registers 100..105 would be accessible as holding registers 100..105 and also as coils 0..95 (assuming the use of 16-bit registers).

    For example, using the overlaying rules coil 37 would map to bit 5 (37 modulo 16) of register 102 (100 + 37 / 16). Which bit of the register is "bit 5" would, of course, depend on the Swap Bytes and Reverse Bits settings.