Modbus Interface

From exigoWiki
Jump to navigation Jump to search

This article describes the Modbus interface available in Exigo.

The Exigo Controller implements a Modbus TCP slave (server) interface on the standard Modbus port, TCP port 502.
The Modbus interface in Exigo has two main features:

  • Status about amplifiers and panels connected to the Controller can be read from Modbus Input Register (16 bit).
  • Pre-programmed PA calls and announcements can be triggered by writing to Modbus Coil Register.

Exigo status to Modbus

Selected Exigo failure statuses are exported to Modbus Input Register (16 bit). The allocation of registers and bits is fixed.
There is no configuration of this feature (except for opening up Modbus in firewall). SCADA must poll these registers. A range of input registers can be read using Modbus function code 2.

There is one 16 bit register for each panel, amplifier and amplifier line. Physical devices like panels and amplifier have one 16 bit register describing the device level status.
Amplifiers have in addition one 16 bit register for each audio line.
The index of each device and line is displayed in the Exigo Management Tool (EMT) in the "StInd" field:

Modbus StInd Example


In the example above the controller will be located in Modbus Input Register 300018.

The 16 bit device/line statuses is interpreted as a bitmap:

  • Bit 0 is set in all registers that represent a configured item. Unused registers read as zero.
    • Remaining bits may be set to indicate a fault situation.
  • Bit 1 on device level statuses means the controller has lost contact with the device.
  • Bit 2 on speaker line mean that the speaker line is faulty (voltage test).

Trig announcement in Exigo from Modbus

Modbus coil registers 1 - 100 in the controller can be assigned a pre-programmed action in Exigo.
SCADA set a "coil" bit (function code 5) to trig the action. Actions can be pre-programmed on both set (1) and clear (0), or just on one of the transitions.

Seen from SCADA these are discrete outputs. In Exigo those are seen as Modbus Coil Events.

At startup, the Modbus coil registers have value zero.

Input Actions currently available for configuration on Modbus Coil Events are:

Unlike a physical Control Input, the matching Modbus action is triggered also when the same coil register value is written multiple times.

Configuration

Firewall

To make the Exigo Controller able to receive Modbus connections, TCP port 502 have to be opened in "AlphaWeb" of the controller: https://wiki.zenitel.com/wiki/AlphaWeb#Filters.
First add TCP port 502 as new protocol, then open it for the desired interface(s).

EMT Configuration

To create configuration for Modbus Coil Event: Drag and drop Modbus Coil Event -> System -> Integration -> Modbus Coil Events:

Modbus Coil Event


A dialog box will appear where the Coil number can be set:

Modbus Coil #


Click "Done". Placeholders for event configuration will be added to the Configuration Tree:

Modbus Coil On Action/Off Action


It is possible to create multiple Modbus Coil Events:

Modbus Coil Events


Input Actions is configured the same way Control Input and Direct Access Keys:

Modbus Coil - On Action


Modbus Coil - On Action


It is also possible to drop the Input Action on the Modbus Coil event to automatically create Start/Stop Actions on "On Action" and "Off Action":

Modbus Coil - On Action


Modbus Coil - On Action


Test tool

For standalone testing of Modbus interface, the command line tool "mbpoll" is useful: https://github.com/epsilonrt/mbpoll

Set coil#2 to 1 mbpoll 1.2.3.4 -1 -t 0 -r 2 1
Set coil#2 to 0 mbpoll 1.2.3.4 -1 -t 0 -r 2 0
Read 30 first input registers mbpoll 1.2.3.4 -1 -t 3 -c 30