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.

Protect Your Intellectual Property

When you add a program or library file to the Program Automation module, the application will add only the compiled file. You do not have the option to add the source file. You can keep source files on your Controller File System or delete them.

If you delete the source files for your programs and libraries, this prevents other persons from seeing how you wrote your functions. The compiled files are binary. They do not show your source code.

For Example

Let's say that you deliver a machine to an end user. You do not want them to copy any of the intellectual property that you developed. Thus you use the Program Automation module, which accepts only the compiled versions of library and program files. You also delete the source files from the controller file system. As a result, the end user does not have access to your intellectual property because they cannot see your source code. The compiled files are binary only.

After you delete a source file from the controller file system, it is fully deleted from the controller. There is no more access to it in the Develop workspace. You will only have the compiled version of that file, which runs normally.

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.