Table of Contents

K-Bus protocol driver

The K-Bus communication protocol is used for native communication of PLCs to I/O modules (cards, terminals) by Wago Kontakttechnik GmbH:

By adding a Wago PLC into a Mervis Solution, a channel with KBUSLink protocol is created automatically.

K-Bus link protocol parameters

Right click the channel to open context menu. There are three ways how to add a device:

If the terminal types and their positions on the bus are known (e.g. from panel shop drawings), the easiest way is to add devices from library. Insert devices by right-click to channel and Add Library Device.

The device library contains predefined currently supported Wago terminals. Choose the device with higher prototype version and double click it, or focus it and click the right arrow button. Then click OK.

Terminal detection searches for all terminals connected to the K-Bus.

If the PLC is not in Commissioning mode, it changes to it automatically:

Detected modules are listed in the dialog window:

Select the device to import and click Next. The selected devices are imported into your solution. The last way how to add a terminal into your solution is to create your own device - right click the channel, Add device.

Enter the Kbus parameters in Properties:

Open the device editor and add a Group (right-click to editor, Add Group). The group type is Read Only or Write Only, set it according to the terminal type. Then add a data point (right-click to editor, Add Data Point or hit the Insert key.  In the data point properties, add the group the data point has to be attached to, Communication Value mapped Type (Bit (ST Type - bool), BuiltIn (ST Type - all data types and Array (ST Type - all data types and array length), Enable SWAutogen for automatic generation of global variables, or manual datapoint mapping IO ⇒ ST (read) and ST ⇒ IO (write).

KBus datapoint parameters

Configuration of analog I/Os

The analog I/Os are configured in the data point properties.

Diagnostics enabled - Measuring is enabled

To apply changes, upload the Solution to the PLC.

Export of devices at a K-Bus channel

Export of the K-Bus devices at a K-Bus channel to CSV is useful for creating documentation. It can be performed by right click on the channel and selecting Export Item:

In the export dialog window select the output file path, to overwrite an existing file check the Overwrite existing option.