You are on page 1of 141

EngineerIT

Control Builder M
Version 3.2

Getting Started
Introduction and Installation

EngineerIT
Control Builder M
Version 3.2

Getting Started
Introduction and Installation

NOTICE
The information in this document is subject to change without notice and should not be construed as a commitment by ABB. ABB assumes no responsibility for any errors that may appear in this document. In no event shall ABB be liable for direct, indirect, special, incidental or consequential damages of any nature or kind arising from the use of this document, nor shall ABB be liable for incidental or consequential damages arising from use of any software or hardware described in this document. This document and parts thereof must not be reproduced or copied without written permission from ABB, and the contents thereof must not be imparted to a third party nor used for any unauthorized purpose. The software or hardware described in this document is furnished under a license and may be used, copied, or disclosed only in accordance with the terms of such license. Copyright 1999 ABB All rights reserved. Release: Document number: October 2002 3BSE 028 807 R201 Rev B

TRADEMARKS
Registrations and trademarks used in this document include: Windows ActiveX PostScript Acrobat Reader Industrial IT Registered trademark of Microsoft Corporation. Registered trademark of Microsoft Corporation. Registered trademark of Adobe Systems Inc. Registered trademark of Adobe Systems Inc. Trademark of ABB.

Table of Contents
About This Book
General ............................................................................................................................. Project Examples in the Manual ................................................................................. Online Help and Assistance for Control Builder M ................................................... Intended User.................................................................................................................... Safety ................................................................................................................................ Use of Warning, Caution, Information, and Tip Icons ..................................................... Document Conventions .................................................................................................... 11 12 14 15 15 15 16

Section 1 Introducing Control Builder M


Product Overview ............................................................................................................. Programming Languages ............................................................................................ Project Explorer .......................................................................................................... Types and Instances .................................................................................................... Libraries ...................................................................................................................... Requirements .................................................................................................................... Licensing..................................................................................................................... Supported Controllers and Configurations ....................................................................... Control Builder and Controller Configuration............................................................ Distributed Control ........................................................................................................... Control Builder M Versions.............................................................................................. 17 17 18 19 19 20 21 21 23 24 25

3BSE 028 807 R201 Rev B

Table of Contents

Section 2 Installing Control Builder M


Step-by-Step Instructions .................................................................................................. TCP/IP Network Protocol............................................................................................ Setting Up.......................................................................................................................... Starting Up ........................................................................................................................ MMS Server for AC 800M/C............................................................................................ Add and Remove Programs............................................................................................... 28 29 29 29 30 31

Section 3 Tutorial
Introduction ....................................................................................................................... Starting the Project ............................................................................................................ Project Explorer ................................................................................................................ Title Bar, Menu Bar and Tool Bar ............................................................................... Libraries....................................................................................................................... Controller..................................................................................................................... Tasks ............................................................................................................................ Application .................................................................................................................. About Variables ................................................................................................................. Where to Declare a Variable........................................................................................ How to Declare a Local Variable................................................................................. Simulation ......................................................................................................................... Closing the Control Builder .............................................................................................. 33 34 35 36 37 38 40 40 43 43 44 47 49

3BSE 028 807 R201 Rev B

Table of Contents

Section 4 Creating a Project Shop Doors


Introduction ...................................................................................................................... Selecting the Template...................................................................................................... Declaration ....................................................................................................................... Variable and Data Type Preparation ........................................................................... Declaring the Variables ............................................................................................... Writing the Code Using the ST Editor ............................................................................. Changing the Programming Language ....................................................................... Declaring the Function Blocks ................................................................................... Dividing the Program into Blocks .............................................................................. Code Input................................................................................................................... Simulation......................................................................................................................... Configuring the Hardware ................................................................................................ Connecting I/O Interfaces to the Application................................................................... Project Documentation ..................................................................................................... 51 52 53 53 54 56 56 57 58 59 62 64 65 70

Section 5 Downloading and Testing the Application


Introduction ...................................................................................................................... Firmware Upgrade via Serial Line ................................................................................... Firmware Upgrade for Redundant CPU ..................................................................... Setting a Unique Controller IP Address ........................................................................... Downloading the Project via Ethernet.............................................................................. Downloading the Project via RS-232C ............................................................................ Creating a PPP Connection......................................................................................... Establishing Communication ...................................................................................... Testing the Program Online.............................................................................................. Online Editor............................................................................................................... Testing......................................................................................................................... 71 71 73 74 77 80 80 89 91 91 92

3BSE 028 807 R201 Rev B

Table of Contents

Appendix A Licenses
License Concept ................................................................................................................ Control Builder M Licenses .............................................................................................. Expansion Licenses ..................................................................................................... Control Software Licenses ................................................................................................ Base Licenses .............................................................................................................. I/O Points..................................................................................................................... Examples of Control Software Licenses ..................................................................... OPC Server for AC 800M/C Licenses .............................................................................. AC 800M/C Connect Licenses.......................................................................................... AC 800M/C Connect License Concept ....................................................................... AC 800M/C Connect Tags........................................................................................... 95 96 96 96 97 98 98 99 99 99 99

Tag Counting Example ................................................................................................ 100 Example of Simple AC 800M/C System Configuration ................................................... 101 Example of Integrated AC 800M/C System Configuration .............................................. 102

Appendix B Control Builder M Settings


System Settings ................................................................................................................. 103 Auto-Logon to Windows ............................................................................................. 103 Redundant Network Routing Protocol (RNRP) .......................................................... 104 Product Settings ................................................................................................................ 105 Auto-Startup of Control Builder.................................................................................. 105 Memory Reservation ................................................................................................... 105 Language ..................................................................................................................... 106 File Locations .............................................................................................................. 108

3BSE 028 807 R201 Rev B

Table of Contents

Appendix C OPC Server for AC 800M/C


Introduction ...................................................................................................................... 111 Requirements .................................................................................................................... 112 Installation ........................................................................................................................ 112 OPC Server Start-up ......................................................................................................... 113 OPC Server Configuration Panel ................................................................................ 113 Settings ............................................................................................................................. 116 System Settings........................................................................................................... 117 Product Settings .......................................................................................................... 117 Running the OPC Server and OPC Client on Different Computers................................. 118 DCOM settings on the OPC Server PC ...................................................................... 118 DCOM settings on the OPC Client PC ....................................................................... 119 Network Considerations ................................................................................................... 120

Appendix D Communication Cable Configuration


Connecting AC 800M or AC 800C to a PC...................................................................... 121 Connecting 200-CPU on Advant Controller 250 to a PC................................................. 122 Connecting 200-CI232 on Advant Controller 250 to a PC .............................................. 122

Appendix E Project in FBD


Changing the Programming Language ............................................................................. 123 Dividing the Code into Blocks ......................................................................................... 124 Code Input ........................................................................................................................ 125 About FBD Editor Tools................................................................................................... 127 Structure View ............................................................................................................ 127 Dividing the FBD Editor Window .............................................................................. 128 Simulation......................................................................................................................... 129

Appendix F Glossary
Terms and Descriptions .................................................................................................... 131

Index

3BSE 028 807 R201 Rev B

Table of Contents

10

3BSE 028 807 R201 Rev B

About This Book


General
Welcome to Control IT for AC 800M/C - a truly open industrial control system. This manual introduces you to Control Builder M and its programming tool Control Builder Basic. Control Builder Standard and Control Builder Professional are also described in this manual. Section 2, Installing Control Builder M, guides you through installation and gives a short description of the MMS Server for AC 800M/C. The manual then examines examples created with Control Builder M. The first tutorial (Tutorial_01) will familiarize you with the declaration of variables, writing program code and connecting I/O signals. The program code is written using two different program editors, Structured Text (ST) and Function Block Diagram (FBD). Instruction List (IL) and Ladder Diagram (LD) codes can also be used but are not referred to in this manual. Tutorial_02 is used to illustrate the Simulation mode facilities. All examples were created using Control Builder Basic. Downloading to various controllers is described in Section 5, Downloading and Testing the Application. Installation and settings for OPC Server for AC 800M/C (available on the ControlIT for AC 800M/C CD-ROM) are described in Appendix C, OPC Server for AC 800M/C. A comparison between the Control Builder products is presented last in Section 1, Introducing Control Builder M.

3BSE 028 807 R201 Rev B

11

Project Examples in the Manual

About This Book

These icons indicate which Control Builder product the section refers to. "Bas" stands for Basic, "Std" for Standard and "Pro" for Professional. Unless otherwise indicated, the manual refers to Control Builder Basic. The three products are upwards compatible, which means that code can easily be transferred from one to the other. Most libraries are common to all three products. Refer to Control Builder M Versions on page 25. Read the Release Notes on the ControlIT for AC 800M/C CD-ROM, which specifies any products and functions not supported by the current release.

Project Examples in the Manual


Two programming languages have been used in the project examples described in this manual, as shown in the table below. The examples are included on the ControlIT for AC 800M/C CD-ROM and have the project names given below.
Language Project Name ST Tutorial_01 FBD Aim/Description Bas Std Pro To familiarize you with declaration of variables, program coding and connecting I/O signals. Identical functions are programmed using ST and FBD languages. To demonstrate how a program is tested and how it behaves in simulation mode. A step-by-step description of the construction, simulation and downloading of your own small project. Product

Tutorial_02_FBD Tutorial_02_ST ShopDoors_FBD ShopDoors_ST

12

3BSE 028 807 R201 Rev B

About This Book

Project Examples in the Manual

In this manual, references are made to programming examples, through which you can learn the basics of Control Builder M. To open an example, select the Example Files folder from the Open Project dialog box, see figure below.

Figure 1. Select Example Files instead of Project Files to open an example. All files in the Examples directory are Read Only, which means they cannot be altered. To be able to save changes in the tutorials, files must first be copied to your own project folder and opened from there. There are more examples in the Example files folder than those described in this manual.

3BSE 028 807 R201 Rev B

13

Online Help and Assistance for Control Builder M

About This Book

Online Help and Assistance for Control Builder M


In almost all situations, extended help and assistance are available through built-in online help. Here you will find help topics covering subjects ranging from very simple to highly advanced usage of the system; subjects which go far beyond the scope of this manual. To activate the Help function, select Help from the menu bar located at the top of each window (see Figure 2). Here you can either obtain Online Help (Help topics) or read the manuals using Adobe Acrobat Reader (Manuals).

Figure 2. The Help menu will guide you to online help and manuals in PDF format. There is a third Help facility: To obtain information concerning a specific object, mark the object and press F1. For example, mark the external I/O module DX210 in the Project Explorer and then press F1 to display information concerning DX210..

14

3BSE 028 807 R201 Rev B

About This Book

Intended User

Intended User
This manual is produced for technicians intending to program ControlIT products, using the programming tool Control Builder M for the first time. If you intend to go beyond the limits of this manual, please refer to AC 800M/C Connect, Installation and Configuration, and AC 800M/C Application Programming, Strategy and Design.

Safety
For specific safety instructions, please refer to the appropriate Hardware manual.

Use of Warning, Caution, Information, and Tip Icons


This publication includes Warning, Caution, and Information where appropriate to point out safety related or other important information. It also includes Tip to point out useful hints to the reader. The corresponding symbols should be interpreted as follows: Warning icon indicates the presence of a hazard which could result in personal injury. Caution icon indicates important information or warning related to the concept disussed in the text. It might indicate the presence of a hazard which could result in corruption of software or damage to equipment/property. Information icon alerts the reader to pertinent facts and conditions.

Tip icon indicates advice on, for example, how to design your project or how to use a certain function

Although Warning hazards are related to personal injury, and Caution hazards are associated with equipment or property damage, it should be understood that operation of damaged equipment could, under certain operational conditions, result in degraded process performance leading to personal injury or death. Therefore, comply fully with all Warning and Caution notices.

3BSE 028 807 R201 Rev B

15

Document Conventions

About This Book

Document Conventions
The following conventions are used for the presentation of material: The words in names of screen elements (for example, the title in the title bar of a window, the label for a field of a dialog box) are initially capitalized. Capital letters are used for the name of a keyboard key if it is labeled on the keyboard. For example, press the ENTER key. Lowercase letters are used for the name of a keyboard key that is not labeled on the keyboard. For example, the space bar, comma key, and so on. Press CTRL+C indicates that you must hold down the CTRL key while pressing the C key (to copy a selected object in this case). Press ESC E C indicates that you press and release each key in sequence (to copy a selected object in this case). The names of push and toggle buttons are boldfaced. For example, click OK. The names of menus and menu items are boldfaced. For example, the File menu. The following convention is used for menu operations: MenuName > MenuItem > CascadedMenuItem. For example: select File > New > Type. The Start menu name always refers to the Start menu on the Windows Task Bar.

System prompts/messages are shown in the Courier font, and user responses/input are in the boldfaced Courier font. For example, if you enter a value out of range, the following message is displayed:
Entered value is not valid. The value must be 0 to 30.

You may be told to enter the string TIC132 in a field. The string is shown as follows in the procedure: TIC132 Variables are shown using lowercase letters. sequence name

16

3BSE 028 807 R201 Rev B

Section 1 Introducing Control Builder M


Product Overview
Control Builder M is a fully integrated Windows 2000 Professional application for efficient configuration and programming of ABB controllers AC 800M and AC 800C, and Advant Controller 250. There are three types of Control Builders: Control Builder Basic, Control Builder Standard and Control Builder Professional. They are available on the ControlIT for AC 800M/C CD-ROM (licenses required).

Programming Languages
Control Builder M provides five different programming languages according to IEC 61131-3. These are Function Block Diagram (FBD), Structured Text (ST), Instruction List (IL), Ladder Diagram (LD) and Sequential Function Chart (SFC). The specific rules and syntax of the programming languages will not be discussed in detail in this manual. Please refer to the Control Builder Online Help.

3BSE 028 807 R201 Rev B

17

Project Explorer

Section 1 Introducing Control Builder M

Project Explorer
Various automation projects can be easily created and maintained using Control Builder Project Explorer. These can be loaded, edited and saved similarly to ordinary MS Windows functions. Windows users will be familiar with the Project Explorer within a few minutes at the keyboard. Both the software (programs, functions, etc.) and the hardware (the actual hardware connected to the controller) needed for an automation task, are modeled in a project. The relationships are visualized using a graphical display (see Figure 3).

PM860/TP830

DO810

DI810

Figure 3. Project Explorer and actual hardware setup. Programming and code editing are carried out using grids, tabs and a text editor with basic MS Windows functions, such as drag-and-drop.

18

3BSE 028 807 R201 Rev B

Section 1 Introducing Control Builder M

Types and Instances

Types and Instances


The type is a general description of a unit that defines the behavior of an individual unit, called an instance. All instances of a type have exactly the same characteristics, but each instance of a type acts individually according to its characteristics. A function block is an instance of a function block type, a module is an instance of a module type, and a variable is an instance of a data type.

Libraries
Control Builder M is delivered with a comprehensive set of predefined functions. These include data types, functions, function blocks and Control Modules that can be used in the project. All libraries are delivered together with the Control Builder program. You can use them freely in your projects and test them in Simulation mode. Examples of available libraries are described below. The System Library (SystemLib) contains all basic data types and functions, e.g. type conversions, math and time, and logic functions such as flip-flop, timer and counter function blocks, as specified in IEC 61131-3. The Communication Library (CommunicationLib) includes function blocks for protocols such as MMS, ModBus, Foundation Fieldbus, SattBus, COMLI and Siemens 3964R. The Control Libraries (e.g. ControlBasicLib, ControlExtendedLib, etc.) include single PID control and cascade PID control function blocks, control modules, etc. The Alarm and Event Library (AlarmEventLib) contains function blocks for alarm and event detection, and alarm printouts on a local printer.

3BSE 028 807 R201 Rev B

19

Requirements

Section 1 Introducing Control Builder M

Requirements
Table 1. Control Builder PC requirements
Hardware Computer Operating system Additional Software Minimum requirements Pentium 166 MHz Windows 2000 Professional Recommended requirements for medium and large applications Pentium II 350 MHz or faster Windows 2000 Professional

Microsoft Word. Required for printout Microsoft Word. Required for printout of project documentation. of project documentation. Internet Explorer, version 5.5 or later. Internet Explorer, version 5.5 or later. Required to read Online Help Required to read Online Help documentation. documentation. Acrobat Reader, version 4.0 or later. Required to read online documentation. Acrobat Reader, version 4.0 or later. Required to read online documentation. 128 Mbyte RAM memory Min. 50 Mbyte disk available (200 Mbyte for a complete installation) 1280 x 1024, 32768 colors CD-ROM, local or via network Ethernet or RS232C serial channel for controller communication Mouse with scroll wheel(1) Standard PC keyboard

Internal memory Hard disk Screen Drive Communication Pointing device Keyboard

64 Mbyte RAM memory Min. 50 Mbyte disk available (200 Mbyte for a complete installation) 800 x 600, 32768 colors CD-ROM, local or via network Ethernet or RS232C serial channel for controller communication Mouse or other device(1) Standard PC keyboard

(1) A three-button mouse is recommended if Control Module Diagram (CMD) editing is to be used.

20

3BSE 028 807 R201 Rev B

Section 1 Introducing Control Builder M

Licensing

Licensing
For more information about licensing, please refer to Appendix A, Licenses.

Supported Controllers and Configurations


Controllers are the targets for the programs developed with the programming tool. It is to such units that the program code will be downloaded and executed. However, it is not a must to decide which controller to use in beginning the process of setting up a project, it is fully acceptable to write the code first and then select the controller. Various controller hardware is available: Controller AC 800M is a modular controller platform with various CPU and memory alternatives. This system is suitable for medium and large applications where flexibility is required.

Figure 4. AC 800M with S800 I/O.

3BSE 028 807 R201 Rev B

21

Supported Controllers and Configurations

Section 1 Introducing Control Builder M

Controller AC 800C is a compact controller with a low starting cost but high functionality. This system is suitable for small stand-alone applications or small sub-systems in larger applications.

Figure 5. AC 800C Advant Controller 250 is a modular controller with various CPU and memory alternatives. This system is suitable for medium and large applications where flexibility is required.

Figure 6. Advant Controller 250.

22

3BSE 028 807 R201 Rev B

Section 1 Introducing Control Builder M

Control Builder and Controller Configuration

Control Builder and Controller Configuration


The Control Builder is installed on a PC and a controller is connected to the PC via a serial communication cable (using the COM port) or Ethernet.

Figure 7. The PC running the Control Builder communicates with an AC 800M controller (with S800 I/O).

3BSE 028 807 R201 Rev B

23

Distributed Control

Section 1 Introducing Control Builder M

Distributed Control
The Control Builders, Standard and Professional, can communicate with several controllers via Ethernet. The controller types may be mixed and a project can consist of several applications, that can be shared between several programmers working on programming stations interconnected via Ethernet. Via Ethernet, the OPC Server for the AC 800M/C enables the distribution of runtime data between an OPC client and controllers.
PC running Control Builder and OPC Server PC running Control Builder

To OPC Client

Ethernet

Figure 8. Programmers can share the same project and the program code may be distributed to different controllers.

24

3BSE 028 807 R201 Rev B

Section 1 Introducing Control Builder M

Control Builder M Versions

Control Builder M Versions


Table 2 shows the main differences between the three Control Builder products. A project created in Control Builder Professional can be opened in Control Builder Standard or Basic, if the application name and the controller name are identical. However, this does not work if the functions used are not supported by Control Builder Basic. Table 2. Comparison between the Control Builder products
Function Make/change libraries Make/change/use Control Modules No. of controllers No. of applications No. of applications per controller No. of programs per application No. of tasks per controller Distribute code in an application to several controllers Share code between several programming stations Source code control(1) Integration with the Process Portal A Client Logging in and user privileges Control Builder Control Builder Control Builder Basic Standard Professional No No 1 1 1 3 3 No No Official only No No Yes No 8 8 1 64 16 No Yes Yes Yes 32 256 8 64 16 Yes Yes

Official/unofficial Official/unofficial No No Yes Yes

(1) A function for safe source code handling by using one official and one inofficial version of all files (e.g., library, application etc.) in a project.

The three products, Control Builder Basic, Control Builder Standard and Control Builder Professional have very powerful functions. The most important differences

3BSE 028 807 R201 Rev B

25

Control Builder M Versions

Section 1 Introducing Control Builder M

between the systems are described below (see Table 2 for more precise information). Control Builder Basic: A project created in Control Builder Basic can handle one application, divided into a maximum of three programs. Program code, function blocks and functions can be placed freely in any of these programs. Each of the three programs is connected to a task. The interval time and priority can be set for each task. Users can create their own data types and function blocks when needed. These can be re-used within the application, thus increasing efficiency and application quality. Control Builder Standard and Control Builder Professional: A project created in Control Builder Standard or Professional can handle several applications, each with several programs. Several programming stations can be used together in the project, and several controllers can be handled within a project. The user can create libraries containing data types, function block types, etc., which can then be used in any project. Control Builder Professional can handle Control Modules, that are components for efficient object-oriented programming. Extended library packages for complex control are available for this product. To obtain information on the current Control Builder version, select Help > About Control Builder from the Project Explorer menu.

26

3BSE 028 807 R201 Rev B

Section 2 Installing Control Builder M


This procedure is general for all products on the ControlIT for AC 800M/C CDROM: Control Builder Basic, Control Builder Standard and Control Builder Professional, the OPC Server for AC 800M/C, and AC 800M/C Connect (see AC 800M/C Connect, Installation and Configuration). The MMS Server is installed automatically on installation of any of the other products.

Figure 9. The Installation dialog box contains the following buttons: The Release Notes button shows the latest information. The Online Manuals button gives access to the manuals in PDF format. If not already installed, Acrobat Reader, a program which reads Acrobat files, will be installed automatically. The Terminals Diagrams button shows terminal diagram forms to be used for creating external cable connection drawings for the AC 800M and S800 I/O systems. The Install Software button activates the installation procedure.

3BSE 028 807 R201 Rev B

27

Step-by-Step Instructions

Section 2 Installing Control Builder M

The Help button accesses information on how to install a product. The Exit button allows the user to quit the installation procedure.

Using the Cancel button in any of the subsequent setup dialog boxes will interrupt the installation. When installation procedure is interrupted, all previously installed components will be disregarded.

Step-by-Step Instructions
PC Installation of products available on the ControlIT for AC 800M/C CD-ROM, is described below. The procedure is the same for all products. Control Builder is used to denote the product to be installed in the steps below. 1. 2. Log in as Administrator in Windows 2000. Insert the CD into the CD drive1. After a few seconds the Welcome dialog box will appear, see Figure 9. If the dialog box does not appear, start the file Startme.bat, which is located in the root directory of the ControlIT for AC 800M/C CD-ROM. Click Install Software. A dialog box will be displayed showing the products that can be installed from the ControlIT for AC 800M/C CD-ROM. Select Control Builder to be guided through the installation procedure. Please read the text in each dialog box, as it contains important information concerning steps to be taken during installation. For normal use, the suggested default settings are recommended. A status report will show that the installation has been successfully completed with the specified settings. It is recommended that you check the checkbox for reading the Last Minute Notes and read these before opening the installed program. The installation is now complete. The Install Software dialog box may now be closed, returning you to the Welcome dialog box where installation is terminated by clicking Exit. Read the Release Notes (delivered together with the manuals on the ControlIT for AC 800M/C CD-ROM).
If the CD-ROM is available via a network, this shared directory must be connected to your PC (the Installation wizard requires this). Select Tools > Map network drive in the Windows 2000 Explorer and connect the PC to the shared drive.

3. 4.

5.

6.

1.

28

3BSE 028 807 R201 Rev B

Section 2 Installing Control Builder M

TCP/IP Network Protocol

TCP/IP Network Protocol


The TCP/IP network protocol must always be installed on the PC when running any of the three Control Builder products. The TCP/IP protocol is used as a carrier for the following application protocols: MMS on TCP/IP SattBus on TCP/IP It is recommended that both Ethernet and the PPP protocol be installed. For further information, see either Creating a PPP Connection on page 80 or the Control Builder Online Help.

Setting Up
The Control Builder can be configured in a number of ways with respect to language, memory usage, etc. (see Appendix B, Control Builder M Settings).

Starting Up
Start the Control Builder using the Windows Start Menu (Start > ABB Industrial IT > Engineer IT > Control Builder Basic) or double-click the Control Builder icon on the desktop (if selected during installation). Control Builder Professional has log on and privilege functions. See the Control Builder Online Help.

3BSE 028 807 R201 Rev B

29

MMS Server for AC 800M/C

Section 2 Installing Control Builder M

MMS Server for AC 800M/C


During start-up of the Control Builder, the MMS Server, which is needed for communication between the Control Builder and the controller, will start automatically. The function of the MMS Server resembles a multiplexer between the three products (see Figure 78 in Appendix C, OPC Server for AC 800M/C) as it allows a number of our products to run and communicate with each other on the same computer. The MMS Server is installed automatically when installing the Control Builder (either version) or the OPC Server for AC 800M/C from the ControlIT for AC 800M/C CD-ROM. MMS Server starts automatically when any of these products are started or when the PC is booted (Windows 2000 Professional is started). To stop the MMS Server, right click on the MMS Server icon taskbar, and select Stop MMS Server. located on the

For information concerning the MMS Server Panel menu, refer to The MMS Server Panel Menu on page 88.

30

3BSE 028 807 R201 Rev B

Section 2 Installing Control Builder M

Add and Remove Programs

Add and Remove Programs


The installation procedure is described in Control Builder M, Getting Started. To add/remove a program, insert the ControlIT for AC 800M/C CD-ROM into the disc drive. Open the Windows Control Panel (Start > Settings > Control Panel) and double-click Add/Remove Programs. Select a program to be added or removed from the list, and click on the Change/Remove button. A dialog box appears, see Figure 10.

Figure 10. Components can be added and programs can be reinstalled or removed using this dialog box. The buttons have the following functions. Add Components is used to add a component which is not already installed, e.g. if you have performed a customized installation where some components were not selected. Reinstall is used to reinstall a program. Note that this function is not to be used for upgrading. Remove All will remove the selected program and all its components. Exit will exit the Installation Handler program.

3BSE 028 807 R201 Rev B

31

Add and Remove Programs

Section 2 Installing Control Builder M

32

3BSE 028 807 R201 Rev B

Section 3 Tutorial
Introduction
In this section we will take a quick look at the Control Builder engineering tool. A ready-for-test tutorial (Tutorial_01) is used to help familiarize you with the Project Explorer and its contents. An application program for a simple tank filling process, written in Structured Text (ST) and Function Block Diagram (FBD) code, is presented, and the declaration of local, global and access variables is described. Note that the example files are read-only files. The second tutorial (Tutorial_02) is used to show how the project is simulated and checked online. The examples use identical functions, but different programming languages. The project using the ST language is, for example, named Tutorial_02_ST, the project using the FBD language is named Tutorial_02_FBD, etc. See Project Examples in the Manual on page 12, to find out how to open an example. The figures in this and following sections refer to Control Builder Basic, but the tutorial should function in all three products. Control Builder Basic has the default program names Fast, Normal and Slow (which can be renamed). Only one application can be programmed in a project. Each of the three programs is connected to a task. The other two Control Builder products can have several applications, each with a task connected to them. The programs are named Program 1, Program 2, and Program 3 instead of Fast, Normal and Slow. Projects created in Control Builder Standard or Control Builder Professional can be opened in Control Builder Basic only if they have been created without the extra facilities available in the more extensive engineering tools (see Control Builder M Versions on page 25).

3BSE 028 807 R201 Rev B

33

Starting the Project

Section 3 Tutorial

Starting the Project


After start-up, the Project Explorer is displayed to the left. Select File > Open Project... to open a project. As the program prompts you for a project name, navigate to the folder Examples and select the directory Tutorial_01. Choose Tutorial_01.prj (.prj being the file extension for project files). See Figure 1. All files in the Examples directory are Read Only which means that they can not be altered. To be able to save changes made in the tutorials, the files must first be copied to your own project folder and opened from there.

34

3BSE 028 807 R201 Rev B

Section 3 Tutorial

Project Explorer

Project Explorer
The Project Explorer is the core of the programming environment. The program and hardware configurations are administrated from the Project Explorer. (See Figure 11.)
Title bar Project name Menu bar Tool bar

Project Explorer pane

Message pane

Figure 11. The Project Explorer. One application per project can be used in Control Builder Basic. In Control Builder Standard and Control Builder Professional several applications can be used. In this case a third folder, named Applications will be displayed (Figure 11).

3BSE 028 807 R201 Rev B

35

Title Bar, Menu Bar and Tool Bar

Section 3 Tutorial

Title Bar, Menu Bar and Tool Bar


The title bar is shown at the top of the Project Explorer. The project name Tutorial_01 is shown in the title bar. This is the name of the active project. An asterisk (*) indicates that something has been changed but not yet saved on file. The project name is followed by the current mode (Offline/Online). Below the title bar is the menu bar. Depending on which pane or mode we are in, the commands in the drop-down menus in the menu bar will be either black or dimmed, indicating which commands are available and which are not. Below the menu bar is the tool bar with buttons for the most common commands, for example, simulating or saving the project.

36

3BSE 028 807 R201 Rev B

Section 3 Tutorial

Libraries

Libraries
Initially, only the folders for the libraries and the controller are shown. To expand the folder, click the + sign beside the Libraries folder (clicking the - sign will collapse the folder). The libraries contain predefined functions and function blocks that can be used in your programs. Figure 12 shows the SystemLib and Function Block Types expanded.

Figure 12. The Project Explorer with part of the Libraries folder expanded

3BSE 028 807 R201 Rev B

37

Controller

Section 3 Tutorial

Controller
Collapse the libraries by clicking the minus sign to the left of the Libraries folder in the Project Explorer window. Expand the Controller folder a number of levels for a clear picture of the entire controller.
Access Variables

The access variables are used for communication with other systems. For further information see the Online Help.
Hardware

Expand the Hardware folder to its maximum depth. The Project Explorers display of the hardware setup is almost identical to the real hardware setup, i.e. as the units are mounted and connected to the I/Os (see Figure 13).

Figure 13. The Project Explorers display of the hardware setup.

38

3BSE 028 807 R201 Rev B

Section 3 Tutorial

Controller

Double-click an I/O unit to show the Hardware Configuration Editor. The connections made in the project between the application program and the hardware will be shown.

Figure 14. The Hardware Configuration Editor with an I/O module AI810 selected. Collapse the Hardware folder. Mark an I/O module (e.g. AI810) and press F1 to obtain information on the unit.

3BSE 028 807 R201 Rev B

39

Tasks

Section 3 Tutorial

Tasks
Expand the Tasks folder. The three tasks are connected to their respective programs (one task per program). The tasks serve as work schedulers for the programs and contain settings for interval time and priority. Control Builder Standard and Control Builder Professional have a maximum of 16 tasks per controller. Double-click the Tasks icon to access the Task Overview Editor. The editor displays the settings for all tasks, i.e. priority, interval time, etc. (see Figure 15).

Figure 15. The Task Overview Editor displays the settings for the three programs. Close the editor.

Application
The application contains the program code to be compiled and downloaded for execution in the controller. An application contains three programs: Fast, Normal and Slow. Each program is connected to one task. This means you can divide the control software into different parts, depending on the required interval times and priorities. Control Builder Standard and Control Builder Professional can use several applications, each with several programs. The program names are Program 1, Program 2, Program 3, etc. You can create and define your own data types and function blocks in the application. User-defined data types and function blocks can be created and used in the programs.

40

3BSE 028 807 R201 Rev B

Section 3 Tutorial

Application

A simple tank-filling process is programmed in Tutorial_01. See the process flow chart below (Figure 16).
Valve 23 HH H L LL TIC 23

Tank 23

Level Temp.

HH

LL

Figure 16. The process programmed in the project Tutorial_01. In the Project Explorer, expand both the Application and the Programs folders. Double-click Normal and select the ST_Code tab (in the program code pane) to show the program written in Structured Text code.

Figure 17. The program in ST code for Tutorial_01

3BSE 028 807 R201 Rev B

41

Application

Section 3 Tutorial

Select the FBD_Code tab to show the same functions written in Function Block Diagrams code. Note that there are four sets of variables. Use the scroll bar in the variable declaration pane to view all the variables. The tank and its objects are named Tank21 in ST code and Tank23 in FBD code.

Figure 18. The program in FBD code for Tutorial_01. Note that program Normal contains four tabs with different programs (with similar behavior) written in four different languages.

42

3BSE 028 807 R201 Rev B

Section 3 Tutorial

About Variables

About Variables
There are three kinds of variables in the system local, global and access. Local variables can only be accessed in the same function block or program in which they are declared. They can not be accessed from any other function block or program. Global variables can be accessed from any program. Before accessing a global variable in a function block, it must be declared as External. Access variables are those that can be accessed by other controllers. This allows data exchange between controllers. Further information about access variables can be found in the Online Help for Control Builder M.

Where to Declare a Variable


Follow the instructions below to open a variable declaration pane. To declare a local variable in a program, double-click the program icon in the Project Explorer (for example, Fast, Normal or Slow). To declare a local variable in a function block, double-click a function block in the Project Explorer to open its editor. Then select the Variables tab in that editor (see figure below).

Figure 19. Variables Tab. To declare a global variable in an application, double-click Application in the Project Explorer. To declare a connection to a global variable in a function block, double-click the function block icon in the Project Explorer to open its editor. Then select the External Variables tab (see figure above) in the editor. To declare an access variable, double-click the Access Variables icon in the Project Explorer.

3BSE 028 807 R201 Rev B

43

How to Declare a Local Variable

Section 3 Tutorial

How to Declare a Local Variable


This section describes how local variables are declared. It is not necessary to follow the step-by-step instructions below, but we recommend that you read the section. Procedures for declaring different types of variables are similar. The procedure for declaring a local variable in a program of type Fast is described below. 1. 2. Double-click the Fast program icon in the Project Explorer. The program editor will be displayed. The editor is divided into two parts the upper pane (declaration pane) and the lower pane (code pane). There are two tabs in the upper pane (Variables and Function blocks). Variables are declared under the Variables tab. We will discuss the second tab later. If the Variables tab is not activated, click it. Then place the cursor in the upper left-hand cell and type My_Variable. Move to the cell to the right by pressing the tab key and type bool (Boolean). Note that you need only type b, and the editor will attempt to fill in the remainder. Type the word bool or accept the editors suggestion by pressing the tab key. The next column is labeled Attributes. Each variable can have an attribute such as retain, coldretain, constant, etc. The attribute governs the value of the variable upon program execution, rebooting, etc. You can scroll through the possible settings by pressing the Alt key and using the up and down arrow keys. Choose retain. See the Control Builder Online Help for further information. In the next column, the initial value of the variable is defined. Set this to true. Skip the following two columns. In the Description column enter a short description of the variable, for example A short test. Your grid should now look like Figure 20.

3. 4.

5.

6. 7.

Figure 20. Declaration of a Boolean variable.

44

3BSE 028 807 R201 Rev B

Section 3 Tutorial

How to Declare a Local Variable

Select a Variable in the Code Pane

1.

In the code pane (below the declaration pane), select the Code tab and type My_Variable. Another method is to select Insert > Variable, (or press Ctrl+J) and make your selection from the list presented.

Figure 21. Press Ctrl+J to display the variables list box. 2. In the list box, double-click the variable to be inserted into the code pane.

3BSE 028 807 R201 Rev B

45

How to Declare a Local Variable

Section 3 Tutorial

Statement Selector

While we are in the code pane, let us look at another programming help function. 1. 2. Go to a blank line and select Insert > Statement (or press Ctrl+I) to display a list box with insertable instructions. Type an i and the cursor will jump to the first if statement. You have three possible choices; select the third using the up and down arrow keys or the mouse. The if statement will be inserted with the appropriate format (see Figure 22). Now you have only to fill in the blanks.

Figure 22. The statement list box helps you to input statements. 3. Close the editor. Do not save the program.

46

3BSE 028 807 R201 Rev B

Section 3 Tutorial

Simulation

Simulation
The second project, Tutorial_02_ST, is used to demonstrate how to check a project in simulation mode. There are four different projects, one for each of the programming languages: FBD, ST, IL and LD. Use any of these projects. In simulation mode you can change variable values and see the program response online. The program is to be connected to a controller AC 800M, however, the controller is not required in order to simulate the program. The example consists of a simple counter, which counts when a start variable is true. The counter sets another variable to true when a preset limit is reached. Another variable resets the counter. Simulation mode means that the Control Builder executes the code in the same manner as the controller would. It is used for fault finding purposes. 1. 2. Open the project Tutorial_02_ST.prj (or any of the other three projects). Expand the tree in the Project Explorer and double-click program Normal. The code editor will open and display the code (see Figure 23).

Figure 23. A simple counter.

3BSE 028 807 R201 Rev B

47

Simulation

Section 3 Tutorial

This is a simple counter (there are library counter function blocks available, but they are not used in this tutorial). 3. 4. 5. Close the program editor. Select Tools > Simulate Project and, then Continue in the dialog box that appears. The simulation mode will be entered. Double-click program Normal for the progression of variables to be shown online (see Figure 24).

The Stop_Limit value may be changed online at either of these locations

Figure 24. The progression of variable values are displayed online (ST). A highlighted variable in the online code pane indicates the variable is true. 6. In the code pane, start the counter by clicking Counter_Start and then right-click and select On. Wait until the counter reaches the stop limit 50, at which point the Stop_Limit_Ind value will change to true and the color of the variable will change to blue.

48

3BSE 028 807 R201 Rev B

Section 3 Tutorial

Closing the Control Builder

7. 8.

Reset the counter and the variable Stop_Limit_Ind by setting the Counter_Reset to true. You can also change the stop limit. Close the online editor and halt the simulation by selecting Tools > Stop Simulate.

The test using Tutorial_02 is now complete. As an additional exercise, you can attempt to simulate Tutorial_01 and check that the program works as expected.

Closing the Control Builder


You can print the project documentation before closing the Control Builder. The procedure for this is described in the section Project Documentation on page 70. You can make a backup of a project before closing the Control Builder. To close the Control Builder, select File > Close Project followed by File > Exit.

3BSE 028 807 R201 Rev B

49

Closing the Control Builder

Section 3 Tutorial

50

3BSE 028 807 R201 Rev B

Section 4 Creating a Project Shop Doors


Introduction
This section describes the steps necessary to set up a project named MyDoors, to write some simple code, and to enter simulation mode to show on screen how the variables change during program execution. Finally, we will download the program to the AC 800M controller. This manual introduces two alternatives for programming the project. This subsection describes programming using Structured Text (ST). Appendix E, Project in FBD describes programming using Function Block Diagram (FBD). Follow the appropriate section for your project. After this session, you can check your MyDoors project against the application found in the Examples > ShopDoors_ST directory (the project using the ST editor) or, if you prefer, Examples > ShopDoors_FBD (the project using the FBD editor). We will now simulate the entrance to a store. Specifications: The entrance consists of two sliding doors. The doors open when a customers presence activates a photocell. Each door is opened and closed by its own motor. The doors return to default position (closed) five seconds after the last activation of the photocell. Consequently, several customers arriving one after the other will extend the time the door remains open. The number of customers is recorded for statistics. Manual resetting of this counter should be possible. The total number of times the doors have opened since they were last serviced should be recorded. Each opening of the doors should result in a counter being

3BSE 028 807 R201 Rev B

51

Selecting the Template

Section 4 Creating a Project Shop Doors

incremented. When the counter reaches a preset limit, a flag should indicate that service is required. Manual resetting of the flag should be possible.

Selecting the Template


Depending on the hardware setup, different templates are available for different controllers. We will use the template for the controller AC 800M, but you may select another controller. Downloading to all controller types is described later. 1. 2. 3. 4. Start the Control Builder. Minimize everything except the Control Builder. In the Project Explorer, under the menu File, select New project followed by the template controller AC 800M. Enter the project name MyDoors. A disk location for your project will be automatically suggested. Click OK.

Hardware is described later. At this time we will use Control Builder to simulate the code.

52

3BSE 028 807 R201 Rev B

Section 4 Creating a Project Shop Doors

Declaration

Declaration
Variable and Data Type Preparation
Before starting to write the code you should have a clear picture of the objects in the model. Although it is possible to start writing the code and define the variables later, it is best to define them from the beginning. Photocell The photocell has two states, active and inactive, typically represented by a Boolean variable. We use a Boolean variable named Photo_Cell (1 = active, 0 = inactive). Door motors The entrance itself consists of two doors facing each other. Each door is opened by a motor controlled by Boolean signals (Motor_1 and Motor_2). The time the doors should remain open is declared in a variable DoorsOpen_Time of type time. Number of customers Each time the photocell is activated, a counter representing the total number of customers entering the shop should be incremented. This counter, Customers_Qty, is of type integer. On certain dates, the shop manager records the total number of customers up to that date and resets the counter. Consequently a Boolean variable Reset_Counter is declared which resets the counter. Door service intervals Since the doors are to be serviced at regular intervals, let us say after every 10,000 openings, we want to keep a record of the number of openings since the previous service. The number of openings is stored as the variable Openings_Freq of type dint. When the counter reaches the upper limit defined by Openings_Total of type dint, a flag (Service_Req of type Boolean) is set, indicating that service is required. Manual resetting of the service counter is activated using a Boolean variable Serviced. The doors should continue to work even if service is not performed.

3BSE 028 807 R201 Rev B

53

Declaring the Variables

Section 4 Creating a Project Shop Doors

Declaring the Variables


1. 2. In the Project Explorer, expand the project tree until you see program Normal. Double-click the icon to open the program editor. The program editor is divided into three panes: the declaration pane, the code pane, and the message pane. If you do not see the third pane, choose View > Message Pane to display it at the bottom of the window. (See Figure 25.)

The declaration pane

The code pane

The message pane

Figure 25. The editor for program Normal. 3. 4. Place the cursor in the upper left-hand cell in the declaration pane and type Photo_Cell. Move one cell to the right by pressing the tab key. The status of the photocell (activated or not) is a Boolean variable; type bool in the Data type column. Note that you need only type b; the editor will fill in the rest. Accept the editors suggestion by pressing the tab key. The cursor will move to the column labeled Attributes. When the name Photo_Cell was typed the editor added retain by default. There are many other choices that you can scroll between by holding down Alt and scrolling with the up and down arrow keys. Choose the default setting retain. Press the tab key to move to the next column.

5.

54

3BSE 028 807 R201 Rev B

Section 4 Creating a Project Shop Doors

Declaring the Variables

6.

The initial value is the value that the variable will have at start-up the initiation of program execution. (Actually, it depends on the settings of the attribute, but we will not go into this here.) Since the variable describes the status of the photocell, it should be set to false (0) to indicate that the doors are closed at start-up. Skip the column I/O address. The address will be automatically filled in when configuring the hardware, see Connecting I/O Interfaces to the Application on page 65. The last column is reserved for comments. Here you can enter text describing the variable. Your first row should now look like row 1 in Figure 26.

7.

8.

Figure 26. Declaration of the Boolean variable Photo_Cell. 9. Next, declare the length of time the doors should remain open, and add a variable that records the time elapsed since the photocell previously was activated, see Figure 27.

Figure 27. Declaration of the DoorsOpen_Time and Doors_Open_ET variables. Note the attribute constant of the variable DoorsOpen_Time. You can either explicitly type constant or scroll through the available formats using Alt together with the up and down arrow keys. 10. Fill in the remaining rows in the grid according to Figure 28.

Figure 28. Declaration of variables.

3BSE 028 807 R201 Rev B

55

Writing the Code Using the ST Editor

Section 4 Creating a Project Shop Doors

For data types that can be specified in the Data type column, choose Insert > Variable, Type, Attribute (or press Ctrl+J) to access a list of possible data types. 11. Select Editor > Check (or press Ctrl+B) to check that everything is correct. A message similar to the one below should be displayed in the message pane. Starting check 2000-03-14-11:16:08. Summary: Time 1 second, 0 errors, 0 warnings. We have now defined the set of variables to be used. The program code can be written in any of the five programming languages. The following section describes how to write the code using the Structured Text (ST) editor. For instructions on how to use the Function Block Diagram (FBD) editor, see Appendix E, Project in FBD.

Writing the Code Using the ST Editor


Changing the Programming Language
To change the appropriate editor (ST) for the current code block (local selection), right-click the Code tab and select Change Language. The Change Language dialog box will appear. Check the appropriate editor radio button. To select the appropriate editor for all (not already used) code blocks in the application (global selection), select the Tools > Setup menu followed by the General tab. Check the appropriate editor radio button.

56

3BSE 028 807 R201 Rev B

Section 4 Creating a Project Shop Doors

Declaring the Function Blocks

Declaring the Function Blocks


Function blocks are required for the timer and counters. 1. 2. Activate the Function Blocks tab in the declaration pane. Fill in the grid according to Figure 29. Declare the TOf function block in row 1 and name it OpenDoors. Declare the CTU function block in the next row and name it Customer_Count_Up. Note that in rows 2 and 3 two different function blocks are declared using the same function block type.

Figure 29. Declaring the function blocks. You may perhaps not be too familiar with what the TOf and the CTU function blocks stand for and why we have chosen them. Consult the Online Help function for further information concerning function block types. For help, place the cursor in a cell having the function block you wish to access, and press F1. 3. Select Editor > Check (or press Ctrl+B) to check that everything is correct. A message similar to the one below should be displayed: Starting check 2000-06-14-11:16:08. Summary: Time 1 second, 0 errors, 0 warnings. 4. Go back to the Variables tab.

3BSE 028 807 R201 Rev B

57

Dividing the Program into Blocks

Section 4 Creating a Project Shop Doors

Dividing the Program into Blocks


We will now start to write the program code that controls the doors. This is done in the code pane containing the actual code, which can be divided into blocks in order to create a better structure.

Figure 30. The program editor with empty code pane. The different blocks, represented by tabs (the figure above shows three tabs Motors_Doors, Number_Of_Customers and Service_On_Doors), can be written in any of the available programming languages. 1. Change the name of the code block to Motors_Doors by pointing to and right-clicking the Code tab. Now select Rename. Specify the new name Motors_Doors in the dialog box. This code block describes the motors controlling the doors. Add another code block for the number of customers by pointing to and rightclicking the tab Motors_Doors. Now select Insert. In the displayed dialog box, specify the name Number_Of_Customers and ensure that ST is selected as the programming language. This code block governs the counting of the number of customers.

2.

58

3BSE 028 807 R201 Rev B

Section 4 Creating a Project Shop Doors

Code Input

3.

Add a third code block named Service_On_Doors. The declaration pane does not change and is common to all code blocks.

To change to another programming language, see Changing the Programming Language on page 56

Code Input
1. 2. Activate the Motors_Doors code block and place the cursor on the first line in the code block. Select Insert > Variable Type, Attribute... (or press Ctrl+J). The variables and function blocks declared under the Function Blocks tab in the declaration pane will be shown. Select the OpenDoors function block either by starting to type Open or by using the mouse to select a function block from the list. Accept the selection by pressing Return. When you now type the leading left-hand parenthesis (, the parameter editor will be activated, see Figure 31.

3.

Figure 31. The parameter editor. 4. Place the cursor in the first empty white cell and select Insert > Actual parameter From List (or press Ctrl+J). Select the variables by either starting to type the name, or by using the mouse. Accept the selection by pressing Return.

3BSE 028 807 R201 Rev B

59

Code Input

Section 4 Creating a Project Shop Doors

5.

Fill in the parameter list according to Figure 32.

Figure 32. Input of function block parameters. 6. 7. Select Editor > Apply and Close (or press Ctrl+U) to insert the parameters into the code. The output from the function block (Q) can be passed on by specifying an output parameter in the parameter assistant (for example Start_Motor on the Q line, i.e. line 3) but we will use a different way of accessing variables from function blocks: dot notation. The output Q is a Boolean signal, which is passed on to the motors to open the doors. For both doors to open, the signal must be passed to both motors. To do this, write: Motor_1 := OpenDoors.Q; Motor_2 := OpenDoors.Q; The output Q is now addressed directly to the function block and a value assigned to both motors to open the doors.

60

3BSE 028 807 R201 Rev B

Section 4 Creating a Project Shop Doors

Code Input

Figure 33. The code block under the Motors_Doors tab. 8. 9. Select Editor > Apply (or press Ctrl+W) to check and save the code. Change thev tab to Number_Of_Customers and add the code, see Figure 34.

Figure 34. The code block in the tab Number_Of_Customers. (The code can be written structured with or without tabs and spaces.) Note that the text should not be entered as in an ordinary text editor. Use instead Insert > Function block and the parameter editor.

3BSE 028 807 R201 Rev B

61

Simulation

Section 4 Creating a Project Shop Doors

10. Change the tab to Service_On_Doors and add the code, see Figure 35.

Figure 35. The code block under the Service_On_Doors tab. 11. Select Editor > Apply (or press Ctrl+W) to check and save the code. 12. Close the editor. If error messages are displayed in the message pane, you can quickly go to where the error occurred by double-clicking the error line. You will also find help in the message pane concerning the type of error.

Simulation
In Simulation mode a project can be simulated without a controller being connected. The values of variables can be changed for an immediate program response. Note that all variables are reset to their initial values when simulation is started. 1. Select Tools > Simulate Project. For Standard and Professional versions of Control Builder M, the Simulate analysis window will be displayed. Click Continue to start simulation. 2. 3. Double-click program Normal to display the online editor. All variables in program Normal are listed in the upper pane and the code in the lower pane, see Figure 36.

62

3BSE 028 807 R201 Rev B

Section 4 Creating a Project Shop Doors

Simulation

Figure 36. Simulation mode (ST). Here we see the current values for the duration the doors should remain open, the status of the motors and the number of times the doors may be opened before service is required, etc. 4. In the first line (Photo_Cell) we see that the photocell is set to False (no customer has activated the photocell). If you change this to 1 (True) you will see that the motors change to True (start) and the number of openings since last service increases by one, as does the number of customers. Change the photocell value back to 0 (no customer activating the photocell). Notice how the clock starts and counts up to five seconds at which point the motors are set to 0 (off) and the doors close. Set the variable Photo_Cell to 1 and then return quickly to 0 (a customer has activated the photocell). Both the number of openings is increased and customers increase. Wait until the doors close. Now, quickly input 1, 0, 1, 0, 1, 0 (three customers passing the photocell one after the other). Notice that the clock starts when the first customer passes the

5.

6.

7.

3BSE 028 807 R201 Rev B

63

Configuring the Hardware

Section 4 Creating a Project Shop Doors

photocell and resets to 0 when the next customer passes. Consequently, the opening time is extended for a new period of 5 seconds, and so on. Note also that the number of times the doors open only increases by one, whereas the number of customers is increased by three. We now have three openings of the doors and five customers. 8. 9. Reset the customers counter by changing the value on the last line (Reset_Counter) to 1 and then return to 0. Activate the photocell so the number of openings (Openings_Freq) passes Openings_Total. Service_Req will then become True.

10. Change the Serviced value to 1, then return to 0 and watch the reaction of the counters and flags. Note that the variable Openings_Freq resets. 11. Select Tools > Stop Simulate in the Project Explorer to exit simulation mode.

Configuring the Hardware


In the following it is assumed that an AC 800M controller is used. 1. 2. Expand Controller in the Project Explorer; expand Hardware AC 800M, PM860/TP830 and ModuleBus. Right-click ModuleBus and select New Unit followed by S 800I/O. Select input unit AI810 and accept the default position (1) by clicking OK. This unit was added to show how an I/O unit is added. Information on an I/O unit, e.g. AI810, can be accessed from the Online Help function: mark the I/O unit in the Project Explorer and press F1. 3. As you continue configuring your hardware the hardware tree should resemble that shown in Figure 37. Only 4 DO814 and 5 DI810 will be connected to I/Os in the project.

64

3BSE 028 807 R201 Rev B

Section 4 Creating a Project Shop Doors

Connecting I/O Interfaces to the Application

Figure 37. Hardware setup (Control Builder Basic).

Connecting I/O Interfaces to the Application


Two methods of connecting the I/O signals to variables are described below.
Method 1

1.

Double-click the I/O module 5 DI810 whereby an editor will appear. Activate the Connections tab. Place the cursor in the first cell in the column labeled Variable. We will now add the variable that is to be assigned to the input signal the photocell. Type N (for program Normal) and observe that the editor fills in the rest. Press . (period) to move to the next level the variable in the application. A list containing all declared variables will appear. Type Program2 and press . (period) to move to the next level the variable in the application. A list containing all declared variables will appear. Type the project name (MyDoors) and press . (period) to move to the next level. A list of programs for selection will appear. Double-click Normal, and press . (period) again. A list containing all declared variables will be displayed.

2.

3BSE 028 807 R201 Rev B

65

Connecting I/O Interfaces to the Application

Section 4 Creating a Project Shop Doors

3.

Double-click Photo_Cell in the list to copy the full path. (see Figure 38).

PM860/TP830

DI810

AC 800M controller and S800 I/O

Figure 38. The variable Normal.Photo_Cell is connected to I/O address IX0.11.5.1 of the S800 I/O interface (Control Builder Basic view).

66

3BSE 028 807 R201 Rev B

Section 4 Creating a Project Shop Doors

Connecting I/O Interfaces to the Application

Method 2

1.

Delete the text in the first cell and select Insert > Insert Path From Tree. A path selector will be shown (see figure below). This selector resembles the Project Explorer. Expand Normal and double-click Motor_2 to copy in the full path (see Figure 39). Delete the text in the first cell and select Insert > Insert Path From Tree. A path selector will be shown (see figure below). This selector resembles the Project Explorer. Expand Program2 and double-click Photo_Cell to copy in the full path. Delete the text in the first cell and select Insert > Insert Path From Tree. A path selector will be shown (see figure below). This selector resembles the Project Explorer. Expand both Application_1 and Program2. Double-click Photo_Cell to copy in the full path.

Figure 39. The path selector for connecting variables to the I/O. 2. Save, and close the editor. Note the text at the bottom of the window. This gives the data type and the description entered when the variable was declared.

3BSE 028 807 R201 Rev B

67

Connecting I/O Interfaces to the Application

Section 4 Creating a Project Shop Doors

3.

Double-click the I/O module 4 DO814 and enter the connections of the two outputs in the project (see figures below).

Figure 40. The connections of the two motor variables to the I/O (Control Builder Basic view)

Figure 41. The connections of the two motor variables to the I/O (Control Builder Standard view)

Figure 42. The connections of the two motor variables to the I/O (Control Builder Professional view) 4. Check the declaration by selecting Editor > Check (or by pressing Ctrl+B). Close the editor.

Another way to inspect the connections to the I/Os in another way is to open program Normal and check the column labelled I/O address. Here you will find the address of the photocell and the motors (see Figure 43).

68

3BSE 028 807 R201 Rev B

Section 4 Creating a Project Shop Doors

Connecting I/O Interfaces to the Application

Figure 43. The column labeled I/O address shows how variables are connected to I/Os. Changes made to I/O connections in either editor (the programming or the I/O unit editor) will be reflected in both editors. Consequently you may use the one you are most comfortable with. Your project has now been simulated and the hardware configuration is complete. It is now time to download the project to the controller (of the type which was selected at the beginning of this project). Section 5, Downloading and Testing the Application describes the downloading of a project to various controllers.

3BSE 028 807 R201 Rev B

69

Project Documentation

Section 4 Creating a Project Shop Doors

Project Documentation
The project, including the application, libraries and controllers, can be printed. The Control Builder printout function uses Microsoft Word (must been installed) as a word processor, which will automatically open when a printout is requested. 1. Select File > Documentation... from the Project Explorer to open the Documentation dialog box (see Figure 44).

Figure 44. The dialog box for selecting the document name and template. Select Application from the Project Explorer followed by your application, for example, ShopDoors_ST. Select File > Documentation... to open the Documentation dialog box (see Figure 44). 2. Enter (or browse to) an available Microsoft Word document file name (in the first row of the dialog box above) to overwrite the selected document file; or enter (or browse to) a Microsoft Word template name in the second row, to use one of the available Microsoft Word templates for your application printout. Check the checkbox in the Documentation project constants (not required) and click OK. Microsoft Word will be activated to display the application (project constants, data types, programs, etc.) including contents. To print, select File > Print... in Microsoft Word. Repeat steps 1 and 2, but select Controller (rather than Application). Your controller configuration will now print.

3.

70

3BSE 028 807 R201 Rev B

Section 5 Downloading and Testing the Application


Introduction
This chapter describes project download procedures for AC 800M, AC 800C controllers, and Advant Controller 250. It also describes the firmware upgrade and controller IP address setting procedures. You must select whether to download via Ethernet or via the RS-232C serial port. A configuring tool, IPConfig available after installation of the Control Builder is used to simplify configuration of the controller IP address.

Firmware Upgrade via Serial Line


The controller firmware and the Control Builder must be identical. If you are unsure, perform the steps in this section. It will only take a few minutes of your time. Firmware upgrade can be performed from the Control Builder via the Ethernet network (see the Control Builder Online Help) The Serial line upgrade procedure is always avaialble. 1. Connect the serial cable between the PC running the Control Builder and the Controller to the tool port, as specified in Table 3. For the type of cable, see Appendix D, Communication Cable Configuration. Select the appropriate COM port for the PC (default COM 1).

2.

3BSE 028 807 R201 Rev B

71

Firmware Upgrade via Serial Line

Section 5 Downloading and Testing the Application

Table 3. Cable connection.


Controller AC 800M AC 800C AC 250 Tool Port COM 4 COM 0 Ch 0 Connector RJ 45 RJ 45 DSUB 9-pole Cable Name TK212 TK212 200-CPC

No program capable of blocking the selected COM port, is to be running during upgrade procedure. This applies in particular to the MMS Server program. 3. 4. Power up the controller. From the Windows Start menu select Start > ABB Industrial IT > Engineer IT > Control Builder M... > Serial Firmware Upgrade. The following dialog box will appear.

Figure 45. The Serial Firmware Upgrade dialog box. 5. Select Settings from the dialog menu above, followed by the COM port selected in the step 2.

72

3BSE 028 807 R201 Rev B

Section 5 Downloading and Testing the Application

Firmware Upgrade for Redundant CPU

6.

Click the Connect button and hold down the Init/Reset pushbutton on the controller (for at least three seconds)1. Wait about a minute until a message appears. In the event of an error message Connect failed, you must check the cables and repeat the above steps (see the Serial Firmware Upgrade Online Help). If the connection is correct, then the following dialog box will appear.

Figure 46. The Status dialog box appears if the connection to the controller is correct. 7. Select the identical Firmware and Control Builder versions, click Upgrade and wait 510 minutes. The LED behavior during the upgrade procedure is described in the Serial Firmware Upgrade Online Help. Hold down the Init/Reset button on the controller (for at least three seconds)1.

8.

Firmware Upgrade for Redundant CPU


There are two methods for upgrading Firmware when redundant CPUs are used. One method is to upgrade the two CPUs (Controller A and B) in the manner described in Firmware Upgrade via Serial Line on page 71. Each controller must be upgraded separately with the Firmware and the controllers twice reset manually (step 8). At the first reset, Controller A must be reset first and at the second reset, Controller B.
1. For AC 800C and Advant Controller 250: Set the mode switch to position 0 before resetting and then return it to 1 after the reset.

3BSE 028 807 R201 Rev B

73

Setting a Unique Controller IP Address

Section 5 Downloading and Testing the Application

The second method of upgrading Firmware for redundant CPUs is to connect the controllers to each other via RCU and CEXbus. Upgrade Firmware to the primary controller as described in Firmware Upgrade via Serial Line on page 71. The secondary controller works as a function of the primary controller, which is why both use the same Firmware.

Setting a Unique Controller IP Address


A unique controller IP address must be set in order to avoid conflict with other devices on the Control Network. The procedure described below assigns a unique address to the controller via the serial line, without being connected to the network. A configuring tool, named IPConfig, is used to set the IP address. IPConfig cannot be used for programs running on the PC. 1. Connect the serial cable between the PC running the Control Builder and the Controller to the tool port, as specified in Table 4. For type of cable, see Appendix D, Communication Cable Configuration Table 4. Connection.
Controller AC 800M AC 800C AC 250 Tool Port COM 4 COM 0 Ch 0 Connector RJ 45 RJ 45 DSUB 9-pole Cable Name TK212 TK212 200-CPC

2.

Select the appropriate COM port for the PC (default COM 1). No program capable of blocking the selected COM port, is to be running during upgrade procedure. This applies in particular to the MMS Server program..

3.

Power up the controller.

74

3BSE 028 807 R201 Rev B

Section 5 Downloading and Testing the Application

Setting a Unique Controller IP Address

4.

From the Windows Start menu select Start > ABB Industrial IT > Engineer IT > Control Builder M... > IPConfig. The following dialog box will appear:

Figure 47. The IP Config dialog box. 5. Click the Connect button and hold down the Init/Reset button on the controller (for at least three seconds)1. Wait up to a minute. If the connection procedure fails, then a time-out message will appear. Check the cables and repeat the above steps. If OK, the current IP settings (the IP Ethernet address and its associated subnetmask) will be displayed in the dialog box (see Figure 48).

Figure 48. The IPConf dialog box with controller connected.


1. For AC 800C and Advant Controller 250: Set the mode switch to position 0 before resetting and return it to 1 after the reset.

3BSE 028 807 R201 Rev B

75

Setting a Unique Controller IP Address

Section 5 Downloading and Testing the Application

Enable Autostart should normally be disabled. Read more about this in the IPConfig Online Help. 6. Enter a unique IP address and subnetmask (obtainable from your Control Network Administrator). Example: IP address 172.16.255.254 (the default controller address), and its associated subnetmask, 255.255.0.0. Click Set IP in the IPConfig dialog box to send the new address to the controller. Hold down the Init/Reset button on the controller (for at least three seconds)1.

7. 8.

Connect the network cable between the controller and the Control Network. The port and channel positions are shown in Table 5. Table 5. Port and channel positions.
Controller AC 800M AC 800C AC 250 Communication Interface Built-in CI272 CIE Position 1 or 2 Channel CN1 COM 0

Anywhere AUI

CN2 on the AC 800M controller must not be connected to the network.

1.

For AC 800C and Advant Controller 250: Set the mode switch to position 0 before resetting and then set it back to 1 after the reset.

76

3BSE 028 807 R201 Rev B

Section 5 Downloading and Testing the Application

Downloading the Project via Ethernet

Downloading the Project via Ethernet


Contact with the controller has now been established and the project can be downloaded. At this stage you can choose whether to download via Ethernet or via RS-232C (described in the following section). The choice is essential for the project. If the controller is to be connected to a PC via a switch or hub, then a straight-through Ethernet cable should be used. If there is a direct connection between the controller and the PC, then use a cross-over Ethernet cable. The PC and controller NetID and subnetmask must be the same. For example, if the controller has the IP address 172.16.X.Y, then the PC must have the IP address 172.16.P.Q. The letters X, Y, P and Q are of no significance in this case. For further information, see Appendix D, Communication Cable Configuration. You can access the PC (Control Builder) System identity (IP address) from the Control Builder About... dialog box. 1. 2. Start the Control Builder and open the project to be downloaded. In the Project Explorer, mark Controller1 and right-click and select System Identity, see figure below.

Figure 49. The Set System dialog box. 3. Enter the same IP address as the controller address (for example: 172.16.255.254).

1.

For Control Builder Standard and Professional: Expand Controllers and then Controller_1 (or the assigned controller name).

3BSE 028 807 R201 Rev B

77

Downloading the Project via Ethernet

Section 5 Downloading and Testing the Application

4.

In the Project Explorer, expand Hardware until you find Ethernet hardware. Double-click 1 Ethernet if an AC 800M controller is to be connected, or 0 Ethernet if an AC 800C or Advant Controller 250 controller is to be connected (see Table 6). Table 6. Ethernet channels.
Controller AC 800M AC 800C AC 250 Channel No. 1 0 0

5. 6.

Enter the same IP address and subnetmask as given in the IPConfig. Click Apply/Close to save and close the list. The Ethernet channel is now set to the appropriate IP address. The network cable must not be connected to CN2.

7. 8.

Save the project. Select from the Project Explorer, Tools > Download and go online to send the new IP address (and your project) to the controller. The IP address is only valid after a controller reset. The dialog box below will appear. Information on downloading procedure is given in the message pane.

78

3BSE 028 807 R201 Rev B

Section 5 Downloading and Testing the Application

Downloading the Project via Ethernet

Figure 50. The Online Analysis dialog box (for Control Builder Professional). The radio buttons for warm and cold restart are available if the application is to be changed. A download will only take place if changes are made to the application. Possible communication errors will be reported in the Remarks column of the Online Analysis dialog box. 9. Click Continue to download the application and close the Online Analysis dialog box.

3BSE 028 807 R201 Rev B

79

Downloading the Project via RS-232C

Section 5 Downloading and Testing the Application

Downloading the Project via RS-232C


Creating a PPP Connection
This procedure describes the downloading via a serial line connection between the controller and the PC running the Control Builder M. Connection to a network is not required. Note that should you decide to download the project via RS-232C, then you must continue to download via RS-232C. Changing to downloading via Ethernet requires special settings. It is assumed that the correct firmware is installed in the controller (see Firmware Upgrade via Serial Line on page 71). 1. Use the IPConfig tool (described under Setting a Unique Controller IP Address on page 74) to download the controller IP address factory settings (click the Restore Factory Settings button in the IP Config dialog box, see Figure 47). This will assign the IP address 192.168.255.254 to the PPP channel. Connect a serial cable between the PC running the Control Builder and the tool port (see Table 3). Power up the controller (the Ethernet network must not be connected). A new PPP connection should now to be added to the PC. From the Windows Start menu select Start > Settings > Network and Dial-up Connections > Make New Connection. The Network Connection Wizard Welcome dialog box will appear.

2. 3. 4.

80

3BSE 028 807 R201 Rev B

Section 5 Downloading and Testing the Application

Creating a PPP Connection

Figure 51. The Network Connection Wizard Welcome dialog box. 5. Click Next, and check the radio button in the new dialog box, as in the figure below.

Figure 52. Selecting the Network Connection Type.

3BSE 028 807 R201 Rev B

81

Creating a PPP Connection

Section 5 Downloading and Testing the Application

6.

Click Next and check the radio button, as in the figure below.

Figure 53. Selecting the guest controller. 7. Click Next, and select the device, as in the figure below.

Figure 54. Selecting a device.

82

3BSE 028 807 R201 Rev B

Section 5 Downloading and Testing the Application

Creating a PPP Connection

8.

Click Next and check the radio button, as in the figure below.

Figure 55. Selecting a connection for all users. 9. Click Next and enter any name for the connection. The connection is named PPP in the figure below.

Figure 56. Entering a connection name.

3BSE 028 807 R201 Rev B

83

Creating a PPP Connection

Section 5 Downloading and Testing the Application

10. Click Finish. The network connection is now complete and the system will attempt to connect the PC to the controller. When the dialog box below appears, click Cancel.

Figure 57. Click Cancel to stop the connection attempt. 11. Select from the Windows Start menu select Start > Settings > Network and
Dial-up Connections.

12. Select the new connection (named in step 9), right-click and select Properties. The dialog box below will appear.

84

3BSE 028 807 R201 Rev B

Section 5 Downloading and Testing the Application

Creating a PPP Connection

Figure 58. Setting the new PPP connection properties. 13. Click Configure to open the Modem Configuration dialog box. Enter information exactly as in the figure below and click OK.

Figure 59. Modem Configuration settings.

3BSE 028 807 R201 Rev B

85

Creating a PPP Connection

Section 5 Downloading and Testing the Application

14. Click the Networking tab in the PPP-Default Properties dialog box (see Figure 58). The following dialog box will appear.

Figure 60. PPP Properties

86

3BSE 028 807 R201 Rev B

Section 5 Downloading and Testing the Application

Creating a PPP Connection

15. Mark Internet Protocol TCP/IP, and click Properties in the dialog box. The following dialog box will appear (see Figure 61).

Figure 61. The Internet Protocol (TCP/IP) Properties dialog box.

3BSE 028 807 R201 Rev B

87

Creating a PPP Connection

Section 5 Downloading and Testing the Application

16. Click Advanced to display the Advanced TCP/P Settings dialog (see Figure 62).

Figure 62. The Advanced TCP/IP Settings. 17. Uncheck the Use default gateway on remote network box and click OK. A PPP configuration has now been created and configured on your PC. The new connection must be tested. The cable must be connected between the PC and the controller, and the latter be turned on.
The MMS Server Panel Menu

The most essential MMS Server panel menu items are described in Table 7. Table 7. MMS Server panel.
View > Remote Systems To show a list of all Control Network remote systems where the PC is connected.

88

3BSE 028 807 R201 Rev B

Section 5 Downloading and Testing the Application

Establishing Communication

Table 7. MMS Server panel.


View > PPP Status Setup > PPP Setup To show both the status of the configured PPP links and to their IP addresses. To configure a PPP link on the PC running the Control Builder M.

Establishing Communication
1. From the Windows Start menu select Start > Settings > Network and Dial-up Connections > PPP and the PPP connection name (PPP or the new name created in step 9). If you get an OK message, then communication with the controller has been established and the PC will be assigned an IP address by the controller Go to the bottom right-hand corner of the Windows desktop toolbar. Rightclick the PPP icon (a symbol with two PCs) for information on connection status. 2. 3. Start the Control Builder. The MMS Server should automatically start. Select Setup > PPP Setup from the MMS Control Panel. A dialog box will appear (see Figure 63).

Figure 63. The PPP Configuration dialog box. 4. Click Add in the dialog box to open another dialog box (see Figure 64).

3BSE 028 807 R201 Rev B

89

Establishing Communication

Section 5 Downloading and Testing the Application

Figure 64. The dialog box for adding a PPP connnection. 5. Select the newly created PPP connection and click OK. The previous dialog box (Figure 63) will appear with information on the selected PPP connection (see Figure 65).

Figure 65. Settings for the selected PPP connection. 6. Click OK and Close. For information on the PPP connection, select View > PPP Status from the MMS Server Control Panel menu. Thus far, the PPP connection has been created and the connection to the controller has been established, and the MMS Server knows about this connection. The next step is to establish communication with the Control Builder. 7. From the Control Builder open the project (to be downloaded), mark your controller and right-click and select System Identity. The dialog box below will appear. Enter the IP address 192.168.255.254.

90

3BSE 028 807 R201 Rev B

Section 5 Downloading and Testing the Application

Testing the Program Online

Figure 66. Setting the system identity. 8. Save and download the project (see steps 8 and 9 on page 78).

Testing the Program Online


This section describes testing of the example ShopDoors using the AC 800M controller; however, the principles can be applied to any application.

Online Editor
In Online mode, a number of editor settings can be changed from the Tools > Setup dialog box.
General

The presentation format of variables, type date and time, can be changed. If you prefer a less accurate date, the presentation format can be changed from YYYYMM-DD-HH-MI-SS.TTT (Year, Month, Day, Hours, Minutes, Seconds) to YYYYMM-DD (Year, Month and Day). You can also change the order of the presentation format to, for example, DD-MM-YYYY (Day, Month, Year). The delimiters are optional, though hyphens, colons or slashes are recommended. The accuracy of the presentation format for time variables can be changed to display, for example, hours, minutes, and seconds (HMS) only. The length of string variables in code blocks can have a maximum value between 5 and 80.
Variable Declaration

Checking a checkbox activates a visible grid in the variables declaration pane.

3BSE 028 807 R201 Rev B

91

Testing

Section 5 Downloading and Testing the Application

Structured Text

You can select whether the ST code presentation format, by default, is to be Text, Function Diagram or Ladder (Function Diagram) when you open the editor in Online mode.
IL

This checkbox activates/deactivates the grid display in the code pane if Instruction List is used as programming language.

Testing
The forcing function will be used to activate/deactivate an I/O. Note that the forcing function is disabled in simulation mode. 1. Open the online editor for program Normal and module DI810. Check the box in the Forced column. Change the variable Photo_Cell value to 1, return quickly to 0 and inspect the motors values (values will change to 1 for five seconds and then return to 0). Previously we changed the variable Photo_Cell values in the online editor for program Normal to start and stop the motors. Now, we are using the I/Os to control the motors (See Figure 67).

92

3BSE 028 807 R201 Rev B

Section 5 Downloading and Testing the Application

Testing

Figure 67. The status of the photocell and the motors can be forced in the I/O editor. 2. Close all editors.

3BSE 028 807 R201 Rev B

93

Testing

Section 5 Downloading and Testing the Application

94

3BSE 028 807 R201 Rev B

Appendix A Licenses
License Concept
The license concept for AC 800M/C controllers is as follows. A license is required for the Control Builder M engineering and programming tool. There are three types of Control Builder, each with its own license (Basic, Standard, and Professional) A runtime license is required for each controller, for running and executing applications. This is called a Control Software license, and is based on two independent factors: the libraries used the number of I/O points used (see definition below)

A license is required for integration between Control Software and other IndustrialIT products, either through OPC Server for AC 800M/C (in which case integration can include third party products) or through AC 800M/C Connect. If OPC Server for AC 800M/C is used without AC 800M/C Connect, then a specific OPC Server for AC 800M/C license is required. If AC 800M/C Connect is installed, the license cost is based on the tag count, see AC 800M/C Connect Tags on page 99. The OPC Server for AC 800M/C license is then included in the AC 800M/C Connect license.

3BSE 028 807 R201 Rev B

95

Control Builder M Licenses

Appendix A Licenses

Control Builder M Licenses


A license is required for each type of Control Builder M: Control Builder M Basic Control Builder M Standard Control Builder M Professional

Control Builder M Professional is required when using AC 800M/C Connect.

Expansion Licenses
Special licenses are required when changing from one Control Builder M type to another: Control Builder M Basic to Control Builder M Standard Control Builder M Basic to Control Builder M Professional Control Builder M Standard to Control Builder M Professional

Control Software Licenses


Control Software licenses consist of a Base License (see below), with support for a number of I/O points.
In controller Large numbers of I/O points

A few libraries

Several and more advanced libraries

Small numbers of I/O points

Figure 68. Control Software licenses are based on the libraries used in applications and on the I/O point count To find out which Control Software license to use, look up the relevant Base license (see Base Licenses on page 97) count the I/O points (see I/O Points on page 98), and find the right combination in the price list.

96

3BSE 028 807 R201 Rev B

Appendix A Licenses

Base Licenses

Base Licenses
There are three Control Software Base licenses. Binary Control Basic Control Advanced Process Control

The following table shows the libraries included in each Base license. Libraries containing supporting functions only (such as ControlSupportLib and IconLib) are not included. The fuzzy control library can be ordered as an option. Table 8. Libraries included in different Base licenses and option.
Base Licenses Binary Control Basic Control
includes Binary Control and the following libraries:

Libraries
SystemLib CommunicationLib(1) MB300CommLib SerialLib ControlBasicLib AlarmEventLib(1) ControlStandardLib(1) ControlExtendedLib(1) ControlAdvancedLib(1) ControlSimpleLib BatchLib(1) ProcessObjBasicLib

Advanced Process Control


includes Basic Control and the following libraries:

SerialLib SignalLib INSUMCommLib ProcessObjExtLib(1)

Option License FuzzyLib


ControlFuzzyLib(1)

(1) This library contains control modules, which require Control Builder M Professional.

Expansion Licenses

Base licenses can be expanded through the following three expansion licenses: Binary Control to Basic Control Basic Control to Advanced Process Control Binary Control to Advanced Process Control

3BSE 028 807 R201 Rev B

97

I/O Points

Appendix A Licenses

I/O Points
The I/O point count is based on all variables connected to local and remote I/O channels. Variables are connected via the I/O buses, such as ModuleBus, FOUNDATION Fieldbus (FF) and Profibus-DP. Each variable of Boolean data type counts as one I/O point Each variable of non-Boolean data type counts as two I/O points

Counting I/O Points

To calculate the total number of I/O points: Identify all objects to be controlled by each controller Count all Boolean connected variables Count all non-Boolean connected variables For each Boolean variable, add one (1) I/O point to the I/O count For each non-Boolean variable, add two I/O points to the I/O count Add 20% to the I/O point count, to create a margin for growth

I/O Point Expansion Licenses

If the I/O point count exceeds the supported level, an expansion license can be used to move to a higher I/O point level. If the I/O point count increases substantially, several expansion licenses may be required. See ControlIT for AC 800M/C price lists.

Examples of Control Software Licenses


Examples of combinations of Base licenses and I/O point support: Binary Control license, with support for up to 64 I/O points Basic Control license, with support for up 1,200 I/O points Advanced Process Control, with support for more than 1,600 I/O points

98

3BSE 028 807 R201 Rev B

Appendix A Licenses

OPC Server for AC 800M/C Licenses

OPC Server for AC 800M/C Licenses


The OPC Server for AC 800M/C license includes support for OPC Data Access 2.05, as well as OPC Alarms and Events 1.02. This license is not required if an AC 800M/C Connect license has been purchased, since an OPC server license is included in the Connect license.

AC 800M/C Connect Licenses


AC 800M/C Connect License Concept
An AC 800M/C Connect license consists of a Base license, with support for a number of tags (see below). The Base license for the first AC 800M/C Connect workplace should support the number of tags used in the integrated configuration. Tag support can be selected in stages up to a maximum number. The OPC Server for AC 800M/C license is included free of charge. Additional Connect licenses must be purchased for each additional workplace. These licenses, with reference to the Base license, are also based on the number of tags used in that particular workplace. Expansion licenses can be used to expand the number of tags supported by an AC 800M/C Connect license.

The number of tags is calculated in the integrated system, and is a measure of the size and complexity of the system. For a description of how to calculate tags, see AC 800M/C Connect Tags on page 99.

AC 800M/C Connect Tags


An AC 800M/C Connect tag is equivalent to an instance of a function block or control module type that is set to be an aspect object. Only instances of types set to be aspect objects are mirrored to or from Process Portal A. All such mirrored instances are counted, the result being the number of tags for the AC 800M/C Connect license.

3BSE 028 807 R201 Rev B

99

Tag Counting Example

Appendix A Licenses

All instances of aspect objects are treated equally, regardless of whether their types reside in a standard library or in a custom-made library or application. Programs are always mirrored, but are not counted as tags. However, any instance of an aspect object within them is counted as a tag. Hardware instances are always mirrored, but are not counted as tags.

Using deep structures in an application may produce more tags than the use of flat structures. However, deep structures are normally the result of objectoriented programming, which typically requires fewer engineering and testing hours than traditional programming methods. Do not jeopardize the benefits of object-oriented programming just to lower the number of tags.

Tag Counting Example


In the example, all instances of the ConveyorProcessLib:Conveyor control module type (Figure 69) are set to be aspect objects. One conveyor will then be equivalent to eight tags, and all eight conveyors will then generate 64 tags.

Eight tags

Figure 69. Eight conveyors, with eight tags each, generate 64 tags.

100

3BSE 028 807 R201 Rev B

Appendix A Licenses

Example of Simple AC 800M/C System Configuration

Example of Simple AC 800M/C System Configuration


The following licenses are required to build, download and run applications for a simple AC 800M/C controller system configuration (Figure 70). 1. 2. 3. A Control Builder M license A Control Software license based on the I/O point count An OPC Server for AC 800M/C license for connection to third party OPC clients
Third party OPC clients

OPC Server for AC 800M/C (3)

Control Builder M (1)

Controller

Control Software license (2)

Fieldbuses Remote I/O points

Local I/O points

Figure 70. Simple AC 800M/C system configuration

3BSE 028 807 R201 Rev B

101

Example of Integrated AC 800M/C System Configuration

Appendix A Licenses

Example of Integrated AC 800M/C System Configuration


This example configuration shows AC 800M/C Connect being used to integrate Control Builder M with the Process Portal A environment via the Aspect Integration Platform, AIP (Figure 71). The following licenses are required for the example configuration. 1. 2. 3. 4. 5. Two Control Builder M Professional licenses (1) in Figure 71. Three Control Software licenses, one for each controller A, B, and C, based on libraries used and the I/O point count of each controller (2) in Figure 71. An AC 800M/C Connect license (this license includes an OPC Server for AC 800M/C) for the Process Portal A server (3) in Figure 71. Two AC 800M/C Connect licenses, one for each additional Process Portal A client that is part of the integrated AC 800M/C configuration (4) in Figure 71. Process Portal A licenses (5) in Figure 71 are also required. These are described in the Process Portal A product guide.
* Control Builder M Professional is required when mirroring to a Process Portal A client. Process Portal A (5) Client 2 AC 800M/C Connect (4)

Process Portal A (5) Server AC 800M/C Connect (3) OPC Server for AC 800M/C included Control Builder M Professional (1) Process Portal A (5) Client 1 AC 800M/C Connect (4) Control Builder M Professional* (1)

Controller A Fieldbuses Remote I/O points

Controller B Local I/O points

Controller C

Control Software licenses (2)

Local I/O points

Third party system

Local I/O points

Figure 71. Example of an integrated AC 800M/C system configuration

102

3BSE 028 807 R201 Rev B

Appendix B Control Builder M Settings


In setting up the system the Setup Wizard is used to achieve peak performance and to suit your requirements regarding language etc. When logged on with local Administrator authority, the Setup Wizard is started from the Windows Start menu (Start > ABB Industrial IT > Engineer IT > Control Builder Basic > Setup Wizard). Some tabs have an Apply button. Specified settings will not be implemented until this button is clicked (see Figure 72). All Setup Wizard dialog boxes contain a Display Settings button. Click this button to print a log file on screen containing all available Wizard settings. This also prints a list of system environment variables.

System Settings
These settings are identical for Control Builder M, SoftController and the OPC Server for AC 800M/C. Any change will affect all three installed products.

Auto-Logon to Windows
With this function enabled, the Windows operating system will automatically logon a selected user when the PC is started. The function should only be used when automatic start-up of the Control Builder is desired. Enter the user name, password (twice) and the computer name (domain), to which the user belongs (see Figure 72). If an unknown user name is entered, the Autologon function will fail.

3BSE 028 807 R201 Rev B

103

Redundant Network Routing Protocol (RNRP)

Appendix B Control Builder M Settings

Figure 72. General system settings for Auto-logon. If, with the Enable Auto-Logon function enabled, you remove the Control Builder program, the Auto-Logon function will remain enabled.

Redundant Network Routing Protocol (RNRP)


This setting is not normally used if communication with the controller(s) is established via one network. For further information concerning RNRP, refer to the AC 800M/C Communication, Protocols and Design manual.

104

3BSE 028 807 R201 Rev B

Appendix B Control Builder M Settings

Product Settings

Product Settings
Auto-Startup of Control Builder
With this function enabled under the Auto-Startup tab, the Control Builder will automatically start up as the user logs on to the system. Users can also log on automatically (see Auto-Logon to Windows on page 103). Control Builder will start without any application being opened. The path to Control Builder should be entered in the dialog box (see Figure 73).

Figure 73. General product settings for Auto-Startup.

Memory Reservation
The total memory reserved for an application is based on a calculation involving the size of the physical RAM memory and the hard disk paging file. The following are shown under the Memory tab (see Figure 74). Physical RAM memory Total paging file (this file can be changed in the Windows control panel) Maximum recommended heap Actual heap (should normally be increased)

3BSE 028 807 R201 Rev B

105

Language

Appendix B Control Builder M Settings

The heap should be set to the size of the application, but not exceed the Maximum recommended heap size. Start by using the default value and then increase the value according to application demands. The amount of free memory can be checked by opening the About... dialog box in the Control Builder Help menu. Heap size should be increased when less than 30% remains.

Figure 74. General product settings for the memory. Do not forget to click Apply to activate the changes.

A heap size must not be larger than the paging file. When the heap size is saved, the system checks this. If the heap size is larger than the maximum recommended (half the total paging file), a warning message will advise you to change the size. If the heap size is larger than the Total paging file, an error message will tell you to reduce the size.

Language
The language to be used for the programming tool, the libraries, and the Online Help files is selected under the Language tab (see Figure 75). The installation

106

3BSE 028 807 R201 Rev B

Appendix B Control Builder M Settings

Language

program will, by default, select the language set in Windows 2000. If the product does not support the language, English will be used as the default language. The Control IT for AC 800M/C CD-ROM must be available when the Help files language is to be changed.

Figure 75. General product settings for language. Click on Change... to select the language. A dialog box, in which selection of the required language file path is made, will open. The default language selection is not fool-proof. Check if the appropriate language has been set and, if necessary, change it in the dialog box above.

3BSE 028 807 R201 Rev B

107

File Locations

Appendix B Control Builder M Settings

File Locations
Control Builder has a number of changeable, specific file locations. Each user may have a personal file location profile. The working folder is currently managed by the Setup Wizard (see Figure 76).

Figure 76. General product settings for file locations. Clicking Use Default Settings, will reset your personal settings to the general settings determined by the network administrator. Click Modify... to change the file location path. A browser will open to assist you in locating the appropriate path (see Figure 77). If the setting is to be personal, click Change Personal Setting; if it is to be the default for any user, click Change Product Setting. The latter is dimmed if you do not have Administrator privileges. Changes made to product settings will only affect users without a personal setting.

108

3BSE 028 807 R201 Rev B

Appendix B Control Builder M Settings

File Locations

Figure 77. The browser for locating the file path.

3BSE 028 807 R201 Rev B

109

File Locations

Appendix B Control Builder M Settings

110

3BSE 028 807 R201 Rev B

Appendix C OPC Server for AC 800M/C


Introduction
The OPC Server for the AC 800M/C is available on the ControlIT for AC 800M/C CD-ROM (license required). It provides access to controller run-time data, such as variables and I/O signals to an OPC client, as well as alarms and events (see Figure 78). After installation, the OPC Server program starts automatically when the PC is started.
OPC Client

OPC Server for AC 800M/C

Control Builder

MMS server Ethernet

Controller

Controller

Controller

Figure 78. Control Builder and OPC Server on the same PC. Additional information about the OPC Server, see the Communcation manual.

3BSE 028 807 R201 Rev B

111

Requirements

Appendix C OPC Server for AC 800M/C

Requirements
Table 9. OPC Server for AC 800M/C requirements.
Hardware Computer Operating system Internal memory Hard disk Drive Communication Screen Keyboard Requirements Pentium 166 MHz or faster Windows 2000 Professional 64 Mbyte RAM Min. 25 Mbyte disk available CD-ROM, local or via network Ethernet for controller communication Color or monochrome Standard PC keyboard

Installation
Installation procedure is similar for all products on the ControlIT for AC 800M/C CD-ROM (see Section 2, Installing Control Builder M).

112

3BSE 028 807 R201 Rev B

Appendix C OPC Server for AC 800M/C

OPC Server Start-up

OPC Server Start-up


After installation, by default the OPC Server automatically starts when the PC is rebooted. However, this can be changed via Windows Start > Settings > Control Panel > Administrative Tools > Services. Locate OPC Server for AC 800M/C and right-click. Select Properties. Under the Startup type rolldown window you are given three options: Automatic, Manual, and Disabled.

OPC Server Configuration Panel


The OPC Server configuration panel is used to specify the controller(s) to be connected to the OPC Server. When connected, the OPC Server has access to all relevant data in the controller(s). The panel has two controller specification tabs, one for data access and one for alarms and events. To open the OPC Server Configuration panel, right-click the OPC icon in the Windows desktop taskbar and select Open OPC Server Configuration.To stop the OPC Server, select Stop OPC Server.

Figure 79. The OPC Server configuration panel. Configuration panel management is described in detail in the Online Help function for the configuration panel.

3BSE 028 807 R201 Rev B

113

OPC Server Configuration Panel

Appendix C OPC Server for AC 800M/C

In order to connect to a specific controller, the OPC Server requires access to files descibing the content of the controller (so-called domain files). These files are created by the Control Builder and automatically accessed from the project folder, when required. In order to fetch these files, the OPC Server must communicate with the Control Builder that made the last download to the controller. The OPC Server needs to be updated when a new version of the application program has been downloaded to the controller. This update is automatic and may take several minutes for large applications. The update will take only a few seconds if an FTP Server for Windows 2000 Professional is used. See how to use FTP Server with OPC Server below. During an update the OPC clients will not be updated with new information regarding the changed application. If the domain files are lost (for example due to a hard disk crash), the Control Builder will recreate them when "Online" or "Online with download" is selected, even though no change has been made in the application program. Note that if the Control Builder is not running and the FTP Server is not used, then the files must be manually collected from the Control Builder system. The files are stored in the project directory of the current project. The files must then be placed in a directory named Files in the OPC Server working directory. A browse dialog is displayed in the OPC panel to help you locate the missing files and the copying of files to the correct location. If you are not using FTP, it is recommended, when starting the OPC Server, to run the Control Builder that downloaded the project.
Using FTP Server with OPC Server

When connecting the OPC Server to a controller, the OPC Server needs certain files generated by the Control Builder that downloaded the application to the controller. The OPC Server will at first try to connect to an FTP Server for Windows 2000 Professional on the computer where the Control Builder is (or was) running in order to obtain the files. (The Control Builder does not have to be running.) If an FTP Server is running, the files are obtained via FTP. If no FTP

114

3BSE 028 807 R201 Rev B

Appendix C OPC Server for AC 800M/C

OPC Server Configuration Panel

Server is running, the OPC Server will try to use MMS instead. It is necessary that the Control Builder is running in order for MMS to work. If FTP is not installed you install it as a Windows component from the Windows 2000 Professional CD. To make FTP work, you must set up an FTP Server on the computer where the Control Builder that made the download to the controllers is (was) running. The FTP Server must be set up to allow anonymous login and the home folder must be setup to be the working folder of the Control Builder. Proceed as follows to set up FTP. 1. Select Start>Settings>Control Panel>Administrative tools>Internet Service Manager. If you do not have the Internet Service Manager you need to install it from the Windows 2000 Professional CD. In the Internet Information Services dialog box select your computer name. Double-click it and also Default FTP Site. Check that the Default FTP Site has the start status in the dimmed small push button at the top of the panel in the menu bar. (The stop and pause item buttons are then active.) If not, select Default FTP Site, right-click and choose Start. Select the Default FTP Site, right-click and choose Properties. In the Default FTP Site Properties dialog box select the Security Accounts tab. Select Allow Anonymous Connections. Select the Home Directory tab and select a directory located on this computer and browse for the working folder of the Control Builder in Local Path. Select the Read and Log visits check boxes. Example of a local path is C:\ABB Industrial IT Data\Engineer IT Data\Control Builder M Professional x.y where the project reside in C:\ABB Industrial IT Data\Engineer IT Data\Control Builder M Professional x.y\projects\ptt_cb_ppa\ To be able to save coldretain values you also have to also check the Write check box. However this also means that it opens up for all FTP clients to write in your working folder! Please consider such a situation. 6. Click the OK button in the Default FTP Site Properties dialog box and close the Internet Information Services dialog box.

2.

3. 4. 5.

3BSE 028 807 R201 Rev B

115

Settings

Appendix C OPC Server for AC 800M/C

Settings
In setting up the system, the Setup Wizard (see Figure 80) is used to achieve peak performance and to suit your requirements regarding display etc. When logged on with local Administrator authority, the Setup Wizard is started from the Windows Start menu. Note that the OPC Server configuration panel has additional settings, such as system variables and auto-load configuration. Some tabs have an Apply button. Specified settings will not be implemented until this button is clicked. All Setup Wizard dialog boxes contain a Display Settings button. Click this button to print a log file on screen containing all available Wizard settings. This also prints a list of system environment variables.

Figure 80. Setup Wizard for the OPC Server.

116

3BSE 028 807 R201 Rev B

Appendix C OPC Server for AC 800M/C

System Settings

System Settings
These settings are identical for Control Builder M, SoftController and the OPC Server for AC 800M/C. Any change will affect all three installed products.
Auto-Logon to Windows

This setup is similar to that for the Control Builder (see Auto-Logon to Windows on page 103).
Redundant Network Routing Protocol (RNRP)

This setting is not normally used if communication with the controller(s) is established via one network. For further information concerning RNRP, refer to the AC 800M/C Communication, Protocols and Design manual.

Product Settings
Memory Reservation

This setup is similar to that for the Control Builder (see the section Memory Reservation on page 105).
File Locations

This setup is similar to that for the Control Builder (see the section File Locations on page 108).

3BSE 028 807 R201 Rev B

117

Running the OPC Server and OPC Client on Different Computers Appendix C OPC Server for AC

Running the OPC Server and OPC Client on Different Computers


If you are going to run the OPC Server on one PC and the OPC client on another PC, the following DCOM settings must first be performed. Use the Windows 2000 Professional DCOMCnfg tool on each of the PC:s. DCOM should however only be used if absolutely needed, due to the risk for lost connection as described in a section below.

DCOM settings on the OPC Server PC


1. Run dcomcnfg.exe (enter dcomcnfg in the Run dialog accessed under the Start button). The Distributed COM Configuration Properties dialog box is opened. 2. 3. 4. 5. 6. 7. In the Default Properties tab, be sure Enable Distributed COM on this computer is checked. Also, under the Default Properties tab, set Default Authentication Level to (None). In the Applications tab, locate the OPC Server for AC 800M/C and click the
Proberties ... button.

In the OPC Server for AC 800M/C Properties dialog box and in the General tab, set Authentication Level to (None). In the Security tab, select Use custom access permissions and click Edit ... button to register access permissions. In the Registry Value Permissions dialog box, click the Add... button. In the Add Users and Groups dialog box, select the user group(s) or the user account(s) the OPC client is running under. The account must be known on the domain by both PCs. In the Add Users and Groups dialog box, click the Add button for your selected user group(s) or user(s). They are listed in the Add Names: box. The type of access should be Allow Access. Click the OK button. Click the OK button in the Registry Value Permissions dialog box.

8.

9.

118

3BSE 028 807 R201 Rev B

Appendix C OPC Server for AC 800M/C

DCOM settings on the OPC Client PC

10. In the OPC Server for AC 800M/C Properties dialog box, select Use custom launch permissions and click the Edit button. 11. In the Registry Value Permissions dialog box, add the same user group(s) or user account(s) as above. 12. In the OPC Server for AC 800M/C Properties dialog box, click the OK button. If a parameter is incorrect, a DCOM Configuration message is displayed. 13. Finally, in the Distributed COM Configuration Properties dialog box, click the OK button. 14. If for some reason you do not want the OPC Server to run under the Local System account, you can change this in Control Panel > Administrative Tools > Services > OPC Server for AC 800M/C > Properties > Log On. There you select This account and enter the new user by browsing for it and enter its password. 15. Reboot the PC.

DCOM settings on the OPC Client PC


1. 2. 3. 4. Run dcomcnfg.exe (enter dcomcnfg in the Run dialog accessed under the Start button). In the Default Properties tab, make sure Enable Distributed COM on this computer is checked. Also, in the Default Properties tab, set Default Authentication Level to
(None)

Reboot the PC.

If your OPC client requires the OPC Server to be registered on the OPC client PC, the ControlIT for AC 800M/C CD-ROM contains a registry file to make it easy to register the OPC Server on the OPC client PC. Insert the ControlIT for AC 800M/C CD-ROM in to the OPC client PC, right-click the file \Products\OPCServer\OPCServerRegEntriesForClientMachine.reg and select Merge.

3BSE 028 807 R201 Rev B

119

Network Considerations

Appendix C OPC Server for AC 800M/C

Lost Connection Between OPC Client and OPC Server

Various problems may occur if an OPC Client, running on another PC than the OPC Server, is stopped abruptly (if, for example, the network between the OPC Client and Server is disconnected). This warning does not apply for Process Portal workplaces connected to Process Portal Connectivity Servers, where DCOM is not used. If OPC 1.0 standard is used, the server's virtual memory grows and the additional memory may not be released until the server is restarted. Workaround: Use of the OPC 2.0 standard is recommended. It may be impossible in some cases to reconnect an OPC Client to an OPC Server or to start a data subscription.

Workaround: Reboot both the PC running the OPC Server and the PC running the OPC Client. First restart the OPC Server, wait for some time and then the OPC Client. The waiting time may vary dependent on the OPC Client. Recommended waiting time is 15 minutes. To ensure safe operation, display elements that are built in the HSI must make use of the quality bad flag on the OPC attribute in order to alert the operator that the communication is lost.

Network Considerations
In some installations the control builder might be connected to more than one network. In such installations, and if more than one Control Builder or an OPC server is used, all PCs must have the same primary network and the OPC server must be able to communicate with this network. Example If Control Builder A has network addresses 172.16.67.41 and 10.46.41.242 and Control Builder B has addresses 172.16.67.42 and 10.46.41.241, then the primary network for both computers must be 172.16. The OPC server must be able to communicate with the computers on the 172.16 network. The primary network is the network defined as the first network in the network setup.

120

3BSE 028 807 R201 Rev B

Appendix D Communication Cable Configuration


Connecting AC 800M or AC 800C to a PC
RTS 1 DTR 2 AC 800M or AC 800C TD 3 0V 4 8 CTS 6 DSR 2 RD 1 DCD 50V 3 TD 4 DTR 7 RTS Shield PC Female 9-pin, D-type connector

0V 5 RJ-45 plug RD 6 DCD 7 CTS 8 Shield

Figure 81. Cable TK212 configuration.

3BSE 028 807 R201 Rev B

121

Connecting 200-CPU on Advant Controller 250 to a PC

Appendix D Communication Cable

Connecting 200-CPU on Advant Controller 250 to a PC


RD 2 AC 250 Male 9-pin, D-type connector TD 3 DTR 4 0V 5 Shield 3 TD 2 RD 8 CTS 50V 1 DCD 4 DTR 6 DSR Shield PC Female 9-pin, D-type connector

Figure 82. Cable 200-CPC configuration.

Connecting 200-CI232 on Advant Controller 250 to a PC


DCD 1 RD 2 200-CI232 Male 9-pin, D-type connector TD 3 DTR 4 0V 5 DSR 6 RTS 7 CTS 8 Shield 1 DCD 3 TD 2 RD 6 DSR 50V 4 DTR 8 CTS 7 RTS Shield PC Female 9-pin, D-type connector

Figure 83. Cable configuration.

122

3BSE 028 807 R201 Rev B

Appendix E Project in FBD


In this appendix, we will construct the same project as in Section 4, Creating a Project Shop Doors. However, this time we will use the FBD Editor. Please refer to that section for information on selecting the template, variable and data type preparation, and declaring variables.

Changing the Programming Language


To change the appropriate editor (FBD) for the current code block (local selection), right-click the Code tab and select Change Language. The Change Language dialog box will appear. Check the appropriate editor radio button. To select the appropriate editor for all (not already used) code blocks in the application (global selection), select the menu Tools > Setup followed by the General tab. Check the appropriate editor radio button.

3BSE 028 807 R201 Rev B

123

Dividing the Code into Blocks

Appendix E Project in FBD

Dividing the Code into Blocks


The code pane contains the actual code, which can be divided into blocks in order to create a better structure.

Figure 84. The program editor with empty code pane. The different blocks, represented by tabs (Figure 84 shows three tabs: Motors_Doors, Number_Of_Customers and Service_On_Doors), can be written in any of the available programming languages. The Function Block Diagram (FBD) editor will be used in this section to program the project. 1. Change the name of the code block to Motors_Doors by right-clicking the
Code tab and selecting Rename. Enter the new name Motors_Doors in

the dialog box. This code block describes the door motors.

124

3BSE 028 807 R201 Rev B

Appendix E Project in FBD

Code Input

2.

Add another code block for the number of customers by right-clicking the Motors_Doors tab and selecting Insert. Specify the name Number_Of_Customers in the dialog box and ensure that FBD is selected as the programming language. This code block effectuates the counting of the number of customers. Add a third code block named Service_On_Doors. The declaration pane does not change and is common to all code blocks.

3.

Code Input
1. 2. Activate the Motors_Doors code block. Select Insert > Insert Function/Function Block (or press Ctrl+K). Expand SystemLib and search the function block TOf by scrolling down or typing TOf. Change the instance name to OpenDoors and click OK. This will automatically declare the function block in the declaration pane and generate the function block OpenDoors in the editor (see Figure 85 and Figure 86).

3.

Figure 85. The function block of type TOf 4. Select the first input parameter (click the TOf input line) and right-click. Select Connect... and type Photo_Cell in the dialog box. Accept the selection by clicking Apply/Next or OK. Connect all parameters according to Figure 86.

5.

3BSE 028 807 R201 Rev B

125

Code Input

Appendix E Project in FBD

Figure 86. The code block under the Motors_Doors tab. The function block is automatically declared in the variables pane. To connect two variables to an output parameter, use a comma , in the dialog box, for example, Motor_1, Motor_2. 6. 7. Select Editor > Apply (or press Ctrl+W) to check and save the code. Change the tab to Number_Of_Customers and add the code (see Figure 87).

Figure 87. The code block in the Number_Of_Customers tab. 8. Change the tab to Service_On_Doors and add the code (see Figure 88).

Figure 88. The code block in the Service_On_Doors tab. 9. Select Editor > Apply (or press Ctrl+W) to check and save the code.

10. Close the editor.

126

3BSE 028 807 R201 Rev B

Appendix E Project in FBD

About FBD Editor Tools

If error messages are displayed in the message pane, you can quickly go to where the error occurred by double-clicking the error line. You will also find help in the message pane concerning the type of error.

About FBD Editor Tools


Structure View
The Structure view is part of the FBD editor (as well as the LD editor) and a tool for examining the FBD code. It gives the order of execution of the function blocks (see Figure 89 below, and Figure 18 in the subsection Application on page 40). 1. Place the cursor on the left-hand vertical border of the FBD code pane, press and hold the mouse button and drag to the right. The Structure view will now be visible. Click a line in the Structure view to highlight the corresponding function block in the FBD editor.

2.

Figure 89. The Structure view to the left of the FBD editor facilitates project work.

3BSE 028 807 R201 Rev B

127

Dividing the FBD Editor Window

Appendix E Project in FBD

Dividing the FBD Editor Window


The code pane of the FBD editor can be split in two so that one page of the FBD code can be displayed in one section and another page in the other. 1. Place the cursor on the upper horizontal border of the FBD code pane, press and hold the mouse button and drag downwards. The code pane will split into two sections.

Figure 90. The FBD editor can be split into two sections. The FBD editor has a 'tool tip' indication, which appears when the cursor is moved close to a connection in the editor (see Figure 91).

128

3BSE 028 807 R201 Rev B

Appendix E Project in FBD

Simulation

Figure 91. Tool tip indication.

Simulation
In Simulation mode you can simulate your project without a controller being connected. The values of variables can be changed for an immediate program response. For a step-by-step guide through the simulation procedure, see Section 4, Creating a Project Shop Doors, Simulation on page 62.

3BSE 028 807 R201 Rev B

129

Simulation

Appendix E Project in FBD

130

3BSE 028 807 R201 Rev B

Appendix F Glossary
Terms and Descriptions
The following is a list of terms associated with the products described in this Guide.
Term Application Description A collection of POUs (Programs, Function Blocks and Control Modules) and their interconnections. Different parts of the Application are executed under the control of Tasks. Variables in the Applications can be connected to I/Os and be accessible as communication server points through the use of Access Variable names. The application is the top hierarchical level and contains data types, Control Modules, Function Blocks, etc. Application Communication server Code block Part of the controller firmware that from a protocol serves clients with application data read and write operations. Used to divide the code into parts (pages) that are easier to handle. A code block consists of code that can be written in one of the following programming languages: IL, ST, FBD, SFC or LD. Component Object Model, which is the Microsoft binary standard, defines how objects can interact. An object can, for example, be a data structure, a control module or a program. Term describing all Applications and the Controller Configuration present in a controller. All normal user loadable entities in a controller (except the firmware). To construct your Control Software application you need the engineering tool named Control Builder M.

COM

Configuration

Control Builder M

3BSE 028 807 R201 Rev B

131

Terms and Descriptions

Appendix F Glossary

Control Module Control Network

The Control Module is the main structuring element in a controller application and contains both application program code and graphical features. Network connecting several controllers and PCs with Configuration Tools. Note that a Control Network encompasses both Ethernet and serial links. The Tool port on controllers is part of the Control Network. The software you run in the controller is named Control Software. It does not denote a specific software package, but is merely a collective name for the scope of functions you can use in a controller. These functions are derived from: The hardware (supervision, communication buses, I/O buses, etc.) The firmware loaded into the controller (real-time executive system, real time clock, redundant communication, etc.) The application program loaded into the controller (library functions, communication protocols, etc.)

Control Software

Controller Cold Restart Controller Configuration

The controller performs a controller abrupt stop and hardware reset followed by an application cold restart of all applications. Hardware Description. The hardware units it contains and settings for these units. Connections between hardware and applications (e.g. I/O connections). Access names for communication (Access Variable) and their connection to Application variables. Task definitions.

Note: References applications but does not encapsulate them. Controller Firmware Controller Reset Controller Warm Restart The system software in the controller. A controller stop followed by a combination of memory reset and hardware reset The controller restarts and all applications are warm restarted. Only possible as a consequence of power up.

132

3BSE 028 807 R201 Rev B

Appendix F Glossary

Terms and Descriptions

Data type

A data type is a description of the structure of a variable or a parameter. Defines the characteristics of a variable, a set of values and a set of permitted operations. Data types may be simple or structured, either predefined or user defined. The supported basic data types are: bool (1 bit) Boolean word (16 bits) dword (32 bits) Double Word int (16 bits including the sign bit) Integer int (16 bit) Unsigned integer (without the sign bit) dint (32 bits including the sign bit). Double Integer real (32 bits) Floating point number

Note that all data types allocate 32 bits in memory. DCOM Distributed Component Object Model is an extension of COM. It defines how objects can interact over a network. COM and DCOM are available on most Windows platforms and on several Unix platforms. Network cabling system according to IEE 802.3 Function Block Diagram. Real-time executive system, real-time clock, redundant communication and so forth. A function returns a single value and communicates using input and output parameters, but it can also use and alter global variables that are not passed on as parameters. The function does not keep values from previous calls, unlike the function block. Functions can be used in a program, a function block or other functions. An example of a function is the mathematical function sin or the conversion function bool_to_string.

Ethernet FBD Firmware Function

3BSE 028 807 R201 Rev B

133

Terms and Descriptions

Appendix F Glossary

Function block

A function block returns one or more values of simple or structured data types. You can use function blocks in a program and in a function block. It can contain other function blocks and functions. A function block communicates using input and output parameters, but it can also use and alter global variables that are not passed on as parameters. A function block keeps all values of the variables since the last call, unlike the function.

IL

Instruction List. A low-level language in which the instructions are listed in a column - one instruction on each line. It has a structure similar to simple machine assembler code. An instance is an individual description of the type. Every instance has the characteristics defined by the type, but each instance has its own individual behavior according to those characteristics. Ladder Diagram. Manufacturing Message Specification, which specifies the messages used for industrial communication (manufacturing, process robotics, etc.). This is the application layer used within MAP (Manufacturing Automation Protocol), a specification for open communication based on the OSI model. A controller platform contains hardware modules for processing, communication, I/O, etc. A module is the same as a Unit. Note that there is a software term Control Module. Object Linking and Embedding. OLE for Processing Control. Programmable Logic Controller Program Organization Unit. The IEC 61131-3 standard describes programs, function blocks and functions as Program Organization Units, or POUs. These software elements have the important property that their behavior can be used repeatedly in different parts of an application. The behavior and structure of a POU, such as a function block, is defined by a type declaration. Copies of function blocks created from a particular type are referred to as function blocks. A Control Module definition has been added to this concept. PROcess FIeldBUS

Instance

LD MMS

Module

OLE OPC PLC POU

PROFIBUS

134

3BSE 028 807 R201 Rev B

Appendix F Glossary

Terms and Descriptions

PROFIBUS-DP Project Explorer Remote I/O RNRP SFC ST

Open, vendor-independent fieldbus for time-critical communication between controllers and distributed peripherals (remote I/O). The Project Explorer is a tool you can use to create, modify and navigate in a project. I/O accessible via a fieldbus Redundant Network Routing Protocol Sequential Function Chart. A graphical language based on GRAFCET. SFC is one of the programming languages in Control Builder. Structured Text. A high-level programming language. It is highly structured and has a comprehensive range of constructs for assignments, function/function block calls, expressions, conditional statements, iterations, etc. A task is a "working schedule" for the program. Each task is connected to the corresponding program by default. At run time, tasks are executed according to interval time, priority and offset. Transmission Control Protocol/ Internet Protocol A communication protocol is a set of rules and regulations through which systems networked together can communicate. TCP/IP is a very common protocol. TCP ensures communication data consistency and security and IP provides the routing mechanism. TCP/IP is a routable protocol, which means that all messages contain not only the destination address, but also the address of a destination network. This allows TCP/IP messages to be sent to multiple networks within an organization. Each client and server in a TCP/IP network requires an IP address, which is either permanently assigned or dynamically assigned at start-up.

Task

TCP/IP

Products used to configure and program controllers. The tools connect to Tool, controllers via the Control Network . Configuration Tool, Programming Tool Unit See Module.

3BSE 028 807 R201 Rev B

135

Terms and Descriptions

Appendix F Glossary

136

3BSE 028 807 R201 Rev B

Index
A
AC 800C 22 cable configuration 121 download procedures 71 AC 800M 21 cable configuration 121 download procedures 71 Access variables 38, 43 add program 31 Advant Controller 250 22 download procedures 71 Alarm and Event Library 19 AlarmEventLib 97 Application 40, 131 Application Communication server 131 Attributes 44 Auto-Startup of Control Builder 105 Coldretain 44 COM 131 Communication establish 89 Communication Library 19 CommunicationLib 97 Configuration 131 Connect I/O interfaces 65 Constant 44 Control Builder 131 auto-startup 105 install 28 Control Libraries 19 Control Module 132 Control Network 132 Control Software 132 licenses 96 ControlAdvancedLib 97 ControlBasicLib 97 ControlExtendedLib 97 ControlFuzzyLib 97 Controller 38 AC 800C 22 AC 800M 21 Advant Controller 250 22 cold restart 132 configuration 132 firmware 132 reset 132 warm restart 132 ControlSimpleLib 97 ControlStandardLib 97 Count

B
Base licenses 97 libraries 97 BatchLib 97

C
Cable Configuration AC 800C 121 AC 800M 121 Change personal settings 108 product settings 108 programming language 56, 123 Code block 131 Code input 59, 125

3BSE 028 807 R201 Rev B

137

Index

I/O points 98 Create PPP Connection 80

G
Global variables 43

D
Data type 133 DCOM 133 Declare function blocks 57 Declaring variables 43 to 44, 54 Defining variables 53 Download procedures AC 800C 71 AC 800M 71 Advant Controller 250 71 Downloading via Ethernet 77 via RS-232C 80

H
Hardware 38 Hardware Configuration Editor 39 Heap 105 Help 14, 28

I
I/O connect interfaces 65 IL 134 Install Software 27 Installation OPC Server 112 Installing Control Builder 28 MMS Server 27 Instance 134 Instruction List (IL) 17 INSUMCommLib 97 IP address 74 IPConfig 74

E
Establish communication 89 Ethernet 133 download via 77 Examples 12 Expansion licenses 96 to 97 External variables 43

L
Ladder Diagram (LD) 17 Language select 106 Last Minute Notes 28 LD 134 Libraries 37 AlarmEventLib 19, 97 BatchLib 97 CommunicationLib 19, 97 Control Libraries 19 ControlAdvancedLib 97 ControlBasicLib 97 ControlExtendedLib 97 ControlFuzzyLib 97

F
FBD 133 FBD Editor 127 to 128 File Location select 108 Firmware 133 upgrade via serial line 71 Function 133 Function Block Diagram (FBD) 17 Function Blocks 134 declaring 57

138

3BSE 028 807 R201 Rev B

Index

ControlSimpleLib 97 ControlStandardLib 97 INSUMCommLib 97 MB300CommLib 97 ProcessObjBasicLib 97 ProcessObjExtLib 97 SerialLib 97 SignalLib 97 SystemLib 19, 97 License concept 95 Licenses 95 Local variables 43

M
Manuals 14, 27 MB300CommLib 97 Memory 105 MMS 134 MMS on TCP/IP 29 MMS Server 30 install 27 MMS Server panel 88 Module 134

create 80 ProcessObjBasicLib 97 ProcessObjExtLib 97 Product Settings change 108 PROFIBUS 134 PROFIBUS-DP 135 program add 31 remove 31 uninstall 31 Programming Language change 56, 123 FBD 17 IL 17 LD 17 SFC 17 ST 17, 51 Project documentation 70 Project Explorer 35, 135 Project simulation 62

R
Release Notes 27 Remote I/O 135 remove program 31 Requirements OPC Server 112 Retain 44 RNRP 135 RS-232C download via 80 Runtime license 95

O
OLE 134 Online Help 14 Online Manuals 14, 27 OPC 134 OPC Server 120 configuration panel 113 install 112 requirements 112

P
Personal Settings change 108 PLC 134 POU 134 PPP Connection SattBus on TCP/IP 29 Selecting file location 108 language 106 template 52

3BSE 028 807 R201 Rev B

139

Index

Sequential Function Chart (SFC) 17 SerialLib 97 Setup Wizard 103, 108, 116 SFC 135 SignalLib 97 Simulation 47, 62, 129 ST 135 ST Editor 56 Structure view 127 Structured Text (ST) 17, 51 System Library 19 SystemLib 97

T
Tags 99 Task 135 Task Overview Editor 40 Tasks 40 TCP/IP 135 MMS on TCP/IP 29 SattBus on TCP/IP 29 Template select 52 Terminals Diagrams 27

U
uninstall program 31 Unit 135 Upgrade firmware via serial line 71

V
Variables access 38, 43 declare 43 to 44, 54 define 53 external 43 global 43 local 43

140

3BSE 028 807 R201 Rev B

3BSE 028 807 R201 Rev B. Printed in Sweden October 2002 Copyright 1999 by ABB. All Rights Reserved Registered Trademark of ABB. Trademark of ABB.

http://www.abb.com/control Automation Technology Products Vsters, Sweden www.abb.com/processautomation email: processautomation@se.abb.com Automation Technology Products Wickliffe, Ohio, USA www.abb.com/processautomation email: industrialitsolutions@us.abb.com Automation Technology Products Mannheim, Germany www.abb.de/processautomation email: marketing.control-products@de.abb.com