• No results found

Chapter 3 Application Building

3.3 Structuring PC Programs

The ABB MasterPiece Language (AMPL) supports extensive structuring of application programs, making it is easy for you to structure PC programs that mirror the process to be controlled. It is advisable for you to make use of this feature when you are developing PC programs.

There are, however, certain internal system limitations in terms of the maximum size of the tables which store PC programs. For every PC program, there are five different internal tables. For four of them, 32 kilobytes is the maximum size. Furthermore, the User Disk Application Segments hold two other tables per PC program, the size of which is also 32 kilobytes.

Due to these limitations, it is important to divide up the entire control task in such a way that no single PC program becomes too large. In other words, it is better to use several small PC programs than one large PC program. The commands are also executed faster with small PC programs.

There is no easy way to specify in advance the maximum size of PC programs which can be developed within the framework of these four tables. The space requirement is governed by such things as the number of outputs on the PC elements, how they are interconnected, how they are connected to the data base, the number of control parameters, the number of constants and the number of measurement units allocated to variables. As you develop the PC programs, however, information on the memory space still available is provided by each of the commands IS, C, CU and DS. Information is provided on both the total space for PC programs and the space within the current PC program for internal connections and data base connections.

3.4 PC Dimensioning

3.4.1 Dimensioning the Space for PC Programs

When an Advant Controller 400 Series is started for the first time, the PC area must be dimensioned. You specify the number of PC programs, the number of places in the cycle timetable (scan places) in the interpreter and the total memory space for PC programs. Further on, you can activate a function to save the contents of the User Disk Application Segments in the Advant Controller 400 Series for backup reasons.

To dimension and design PC programs well, you must be aware of certain size limitations applicable to such PC programs. These limitations are described in Section 3.3, Structuring PC Programs.

In addition to the data base and PC, there are certain functions in the Advant Controller 400 Series that require access to RAM (see Section 3.2.1.4, Memory Requirements for certain Functions). Sufficient memory space must remain for those functions.

Dimensioning is carried out with the Advant Controller 400 Series in CONFIGURATION mode (see Section 2.4, Working Modes of Advant Controller 400 Series).

DIMPC

When you use the command DIMPC, the screen display is divided. The upper part of the screen shows the dimensioning details that you can change. On the lower part of the display, you conduct a dialog with the engineering station.

Syntax:

',03&

Subcommands:

M Opens the line at the cursor (>) for modification. ! Switches from the modify mode to the initial mode.

DIM Transfers the requested dimensioning to the Advant Controller 400 Series. PRINT Gives a printout of the screen contents.

END Ends DIMPC.

$03/&RQILJXUDWLRQ$GYDQW &RQWUROOHU6HULHV5HIHUHQFH0DQXDO 6HFWLRQ 0RGLI\LQJWKH6L]HRIWKH6\PERO7DEOH

1. Free memory space in the Advant Controller 400 Series. 2. Size of memory area allocated for PC programs. 3. Amount of allocated PC area remaining. 4. Total memory area for PC programs.

5. Number of PC programs in the Advant Controller 400 Series.

6. Number of places in the cycle timetable (scan places) for interpreters A, B and C. 7. Cycle times for interpreters A, B, and C.

8. The contents of the User Disk Application Segments can be saved in the Advant Controller 400 Series for backup reasons (USER disk application segments backup). See Section 7.2.2.2, User Disk Application Segments Backup Handling.

3.4.2 Modifying the Size of the Symbol Table

The User Disk Application Segments hold a symbol table in which items such as PC variable names, document texts and headline texts are stored. This symbol table is filled in gradually as you load PC programs. It is stored in one of the User Disk Application Segments on the USER volume (normally named PCMASS.SM). If the symbol table becomes full, it may be necessary to make it larger. If the symbol table is larger than necessary, some of the space can be released on the volume.

Figure 3-15. Screen Display of the Command DIMPC

4 5 6 100 kb 10 50 50 50 0 kb

Updating PC data sizes in PC1-PC10 ?

DIMENSION PC Free space in system Allocated PC area Available PC area

Allocated interpreter area 2 kb 555 kb 100 kb 10 kb Size of PC pgm tables

Number of PC programs

Number of scan places in interpreter A Number of scan places in interpreter B Number of scan places in interpreter C Interpreter cycle times (ms)

A B C 10 50 250 20 100 500 40 200 1000 2000

Size of USER disk application seg area

1 2 3 7 8 (Min. 3 kb) (Min.1)

MSTABS

Use the command MSTABS (Modify Symbol TABle Size) to modify the size of the symbol table and its available space.

Syntax:

067$%6

The command displays the minimum and maximum new sizes and the current size. You can enter the new size required here. Size is specified in numbers of blocks for the User Disk Application Segments; this is equal to number of kilobytes.

Even if the total symbol table space available can be increased, there are certain limitations per PC program which cannot be circumvented. The space for variable names is limited to 32 blocks (kilobytes) per letter as follows: Variable names starting with an “A” can be stored up to 32 blocks as well as variable names starting with a “B”, etc. It is advisable to limit the size of PC programs and to consider the naming conventions with this in mind. The maximum size of the PCMASS.SM segment is 1Mbyte.

Examples Example 1:

You want to change the size from 49 to 85 blocks:

#067$%6

MINIMUM SIZE (Symbol-table already used) : 37 MAXIMUM SIZE (Available disk space) : 143 SYMBOL TABLE SIZE (BLOCKS) = 49 = 

SYMBOL TABLE SUCCESSFULLY MODIFIED Example 2:

If you have filled in the symbol table to 60 blocks (of the 85 possible) and wish to reduce the table to this size, you will not succeed since there is not a sufficiently large uninterrupted area on the volume. Of the 143 adjacent blocks initially available, 85 were used in the change in Example 1.

#067$%6

INSUFFICIENT DISC SPACE: TRY COMPRESS; OTHERWISE MODIFICATION IMPOSSIBLE

#067$%6

MINIMUM SIZE (Symbol-table already used) : 60 MAXIMUM SIZE (Available disc space) : 225 SYMBOL TABLE SIZE (BLOCKS) = 85 = 

$03/&RQILJXUDWLRQ$GYDQW &RQWUROOHU6HULHV5HIHUHQFH0DQXDO 6HFWLRQ (QWHULQJDQG(GLWLQJ3&3URJUDPV

3.5 Entering and Editing PC Programs

Related documents