GetStart PDF
GetStart PDF
GetStart PDF
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
Table of Contents
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
Table of Contents
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
Table of Contents
Appendix F Glossary
Terms and Descriptions .................................................................................................... 131
Index
Table of Contents
10
11
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.
12
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.
13
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
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.
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.
15
Document Conventions
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
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.
17
Project Explorer
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
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.
19
Requirements
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
Licensing
Licensing
For more information about licensing, please refer to Appendix A, Licenses.
21
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.
22
Figure 7. The PC running the Control Builder communicates with an AC 800M controller (with S800 I/O).
23
Distributed Control
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
(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
25
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
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.
27
Step-by-Step Instructions
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
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.
29
For information concerning the MMS Server Panel menu, refer to The MMS Server Panel Menu on page 88.
30
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.
31
32
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).
33
Section 3 Tutorial
34
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
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).
35
Section 3 Tutorial
36
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
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).
38
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.
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
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.
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
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.
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.
43
Section 3 Tutorial
3. 4.
5.
6. 7.
44
Section 3 Tutorial
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.
45
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
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).
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).
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
Section 3 Tutorial
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.
49
Section 3 Tutorial
50
51
incremented. When the counter reaches a preset limit, a flag should indicate that service is required. Manual resetting of the flag should be possible.
Hardware is described later. At this time we will use Control Builder to simulate the code.
52
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.
53
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
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.
55
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.
56
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.
57
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
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.
59
Code Input
5.
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
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.
61
Simulation
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
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.
63
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.
64
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.
65
3.
Double-click Photo_Cell in the list to copy the full path. (see Figure 38).
PM860/TP830
DI810
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
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.
67
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
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.
69
Project Documentation
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
2.
71
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
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.
73
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.
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.
74
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).
75
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
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
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).
77
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
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.
79
2. 3. 4.
80
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.
81
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.
82
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.
83
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
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.
85
14. Click the Networking tab in the PPP-Default Properties dialog box (see Figure 58). The following dialog box will appear.
86
15. Mark Internet Protocol TCP/IP, and click Properties in the dialog box. The following dialog box will appear (see Figure 61).
87
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
Establishing Communication
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).
89
Establishing Communication
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
Figure 66. Setting the system identity. 8. Save and download the project (see steps 8 and 9 on page 78).
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
91
Testing
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
Testing
Figure 67. The status of the photocell and the motors can be forced in the I/O editor. 2. Close all editors.
93
Testing
94
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.
95
Appendix A Licenses
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
A few libraries
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
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
(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
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
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
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.
98
Appendix A Licenses
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.
99
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.
Eight tags
Figure 69. Eight conveyors, with eight tags each, generate 64 tags.
100
Appendix A Licenses
Controller
101
Appendix A Licenses
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 C
102
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.
103
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.
104
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).
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)
105
Language
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
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.
107
File Locations
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
File Locations
109
File Locations
110
Control Builder
Controller
Controller
Controller
Figure 78. Control Builder and OPC Server on the same PC. Additional information about the OPC Server, see the Communcation manual.
111
Requirements
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
Figure 79. The OPC Server configuration panel. Configuration panel management is described in detail in the Online Help function for the configuration panel.
113
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
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.
115
Settings
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.
116
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).
117
Running the OPC Server and OPC Client on Different Computers Appendix C OPC Server for AC
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
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.
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.
119
Network Considerations
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
121
122
123
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
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.
125
Code Input
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.
126
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.
2.
Figure 89. The Structure view to the left of the FBD editor facilitates project work.
127
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
Simulation
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.
129
Simulation
130
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
131
Appendix F Glossary
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
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
Appendix F Glossary
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.
133
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
PROFIBUS
134
Appendix F Glossary
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.
135
Appendix F Glossary
136
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
137
Index
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
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
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. 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: [email protected] Automation Technology Products Wickliffe, Ohio, USA www.abb.com/processautomation email: [email protected] Automation Technology Products Mannheim, Germany www.abb.de/processautomation email: [email protected]