Integrating the CODESYS library for CMS to Brightlayer

Functional description

Brief overview of CMS

Working principle

The following picture will give you an overview and all steps will be described in detail in this document:

For each Eaton HW device which can be used for a Motor exists a seperate FB which can be also used as a single FB.

Step1: Supported Hardware

The idea of the CMS is to provide a virtual representation for for device combinations that start a motor (motor starters, drives). Third party devices can be used with the CMS as well. For Eaton Hardware we offer additional tools to easily establish a connection.

Simple motor control devices like contactors or motor starter combinations just provide binary information like on / off / trip. Some Eaton motor control devices like PKE or Drives provide more information (like e.g. current) that could be send to the Cloud over the Fieldbus. For those devices Eaton offers a library for Codesys which facilitates the implementation of the CMS in the Cloud.

Step2: Configuration in the PLC

The library supports different FB for each HW to control and read information from the device over the Fieldbus.

FB_BasicMotor

The easiest FB is the FB_BasicMotor. This FB supports only digital Value and can be used for all device from which you have only some digital Infomation as IO. 

The needed information is the xRight Main and mean the Output for start the Motor in right direction, the refxLeft is the Ouput for start Motor in Left direction. If you connect both Ouputs the FB will give you the possiblity to switch the direction.

FB_DIL

This FB is also for contactor but for a Contactor over SWD which is be easier for mapping and give you more information from the Device.

The mapping must be done here in the declaration and will be similar for all other FB. For the mapping the FB needs the information from the Device tree.

The needed information are the Name in the Device tree and the First input and Output Address.

DIL_SWD_32    : EA_CMS.FB_DIL(itfHW_Node:= DIL_SWD_32_002, InputAdress:= ADR(%IB17), OutputAdress := ADR(%QB7)); //Instance for DIL FB with SWD

FB_PKE

This FB is for the PKE which gives you more information from Motor Protection Device which has information from current and the defined Release current value. It can be used on SWD but also with Modbus RTU.

If you use the PKE with SWD it is necessary to select Profile3 so that all the information is available. The mapping has to be done here in the declaration and will be similar for all other FB. For the mapping the FB needs the information from the device tree.

The needed informations are the Name in the Device tree and the First input and Output Address.

PKE : FB_PKE(itfHW_Node:= PKE_SWD_32_Profile_3, InputAdress:= ADR(%IB18), OutputAdress := ADR(%QB8)); //Instance for PKE starter combination

If you use Modbus RTU it is necessary to configure the channel manully, for that please to the following configuration.

FB_Drive

This FB is for all frequency converters from the series DA1, DC1 and DE1. You can use it on all Fieldbuses on the same way.

The mapping must be done in the declaration and is the simlar way like the other HW device FB. For the mapping the FB needs the information from the Device tree.

//FB for handling a Eaton drive in this Example a DE1 with Modbus RTU MyDrive : FB_Drive(itfHW_Node := Modbus_Slave_COM_Port, InputAdress := ADR(%IW2), OutputAdress := ADR(%QW2));

If you use Modbus RTU it is necessary to configure the channel for the cyclic values manully, for that please to the following configuration.

FB_CmsAnalytics

This FB is here to calculate some values from the Drive which are usefull for analytics like Idletime, Errortime and Runtime, or the Number of Starts.

All hardware instances from the FB can be connected to the input itfMotorHW and the output represents all values in a interface structure which is defined for the widget in the cloud. But this values can also be used in the software for have standard interface for other parts of the software.

Here an Example how to connect a HW FB to the FB_CmsAnalytics:

The structure has some device information which can be used to have all needed information from your motor starter combination. The different FB will read per default all Informantion which are available on the Fieldbus interface and the CMS FB will read them and write to the structure but if you will use more information as readable per default you can use optional the three different Inputs from the Components from you Solution and than this infomtion will be displayed on the Output structure.

Here the definition from the different Structures:

tsProtectionDeviceInfo

ts_StarterDeviceInfo

ts3rdPartyDevice

Details Error Information in errorCode

The Output structure is build in the following way and is the interface for the widget in the cloud.

The first 7 defined error information are the following for the wErrorCode tag: