Difference between revisions of "Modbus Interface"
Rlorentzen (talk | contribs) (→Availability) |
|||
(55 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | This article describes the | + | 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'''. <br> | |
+ | 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. <br> | |
− | + | 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. <br> | ||
+ | Amplifiers have in addition one 16 bit register for each audio line. <br> | ||
+ | The index of each device and line is displayed in the [[:Category:EMT| Exigo Management Tool (EMT)]] in the "StInd" field: | ||
+ | [[File:Modbus StInd.png|thumb|left|500px|Modbus StInd Example]] | ||
+ | <br style="clear:both;" /> | ||
+ | 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. <br> | ||
+ | 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: | ||
+ | * [[Alarm Control]] | ||
+ | * [[Message Control]] | ||
+ | * [[Audio Program Control]] | ||
+ | * [[Recall, Control]] | ||
+ | * [[Recall, Record]] | ||
+ | * [[Tick Tone Control]] | ||
+ | * [[Local Mute Control]] | ||
+ | * [[Line Measurement]] | ||
+ | * [[Clear Activity]] | ||
+ | * [[Volume Control]] | ||
+ | |||
+ | 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. <br> | ||
+ | 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''': | ||
+ | [[File:Modbus_1.png|thumb|left|500px|Modbus Coil Event]] | ||
+ | <br style="clear:both;" /> | ||
+ | |||
+ | A dialog box will appear where the Coil number can be set: | ||
+ | [[File:Modbus_2.png|thumb|left|500px|Modbus Coil #]] | ||
+ | <br style="clear:both;" /> | ||
+ | |||
+ | Click "Done". Placeholders for event configuration will be added to the Configuration Tree: | ||
+ | [[File:Modbus_3.png|thumb|left|700px|Modbus Coil On Action/Off Action]] | ||
+ | <br style="clear:both;" /> | ||
+ | |||
+ | It is possible to create multiple Modbus Coil Events: | ||
+ | [[File:Modbus_4.png|thumb|left|700px|Modbus Coil Events]] | ||
+ | <br style="clear:both;" /> | ||
+ | |||
+ | Input Actions is configured the same way Control Input and Direct Access Keys: | ||
+ | [[File:Modbus_5.png|thumb|left|700px|Modbus Coil - On Action]] | ||
+ | <br style="clear:both;" /> | ||
+ | |||
+ | [[File:Modbus_6.png|thumb|left|700px|Modbus Coil - On Action]] | ||
+ | <br style="clear:both;" /> | ||
+ | |||
+ | 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": | ||
+ | [[File:Modbus_7.png|thumb|left|700px|Modbus Coil - On Action]] | ||
+ | <br style="clear:both;" /> | ||
+ | |||
+ | [[File:Modbus_8.png|thumb|left|700px|Modbus Coil - On Action]] | ||
+ | <br style="clear:both;" /> | ||
+ | |||
+ | == Test tool == | ||
+ | For standalone testing of Modbus interface, the command line tool "mbpoll" is useful: https://github.com/epsilonrt/mbpoll | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | |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 | ||
+ | |} | ||
[[Category:Exigo features]] | [[Category:Exigo features]] | ||
+ | [[Category:Integration]] | ||
+ | [[Category:Input Actions]] |
Latest revision as of 07:18, 13 July 2021
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.
Contents
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:
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:
- Alarm Control
- Message Control
- Audio Program Control
- Recall, Control
- Recall, Record
- Tick Tone Control
- Local Mute Control
- Line Measurement
- Clear Activity
- Volume Control
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:
A dialog box will appear where the Coil number can be set:
Click "Done". Placeholders for event configuration will be added to the Configuration Tree:
It is possible to create multiple Modbus Coil Events:
Input Actions is configured the same way Control Input and Direct Access Keys:
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":
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 |