Medialon MxMs' Help
Name: Medialon Modbus TCP
Version: 6.7.2
Available for: Manager V7 and Manager V6 (Lite & Pro), Showmaster (Mini, ST, Pro, LE, XS)
Limitation In:
Device Brand: Medialon
Positrack Compatible: No
Resources type: TCP/IP Network

Overview

Generalities

MODBUS is an application layer messaging protocol, positioned at level 7 of the OSI model, that provides client/server communication between devices connected on different types of buses or networks. The industry’s serial de facto standard since 1979, Modbus continues to enable millions of automation devices to communicate.

Today, support for the simple and elegant structure of MODBUS continues to grow. The Internet community can access MODBUS at a reserved system port 502 on the TCP/IP stack. MODBUS is a request/reply protocol and offers services specified by function codes.

Addressing scheme and item types

MODBUS bases its data model on a series of tables that have distinguishing characteristics. The four primary tables are:

The distinctions between inputs and outputs, and between bit-addressable and word-addressable data items, do not imply any application behavior. It is perfectly acceptable, and very common, to regard all four tables as overlaying one another, if this is the most natural interpretation on the target machine in question. For each of the primary tables, the protocol allows individual selection of 65536 data items. It’s obvious that all the data handled via MODBUS (bits, registers) must be located in device application memory. But physical address in memory should not be confused with data reference. The only requirement is to link data reference with physical address. MODBUS logical reference number, which are used in MODBUS functions (commands), are unsigned integer (0 to 65535).

It is very common that the four tables are associated with the following data/physical types:

The addressing space of each of the four tables is comprised in the range 0–65535 (0x0000–0xFFFF in hexadecimal).

Addressing models and considerations

However, the register, coil or input ranges are also sometime given with their numbers, in decimal. This is to simplify documentation, that an old defacto standard widely recognized as Modbus (sometimes referred to as Modicon convention) is still used. This defacto standard uses the first digit of a register number to identify the register type. Note that this defacto standard use a 1-based register numbering while addresses use a 0-based index.

Valid address ranges as originally defined for Modbus were 0 to 9999 (0x0000–0x270F) for each of the above register types. Valid ranges allowed in the current specification are 0 to 65,535 (0x0000–0xFFFF). The addresses above 9999 (0x270F) are generally referenced as “extended range addressing”.

Therefore, there is another defacto standard that looks very similar and is as follows:

When using the extended register numbering, it is mandatory that all register numbers have six digits in order to avoid confusion (for instance between holding register 40001 and coil 40001). If coil 40001 is the target, it must appear as 040001.

MXM Implementation

The Medialon Modbus TCP MXM give access to device that support Modbus TCP protocol, it acts as a Modbus Client TCP/IP. Values into registers (or inputs or coils) and registers (or inputs or coils) organisation is device dependant.

The user should know how the device is organised and what are the available registers (or inputs or coils) in the device. These information are given by the device manufacturer and is generally referenced as “Mapping Table”. It remains to analyze these information and check whether the register (or coil) identification is given using the numbering (in such a case, is it expressed in standard defacto or extended defacto manner - see later on for details) or with an address (0x0000–0xFFFF).

More information about Modbus TCP can be found at http://www.modbus.org.

MxM Installation

No special installation required.

Device Setup

Device creation window:

IP Address (or name): IP address or name of the target modbus device.

IP Port: IP port the target modbus device. The default value is 502 and should be kept.

Auto re-connection: Enables to automatically try to reconnect the modbus device after a disconnection.

Use Unit Identifier: If the TCP/IP modbus device is a gateway then this option allows to define which modbus device, behind the gateway is addressed. In some circumstance, some device, although claiming to be ModbusTCP compliant, acts as a gateway and thus need this ID to be set (for instances, Moxa ioLogic 2xxx products).

Command Timeout: Specify the amount of time, in millisecond, the device wait for an answer before throwing a timeout error.

Force Multiple Write Commands: This option allows to force using the “Multiple Write” version of commands even when a single Coil or Register is specified. This option is intended for some Modbus device which does only support Multiple Write operations.

Max Multiple Registers: Defines the maximum of registers a multiple register command can address. The default value is 32 and can be set up to 123, which is dictated by Modbus protocol. For example, command such as Write Holding Register can have from 32 to 123 register parameters, depending on this settings. All the cues created for this command will have the same maximum number of register’s parameters. The parameter Register Count which indicates the actual number of registers used in this particular command instance (cue) can then be set from 1 to that maximum value (32 to 123).

This has been required by a customer who’s dealing with PLCs which needs to get their settings through a single command using more than 32 registers at once.

Device Commands

Read Input Register

Read into the given variable(s) a register or a serie of registers from the Input registers block.

Note: When the “Bit Selection” parameter is set to “Bit X”, then the corresponding bit of all read registers is set into the corresponding given variable; in other words, the variable reflect the value of the selected bit (either 0 or 1). The “Bit Selection” parameter is apply to all register values, respectively.

Read Holding Register

Read into the given variable(s) a register or a serie of registers from the Holding registers block.

Note: When the “Bit Selection” parameter is set to “Bit X”, then the corresponding bit of all read registers is set into the corresponding given variable; in other words, the variable reflect the value of the selected bit (either 0 or 1). The “Bit Selection” parameter is apply to all register values, respectively.

Write Holding Register

Write the given value(s) into a register or a serie of registers of the Holding registers block.

Note: If the “Register Count” parameter is set to 1, only the first Value (Value 1) is used and the Modbus TCP command used is “Write Single Register”. If the “Register Count” parameter is greater than 1, then “Value 1” to “Value X” (X being the Register Count) are used and the Modbus TCP command used is “Write Multiple Registers”.

Note: The “Bit Selection” is only used when “Register Count” parameter is set to 1. When the “Bit Selection” parameter is set to “Bit X”, then the corresponding bit of that register is set to 1 if the value is not 0, otherwize it is set to 0. Some device does not support bit mask adressing, so in this case let the Bit Selection parameter to “All”.

Read Discrete Input

Read into the given variable(s) the status of an input or a serie of inputs from the Discrete Input block.

Read Coil

Read into the given variable(s) the status of a coil or a serie of coils from the Coils block.

Write Coil

Write the given status(es) into a coil or a serie of coils of the coil block.

Note: If the “Coil Count” parameter is set to 1, only the first Status (Status 1) is used and the Modbus TCP command used is “Write Single Coil”. If the “Coil Count” parameter is greater than 1, then “Status 1” to “Status X” (X being the Coil Count) are used and the Modbus TCP command used is “Write Multiple Coils”.

Change IP Address

Switch the connection to another server.

Device Variables

Status

[Enum] Current general status.

Error

[Enum] Current error status.

Revisions

V 1.0.1

V 1.0.2

V 6.0.0

V 6.0.1

V 6.0.2

V 6.1.0

V 6.1.1

V 6.1.2

V 6.1.3

V 6.1.4

V 6.1.5

V 6.1.6

V 6.2.0

V 6.3.0

V 6.3.1

V 6.7.0