# SOLVIMUS\_GE20\_MBUS\_DEVICE

## `SOLVIMUS_GE20_MBUS_DEVICE` (FB)

FUNCTION\_BLOCK SOLVIMUS\_GE20\_MBUS\_DEVICE

InOut:

| Scope       | Name                    | Type                                      | Initial      | Comment                                                                                                      |
| ----------- | ----------------------- | ----------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------ |
| Input       | `xEn`                   | `BOOL`                                    | TRUE         | Enable / disable communication ( TRUE = enabled )                                                            |
| Input       | `byUnitId`              | `BYTE`                                    | 255          | Address of the device (set by IP address)                                                                    |
| Input       | `xUpdateActual`         | `BOOL`                                    | FALSE        | <p>Update of actual values (on every rising edge<br>)</p>                                                    |
| Input       | `wBaseAdressMbusDevice` | `WORD`                                    | 10           | <p>Modbus - base register for the MBus device<br>information</p>                                             |
| Input       | `xResError`             | `BOOL`                                    | FALSE        | <p>Reinitialization of the outputs ‘eErrorCodeCom’ to the<br>no-error state (on each rising edge)</p>        |
| Inout       | `ModbusClient`          | `ModbusClientBase`                        |              | Client of the device                                                                                         |
| Output      | `dwMeterID`             | `DWORD`                                   |              | Serial number of the M-Bus device                                                                            |
| Output      | `sManufacturer`         | `STRING`                                  |              | Manufacturer identification of the M-Bus device                                                              |
| Output      | `byMeterGeneration`     | `BYTE`                                    |              | Version of the M-Bus device                                                                                  |
| Output      | `eMedium`               | SOLVIMUS\_GE20\_MBUS\_DEVICE\_MEDIA\_TYPE |              | Media ID of the M-Bus device                                                                                 |
| Output      | `dtSysTime`             | `DT`                                      |              | <p>Timestamp of the MBus device (UTC, in Germany UTC +1 /<br>+2 h depending on summer/winter time)</p>       |
| Output      | `wStatusFlags`          | `WORD`                                    |              | Current state of the status flags                                                                            |
| Output      | `xAlarm`                | `BOOL`                                    | FALSE        | General fault ( TRUE = fault )                                                                               |
| Output      | `xAlarmCom`             | `BOOL`                                    | FALSE        | General fault - communication ( TRUE = fault )                                                               |
| Output      | `eErrorCodeCom`         | ModbusErrorCode                           |              | Error code - communication ( 0 = no error )                                                                  |
| Output      | `xBusy`                 | `BOOL`                                    |              | Communication indicator ( TRUE = communication )                                                             |
| Input Const | `diAdrOffset`           | `DINT`                                    | 0            | <p>Offset for calculating Modbus addresses (from the Modbus<br>registers) (permissible range: -1, 0, +1)</p> |
| Input Const | `tTimeUpdateActual`     | `TIME`                                    | TIME#1m0s0ms | <p>Update interval for operations influenced by the input<br>'xUpdateActual'</p>                             |
