Modsak Manual v3.15 - 1.4.1.  Master mode

Download manual: PDF HTML

1.4.1.  Master mode

In master mode, Modsak acts as a Modbus master, allowing you to send Modbus commands to a Modbus slave (see Commands).

Modsak provides two ways of sending commands to a Modbus slave:

1.4.1.1. Setup for sending commands only

If you simply want to send Modbus commands to the slave (i.e. you don't want to use polling or the register read/write buttons) you can set up master mode using the following steps:

  • In the General page (see General settings), set the Mode to Master.

  • Use the Interface to Slave page (see Interface settings) to configure the interface to the Modbus slave.

  • If the slave uses 32-bit or 64-bit values, configure the handling of these using the 32/64-bit Values page (see 32/64-bit Value Settings).

  • You may also want to configure the Number of Retries and Response Timeout in the General page (see General settings).

  • Click the Run button to open the connection to the Modbus slave.

You may then send individual Modbus commands to the slave using the Define Command page (see Commands).

You may close the connection to the slave by clicking the Run button, and re-open it by clicking the Run button again.

1.4.1.2. Setup for using defined registers

If you want to use polling or the register read/write buttons, the steps for setting up are a bit more complicated, since you will need to define some registers:

  • In the General page (see General settings), set the Mode to Master and set the Slave ID to the slave identifier that you want Modsak to send in requests.

  • Use the Interface to Slave page (see Interface settings) to configure the interface to the Modbus slave.

  • If you want to use coils or discrete inputs, or you want to use register addresses that are different from the addresses sent in messages, configure the address mapping using the Address Mapping page (see Address mapping).

  • If the slave uses 32-bit or 64-bit values, configure the handling of these using the 32/64-bit Values page (see 32/64-bit Value Settings).

  • Define the registers that you want to access (see Defining registers).

  • If you want to use polling, you may want to configure how Modsak polls registers in the Polling page (see Polling Settings).

  • You may also want to configure the Number of Retries and Response Timeout in the General page (see General settings).

  • Click the Run button to open the connection to the Modbus slave.

You may then use polling and the register read/write buttons.

You may close the connection to the slave by clicking the Run button, and re-open it by clicking the Run button again.