Modsak Manual v3.16 - 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:
You can define some Modbus registers and use the Read, Write and Poll buttons to send requests to the slave. See Setup for using defined registers for how to do this.
Alternatively, you can define and send Modbus commands using the Define Command page - this method does not use register definitions. See Setup for sending commands only for how to do this.
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
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
button, and re-open it by clicking the button again.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
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
button, and re-open it by clicking the button again.