Program Automation Module

You can use the Program Automation module of the Develop workspace to do all of the operations that follow:

  • Automatically run compiled AeroScript programs.
  • Automatically load compiled AeroScript programs on the controller.
  • Automatically load compiled AeroScript libraries on the controller.
  • Automatically import compiled AeroScript libraries while you are compiling AeroScript programs.
  • Automatically include AeroScript files while you are compiling AeroScript programs.

Tip: For information about how to compile an AeroScript program or library file, see Working with Compiled Programs and Libraries.

When you make AeroScript programs and library files, you can use the AeroScript Programming Language section of the help file and the AeroScript Programming Language Reference guide to help you get started.

Automatically Run a Compiled Program

You can configure a compiled program to run automatically when the controller starts or resets. Use the Compiled Programs tab to select a compiled AeroScript program (.a1exe). In the Mode column, select Run.

The Program Automation module uses only the AeroScript files that are located in the Controller File System. Thus if you click the Select Program button and cannot find your compiled programs, refer to the procedure that follows:

You can also select the task on which the program will automatically run when the controller starts or resets. For information about how to configure two or more tasks, see Tasks Category.

Automatically Load a Compiled Program

You can configure a compiled program to load automatically when the controller starts or resets. To control the execution of the program, use the Program Control AeroScript functions.

Use the Compiled Programs tab to select a compiled AeroScript Program (.a1exe). In the Mode column, select Load.

You can also select the task on which the program will automatically load when the controller starts or resets. For information about how to configure two or more tasks, see Tasks Category.

After you configure the program to load, click Save All. The changes will be active when the controller starts or resets. To cancel all changes and go back to the configuration screen, click the Discard button.

Automatically Load a Compiled Library

You can configure a compiled library to load automatically when the controller starts or resets. You can dynamically import these libraries into your AeroScript programs so you can access their functionality from within your programs.

On the Compiled Libraries tab, click Add Library to select a compiled AeroScript Library (.a1lib).

The Program Automation module uses only the AeroScript files that are located in the Controller File System. Thus if you click the Add Library button and cannot find your compiled library files, refer to the procedure that follows:

Automatically Import a Compiled Library

You can configure a compiled library to be imported automatically when you compile an AeroScript program. The selected library will be dynamically imported during the compilation of all AeroScript programs. No explicit import statement is necessary in the AeroScript program.

On the Compiled Libraries tab, click Add Library to select a compiled AeroScript Library (.a1lib). Then set the Auto-Import toggle to On.

IMPORTANT: If you use the Auto-Import feature of the Program Automation module, you might receive compiler errors that include information about redefined functions, properties, enums, or structs. You can prevent these errors by using top-level metadata comments in your Auto-Import libraries. For more information, see Recompile Program Automation Auto-Import Libraries.

After you configure the library to import, click Save All. The changes will be active when the controller starts or resets. To cancel all changes and go back to the configuration screen, click the Discard button.

Automatically Include a File

You can configure a file to be included automatically when you compile an AeroScript program. The selected file will be included during the compilation of all AeroScript programs. No explicit #include statement is necessary in the AeroScript program.

On the Included Files tab, click Add File to select a file with the extension .ascript.

After you configure the file that you want to use, click Save All. The changes will be active when the controller starts or resets. To cancel all changes and go back to the configuration screen, click the Discard button.

Changing the Module Layout

You can change the size of the module when you click and drag the border with other modules in the workspace.

In the top-right part of the module header, click the Expand button to let the module fill all of the workspace area. While it is expanded, you can click the Restore button to let the module go back to its original size.