Modsak Manual v3.10 - 1.4.3. Monitor mode

Download manual: PDF HTML

1.4.3. Monitor mode

In monitor mode, Modsak acts a Modbus slave, receiving requests from a Modbus master (or masters). Instead of responding directly to a request, Modsak forwards it to a slave device. When the slave device responds to Modsak, Modsak forwards the slave's response to the master that sent the request. Modsak also uses write requests from masters and read responses from the slave to update its display of register values.

In monitor mode, Modsak may be used like a breakout box or protocol analyzer to observe the messages being exchanged between a master and a slave.

Monitor mode also enables Modsak to be used as a gateway or bridge (configure one interface to be a socket and the other interface to be serial). This is useful for prototyping, but is not recommended for production systems because of Modsak's interactive handling of error conditions.

To run Modsak in monitor mode, perform the following steps:

  • In the General page, set the Mode to Monitor, and set the Slave ID to the slave identifier that you want Modsak to monitor. Requests using other slave identifiers will also be forwarded, but register values of those slaves will not be displayed. Broadcasts (using slave identifier 0) are always monitored.

  • Use the Interface to Master page (see Interface settings) to configure the interface to the Modbus master(s).

  • 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 you want to monitor 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 Modsak to monitor (see Defining registers). Note that Modsak will forward all requests to the slave, not just those for the registers that you have defined. You only need to define those registers whose values you want to observe. Note also that in monitor mode the write flag only affects polling, not whether the master can write to the register.

  • 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 interface and start listening for requests.

You may stop servicing of requests by clicking the Run button (this will close the interfaces), and restart servicing by clicking the Run button again.