The drive application programming function allows you to add your own program code to the drive using the Automation Builder programming tool. The programming method and languages are based on the IEC 61131-3 programming standard.
With the drive application programming, you can create application specific features on top of the drive firmware functionality. You can utilize the standard and extension I/O and communication interfaces of the drive along with the appropriate firmware signals. The program is executed in parallel with the drive control tasks using the same hardware resources.
In addition, you can create your own parameters and events (faults and warnings) that are visible on the ACS-AP-x control panel and in the Drive Composer pro/entry commissioning tools.
For using Automation Builder online with the drive, enable the drive application programming license in the target drive.
System diagram
The following simplified system diagram shows the application programming environment in the same control unit as the drive firmware.
Main components of the application programming:
Drive control unit
-
Run-time system (RTS) executes the application program.
-
“DriveInterface” allows input/output mapping between the application program and drive firmware parameters.
-
System function library enables access to the drive system services (parameters/events/drive-to-drive communication, extension I/O).
-
User-made parameters.
-
User-made events (fault, warnings).
-
Drive system info includes version information of the application program.
-
Drive firmware parameters with I/O controls.
-
D2D function blocks enable drive-to-drive communication, I/O extension modules, and so on for application programming.
Drive memory unit
-
Creates a permanent version of the application program (boot application).
-
Retains values of the application program variables.
-
Consists of application source code (consider that the memory size is limited).
-
Includes symbol and address information of the application program variables for monitoring purposes.
PC tool programs
-
Automation Builder for application program development and online operations.
-
Drive Composer pro for drive parameter, signal, event log monitoring and settings.
-
Application program function libraries (for example, ABB standard library).
-
The USB/ACS-AP-x control panel enables communication between the Automation Builder, Drive Composer pro and the drive.
Programming work cycle
The following steps describe a typical work cycle of the drive application programming task.
-
In the device tree, do the following:
-
Create a new project.
-
Add objects.
-
Define the target and first program module.
-
Select “Create Boot Application” if new parameters, mappings, events or task configuration are added to the program.
-
Debug the program code (stepping, forcing variables and breakpoints).
-
-
In the “DriveInterface” object, define the interface to drive firmware parameters (I/O access, drive control).
-
In the device tree, define user parameters and events (“ApplicationParametersandEvents” module).
-
Develop the program structure and coding program units.
-
Define the program execution task configuration editor.
-
Compile and load the code using “Build” menu.
-
In the “Online” menu, do the following:
-
Select “Create Boot Application” if new parameters, mappings, events or task configuration are added to the program.
-
Debug the program code (stepping, forcing variables and breakpoints).
-
-
In the “View” menu, select “Watch” window to monitor program variables in Automation Builder and Drive Composer pro.
-
Repeat steps 2 to 8 to test the program.
Special tasks
The following special tasks are part of the drive application programming tasks.
-
Using “Online” menu, save or restore the source code to the permanent memory of a drive.
-
Save the drive IEC symbol data to the permanent memory of a drive from the device tree using “Add Symbol” configuration object to the tree option.
-
In the “Application Properties” window or “Project Information”, create a name and version of the application.
-
In the “Online” menu, select “Reset Origin” to remove the application from the target.
Programming languages and modules
The programming environment supports programming languages as specified in the IEC 61131-3 standard with some useful extensions.
The following programming languages are supported:
-
Ladder diagram (LD)
-
Function block diagram (FBD)
-
Structured text (ST)
-
Instruction list (IL)
-
Sequential function chart (SFC)
-
Continuous function chart (CFC), normal and page-oriented CFC editor
A program can be composed of multiple modules like functions, function blocks and programs. Each module can be implemented independently with the above mentioned languages. Each language has its own dedicated editors.
Libraries
The program modules can be implemented in the projects or imported into libraries. A Library Manager is used to install and access the libraries.
The two main types of libraries are:
-
Local libraries (IEC language source code, for example, AS1LB_Standard_ACS880_V3_5)
-
System libraries (implemented in drive firmware, for example, AY1LB_System_ACS880_V3_5)
Local libraries include source code or can be compiled. If the library is compiled, source code is not included in the library.
Program execution
The program is executed on the same central processing unit (CPU) as the other drive control tasks. In real time applications, programs are typically executed periodically as cyclic tasks. The programmer can define the cyclic task interval.
DriveInterface
The “DriveInterface” object enables input and output mapping between application program and drive firmware using drive firmware parameters used in the application program. The list of parameters may be different for each drive firmware versions.
ApplicationParametersandEvents
The “ApplicationParameterandEvents” Manager (APEM) object allows creating application parameter groups, parameters, parameter types, parameter families, units and application events for the drive in Automation Builder environment.