# Step 6 - Advanced Features

This page is part of a guide that gives a walkthrough over the major 4DIAC features.

0. Overview
1. Use 4DIAC locally
2. Create a distributed application
3. Deploy remotely
4. Create your own Function Blocks
5. Other basic features
6. Advanced Features [optional] (YOU ARE HERE!)

This page shows some advanced features about 4DIAC that are used normally in more complicated applications

1. Adapters
2. Subapplications (To be implemented in version 1.9)

# Adapter Usage

Adapters group interface elements into reusable interface descriptions. They reduce the number of interface elements (event and data inputs and outputs) and by that the number of connections that have to be created between interacting function blocks. In 4diac adapters are listed in the type library and represented by this symbol .

## Create a new Adapter Type

These interface descriptions can be added to the interface of any function block type. Currently adapters can not contain other adapters. There are two types of adapters, which are mirrored interfaces:

- socket: added as input of a function block and represented by this symbol within the function block's interface.
- plug: added as output of a function block and represented by this symbol within the function block's interface.

When a new adapter is created it is supposed to be a socket the mirrored plug is derived automatically by 4diac and is NOT created by the user. An adapter(socket) is created by File → New → New Type and selecting Adapter.adp as Type. All adapters should start with an A (naming convention).

## Use your new Adapter Type

After the creation of your desired adapter type (socket) it can be added to a function block's interface by drag and drop from the Palette, as illustrated in the following figure.

The function blocks used within the following application snippet are part of the TrafficLight example system. Two different adapter types have been used, ATimeOut in PedLightCtl_AT and E_TimeOut) and ATrafficLight in PedLightCtl_AT.

The PedLightCtl_AT is a basic function block. Within basic function blocks adapters are accessed by FB_INTERFACE_NAME.ADAPTER_INTERFACE_NAME. The elements of the ATimeOut adapter are therefore accessed by timeOut.START, timeOut.STOP and timeOut.TimeOut.

The E_TimeOut is a composite function block. Within the network of a composite function block any adapter added to its interface is represented by an adapter block which looks like a function block. The interface elements of this adapter block are connected like a function block.

Further examples for the usage of adapters can be found within the FestoMPS example system.

# Where to go from here?

If you want to see some examples, the following link is an index of the available examples in the documentation:

4DIAC Examples

If you have a specific platform that has input and outputs that is supported by FORTE, for example a Raspberry Pi or a PLC, and you want to use them, go to following page:

Parameters for different platforms

If you want to use a specific communication protocol supported by FORTE, for example MQTT, OPC UA, Modbus and so on, go this page:

Communication Protocols

If you want to go back to see again the basic features again, here's a link

Step 5 - Other basic features

If you want to go back to the Start Here page, we leave you here a fast access

Start Here page

Go to top