Overview
With the TwinCAT Function TF6771 IoT OCPP, TwinCAT can act both as an OCPP client and as an OCPP server. The use cases are explained in more detail below.
Product components
The function TF6771 IoT OCPP consists of the following components, which can be used from TwinCAT version 3.1.4026.x:
- Driver: TcIotOcpp.tmx (included in the installation of TF6771.IotOCPP.XAE)
- PLC library: Tc3_OCPP (included in the installation of TF6771.IotOCPP.XAE)
TF6771 IoT OCPP is only installed on the engineering. As soon as a project is loaded onto the target system, the TMX driver is copied with the project files.
Use cases
Four categories of use cases can be mapped using TF6771. This includes use as an OCPP client, use as an OCPP server, implementation of an OCPP gateway and enabling an OCPP retrofit.
![]() | Terminology The two versions of the OCPP protocol considered in this documentation use different terms.
|
Use case 1: TwinCAT Charging Station
In the first use case, a Charging Station is automated with a Beckhoff control system. In addition to the TF6771 software, the EL6761 EtherCAT Terminal is used for this purpose. The following graphic illustrates use in conjunction with the EL6761.
On the software side, the Charging Station automated with TwinCAT is connected to a CSMS as an OCPP client. Communication in the direction of the vehicle to be charged is realized via the EL6761.
Use case 2: OCPP retrofit
In the second use case, existing Charging Stations without OCPP support are retrofitted for OCPP communication.
In existing charging infrastructure, there may be Charging Stations that do not provide their information via OCPP. For example, there are Charging Stations that distribute information via Modbus TCP. This information can then be collected within TwinCAT and sent to the CSMS on behalf of the Charging Station. To do this, TwinCAT acts as an OCPP client and pretends to be the Charging Station that is to be retrofitted.
Use case 3: Local CSMS
TwinCAT can also be used to implement a local CSMS. Here TwinCAT acts as an OCPP server to which any number of Charging Stations can connect.
At this point, all CSMS functions must be implemented locally. In addition to defining charging profiles, this also includes authentication and billing - if these functions are required.
Use case 4: OCPP gateway
The implementation of an OCPP gateway is also possible. Here TwinCAT acts both as an OCPP client and as an OCPP server.
In such cases, the higher-level CSMS, which is cloud-based in most cases, is often used for authentication and billing. In this case, TwinCAT behaves mainly as a communication switch and forwards messages from the OCPP clients to the higher-level CSMS and vice versa. However, it is also possible to implement local load management via the local OCPP server in the OCPP gateway. Among other things, this can be advantageous due to the information available locally in the control system about the power grid at a location.