SoftPLC CODESYS

CODESYS SoftPLC

CODESYS is the softPLC solution for ASEM's systems that allows real-time control of the automated system with high precision and reliability. CODESYS  ombines the hardware features of a PLC with the openness and flexibility of a PC or Windows CE system.

What's New

 

v3.5 SP9 Patch 7 (Windows only)

  • Alignment to CODESYS development mainstream for version 3.x (Official 3S release notes are available from this link)
  • NEW - supporto for 64 bits architectures on Windows Runtime
  • NEW - improved device user management
  • NEW - support for events in OPC UA
     

Click here to access the "Downloads" area

Features

CODESYS: the state of the art in SoftPLC

CODESYS (Controller Development System) is one of the most widespread and complete programming softwares dedicated to industrial controllers. It is IEC-61131-3 compliant and is used worldwide by over 200 hardware producers and thousands of final users.

It makes it possible to emulate via software, on a PC platform with real-time operating systems, the typical functions of the PLC, combining the power and flexibility of the most advanced programming languages (such as C or Visual Basic) with the intuitive and simple use of the PLC programming languages.The tool consists basically of two parts: the CODESYS development system and the CODESYS SP runtime environment. 

The latter converts the device where CODESYS  s installed into IEC 61131-3 controller, programmable with CODESYS   The integrated compilers in the system ensure excellent speed in running the programme code.

  • EC-61131-3 development languages
    • Structured Text (ST)
    • Sequential Function Chart (SFC)
    • Continuous Function Chart (CFC)
    • Function Block Diagram (FBD)
    • Ladder Diagram (LD) and Instruction List (IL)
  • Different communication's networks at the same time
  • Easy debug by using breakpoints, even conditional, and real-time changes to the code during the operation of the PLC
  • The "digital oscilloscope" allows users to record variables or events.
  • Easy communication with other software (such as HMI) via the OPC server or "PLCHandler" library.

Compatibility

Compatibility

Depending on the fieldbus in use there are different compatibible configurations and there are different hardware requirements.

The runtime system of CoDeSys is offered in the versions for Windows XP (CoDeSys SP RTE) and for Windows CE (CoDeSys SP) on the system listed in the table below.

Concerning the development environment, it is freeware and it is available on the CD provided with the CoDeSys software, or it can be downloaded in the download section.

CoDeSys supports the cards Fieldbus ASEM NETcore® X APCI and miniAPCI for Profibus DP and Industrial Ethernet with protocols ProfiNet, Ethernet IP, Ethercat and CANopen.

Please find following a summary table about the available options and configurations.

FieldbusWin 32Win CE HW OT600 SmartboxHT700 HT2000 PB2000OT1100 VPC15 B-ONE PB300OT1200 PB1200 OT1300 PB1300500 family600 family550 family650 familyVPK300
DP Master   NetX  
H3 H3/4
Profibus Slave   NetX   H3 H3/4
CANopen Master   CAN RAW   H3 H3/4 H3 H3/4
CANopen Slave   CAN RAW   H3 H3/4 H3 H3/4
DeviceNET Scanner   CAN RAW   H3 H3/4 H3 H3/4
Ethercat Master   LAN   LAN2
PROFINET IO Controller (*) (*)   NetX   H3 H3/4
PROFINET IO Device (*)   NetX   H3 H3/4
Modbus TCP Master (*)   LAN  
Modbus TCP Slave   LAN  
Modbus RTU Master   COM  
EthernetIP Scanner (*) (*)   NetX   H3 H3/4
EthernetIP Device (*)   LAN  
NVRAM 512KB   NV   √* √* √* √*

 

Legenda:
NetX: NETcore® X boardLAN: Standard Ethernet
CAN RAW: ASEM CAN RAW LAN2: MiniPCI Ethernet
H3: only for H3 systemsCOM: standard serial port
H3/4: only for H3 or H4 systems (*): available on demand
NV: NVRAM board√*: available only on CAN RAW + NVRAM PCI board

System Requirements  

RuntimeRAMSSD / CF / HD
Win 322GB≥ 4GB
Win Embedded Standard1GB≥ 2GB
Window CE512MB≥ 512MB

Architecture

Architettura

All of the tasks involved in the creation of the applications for process control can be performed with CoDeSys Suite; the architecture of CoDeSys can be subdivided into three layers:

Development layer:

The development system is composed of a PLC programming system which includes all online and offline functions, the compiler and the additional components for configuration, etc..

Additional components are available if the SoftMotion part is also included.

Communication layer:

Communication between the development system and the layer device passes through the CoDeSys Gateway Server, which is based on an OPC (OLE for Process Control) server.

Device layer:

In order to make a device (such as an embedded PC) programmable by CoDeSys, it is necessary to implement on said device the CoDeSys SP runtime environment. CoDeSys SP converts this device into a programmable logic controller as per standard IEC 61131-3.


Development System

The CoDeSys development system is the heart of the 3S Automation Suite package, and features a complete set of development tools.


CoDeSys development system offers all editors called for by the IEC standard for the development of applications:

  • Structured text (ST)
  • Sequential Function Chart (SFC)
  • Continuous Function Chart (CFC)
  • Function Block Diagram (FBD)
  • Ladder Diagram (LD)
  • Instruction List (IL)

All of the editors were designed to ensure maximum simplicity of use, obtained also by taking into account the suggestions and needs of final users. The following are some functional examples:

  • it is possible to change freely form one editor to another, for example from FBD to LD or IL, whether you are online or offline.
  • The SFC can be used in the standard or simplified versions
  • also in the SFC editor, there is an online diagnostic function
  • possibility to create macros with elements of the CFC and SFC editor
  • language construct automatically created (e.g. IF … END_IF)

Editors for Project Configuration

Thanks to special editors a project can easily be configured in the project tree of CoDeSys.

Controllers of various types and manufacturers can be included in the project, and each of them can be programmed separately or configured with its communications interfaces in a network of controllers. In the end, the complete project will be composed of various applications and dedicated to various devices, and it will be possible to load it and run it with a single command.

Concerning the task configurer, it allows division of the application into various Time Layers that need to be synchronized with the I/O Layer, which can also be configured in the project tree.

The POUs (project organization units) created in the project can be assigned directly to a specific device or made available to all of the devices of the project. In addition, the programmer can also archive as libraries the pre-defined POUs and subsequently use them in a project. The libraries can also be managed by the release number directly by CoDeSys.

Compiler

The compilers integrated into CoDeSys convert the application into machine code, which is much faster and optimized performance.

All of the most common processors of 8, 16 and 32 bit are supported. This is extremely useful when the programmer needs to work with devices with different architectures. Another feature is the display in real time of syntax errors made during programming and code writing.

The compiler supports Boolean and analogue types, time and date format, floating point, strings and unions. In addition to this, CoDeSys also supports bit access and array access.

Object Oriented Programming

CoDeSys also makes available object programming, with all of the relative advantages thanks to the use of classes, interfaces, methods, inheritance, polymorphism, etc.

Functions offered in online status for debugging and commissioning

The machine code generated by the application is downloaded in the device by simply clicking the mouse. Once online, CoDeSys offers numerous functions fast and efficient debugging, testing and commissioning. The values of the declared variables, for example, are shown in the programme code, and can be changed or overridden. By inserting breakpoints and advancing step by step in the code lines, any possible errors can easily be identified and corrected. The breakpoints in CoDeSys can easily be configured by assigning special operating conditions to them, so as to obtain even more precise debugging. In single cycle operation, the programmer can follow the execution cycle of his application in a clear and complete manner.

Also, if the application is modified, the re-compilation of the programme involves only the part that is affected by the modification and subsequently downloaded in the device without the need to stop the execution and without the risk of losing the data of the variables.

It is also possible to make modifications to several POUs, to variables or types, thanks to the function known as Online Change. This substantially reduces development times and costs.

Also, the Sampling Trace tool allows data recording and the triggering of useful events in the testing and commissioning phases.

In addition to this, the SoftPLC demo lets the programmer simulate the operation of his application without the need actually connect to the target device.


Runtime 

In order for a device to be programmable with CoDeSys, it is necessary to implement the CoDeSys SP runtime environment on the device itself. For example, CoDeSys SP converts and embedded PC into an IEC 61131-3 controller which at that point can be programmed with.

The CoDeSys SP runtime environment performs the following tasks:

  • loads and runs the IEC 61131-3 applications
  • debugs IEC applications
  • operates with the I/O systems
  • communicates with the development and programming system
  • carries information messages on the network of the controllers

 

CoDeSys SP, once configured and thanks to the personalized modules, can be adapted to specific platforms. Adaptations of CoDeSys SP for Windows CE are available.

CoDeSys SP RTE installed on Windows XP: the ready to use softPLC

With the Windows XP operating system, the runtime system does not require any adaptation, since the RTE version of CoDeSys SP was designed specifically for this operating system and the installation is absolutely standard. Once installation is complete, CoDeSys SP RTE converts any industrial PC into a PLC, which is perfectly scalable in terms of performance.

Features:

  • The real-time kernel always ensures deterministic behaviour
  • Interface to I/O: discrete I/O cards or standard fieldbus cards
  • The fieldbuses can be configured directly from the CoDeSys environment, without the need for external tools
  • Fieldbus cards supported: Hilscher, Applicom, Peak CAN.
  • The softPLC operates even when the PC has a blue screen
  • Fully configurable start-up
  • Support for retentive data (HDD, Flash Cards, non-volatile RAM)


 

Open Communication

CoDeSys is equipped with a series of 'open' communications interfaces that make it suitable for use with various and numerous types of applications in the industrial fie

CoDeSys PLC Handler

PLCHandler is a software library, independent from the platform, created for communication between the CoDeSys controllers and external software clients (for example the viewers). It offers communications functions and control services to access the controller that are very simple to use:

  • Start-up and shutdown of the connection
  • Reading of all variables of the controller
  • Cyclical reading of the values of the variables
  • Synchronous reading and writing of the values of the variables

 


Fieldbus Integration 

Integrated configuration tool 

In order to allow CoDeSys to access the I/O of the controller by the application that resides on the controller itself, these I/O must be declared to the system.

CoDeSys offers complete configuration of all properties:

  • XML description of the device:
    • Type of device, manufacturer, order number, etc.;
    • Device parameters;
    • I/O channels;
    • Interfaces to other devices;
  • Generation of the hierarchy of the device in the project tree
  • Configuration of parameters
  • Connection of I/O channels with the IEC variables
  • Download of the configuration as part of the IEC application in the standard format
  • Driver framework defined for the purpose of editing the configuration in IEC 61131-3 or in C language
  • Online functions:
    • Values of parameters;
    • Values of the I/O channels;
    • Diagnostics;
    • Scanning of all available devices;

CoDeSys also offers specific extensions thanks to:

  • filter for importing descriptive data of the device in alternative format
  • configuration interfaces for specific devices

There are also a series of extensions to CoDeSys for standard field buses; they consist of filters for importing, configuration interfaces, drivers and stacks. From among these it is possible to request:

  • Profibus
  • CANopen
  • Ethercat
  • SERCOS III
  • ProfiNET
  • DeviceNet