Rockwell Automation 2708-NAG Application Generation Software User Manual

Page 26

Advertising
background image

Chapter 3
Using Application Generator

3 – 16

While you are testing your program, even a pause as short as 0.1 seconds will
take a full second to execute on the PC. When you generate your program,
the downloaded version will pause for the selected interval.

F4

– Chain to Personality: If your program becomes too large to run as a

single program then you will need to use chaining. This is a method of
having one program start the execution of another.

In order to use chaining, you will need to put CHAIN operations in the main
program to start up your subprogram. Then in the subprogram, you will need
a CHAIN that restarts the main program when the operation is completed.

The chain operation does not save the contents of user variables so you will
need to make sure that the operations are entirely separate in order for
chaining to be useful.

Chaining Requirements: Note that to download the files, you must use the
FILE DOWNLOAD feature of the Network Manager Software (Catalog No.
2708-NNM) V5.0. This is in the FILE SERVICES menu of the Network
Manager Software and is NOT the same as PROGRAM DOWNLOAD. Both
your main program and your subprograms must be loaded using FILE
DOWNLOAD.

You can start the main program by making a small program containing only
the statement: CHAIN “MAIN” and using PROGRAM DOWNLOAD.

Alternatively you can start the main program using the Start Program feature:
NM 5.0. This feature is not normally accessible. You will need to add it to
one of the NM menus before you can get to it.

Global Variables: Chained programs may make use of GLOBAL variables.
These are variables whose value is accessible by all of the chained programs.
The names of the global variables must be placed in a text file named
“GLOBAL.DEF” in your program directory using a text editor. Put one
variable name on each line.

Important: The GLOBAL.DEF file is not downloaded to the workstation.

Keep it in the subdirectory of the program you will use.

!

ATTENTION: Once you have created GLOBAL.DEF you may
only ADD variable names to the end of the list. If you insert or
delete old names then you will damage your existing AG
Personalities that use globals.

A maximum of 99 global variables may be defined. Using a lot of globals
will significantly slow down chaining your programs.

F5 – Comment line

: This allows you to put comments into your program.

For example, the first line of the program might be a Comment line stating
the program name and purpose. The comment line is identified by a single
quote (‘) at the beginning of the line.

Advertising