Overview |
Introduction | ||
This document describes the installation, usage, and functionality of a TLM (TOPDOC Loadable Module) for SoftPLC version 3.x and later. This TLM implements the slave side of the Modbus Master/Slave Protocol using a serial line. See here and here for definitions of this protocol.
TLMs may be developed by any competent C/C++/Java programmer who has access to the SoftPLC C/C++/Java Programmer's Toolkit, a product readily available from SoftPLC Corporation. There are a number of Systems Integrators who are SoftPLC Partners who possess the requisite expertise. End users may also have this capability.
The TLM described by this document is called MODBSLAV. The Modbus Slave TLM is used to add Modbus slave capabilities to a SoftPLC runtime and to allow it to participate in master-slave communications between intelligent devices on a serial RS-232, RS-485, or RS-422 communications link.
SoftPLC offers other TLMs in support of Modbus TCP or Modbus UDP. This TLM only implements the serial line form of the protocol and only the slave side of it.
| Media Type | Master | Slave |
|---|---|---|
| Serial Line | Third Party | *this TLM* |
| TCP and UDP | ModbusIPmaster | ModbusIPslave |
Features | ||
The Modbus Slave TLM operates as a SoftPLC driver and may be configured with TOPDOC NexGen. Only Modbus RTU protocol is supported, Modbus ASCII protocol is not. Modbus protocol was originally developed to talk to Modicon PLCs, and therefore devices that implement the slave side of the protocol must recognize references to Modicon memory locations. This TLM maps SoftPLC datatable files into virtual Modicon PLC memory locations. This mapping is controlled in the configuration file of the TLM.
Possible baud rates are 2400,4800,9600, 19200, 38400, 115200. Hardware handshaking is not supported, and this may make it difficult for slaves of this type to participate in a multi-drop bus without special RS-232 to RS-485 converters which would do the hardware handshaking. Hardware handshaking is not required for a single slave bus.
The TLM supports the following Modbus Functions:
| Function Number | Description |
|---|---|
| 0×01 | Read Coils |
| 0×02 | Read Input Discretes |
| 0×03 | Read Multiple Registers |
| 0×04 | Read Input Registers |
| 0×05 | Write Single Output |
| 0×06 | Write Single Register |
| 0×07 | Read Exception Status |
| 0×08 | Diagnostics |
| 0×0F | Force Multiple Coils |
| 0×10 | Write Multiple Registers |
| 0×16 | Mask Write Registers |
Requirements | ||
- Version 3.x SoftPLC or later.

