Programs
Overview
A program is comprised of screens which, in turn, encompass objects and processes. A program can also contain routines and local procedures.
The programs, as well as the program elements are displayed in a tree view located in the "Programs Module". Whenever there is an addition to the project or program, it is displayed in that tree view. There are two types of programs, the Main Program and Application Programs.
Main Program (A)
The Main Program is, automatically, generated when the project is created.
This is the program that starts the application in the device. It generally contains a menu that allows the operator to access most or all of the other programs( application programs) in the application.
One large Main Program, with all the application's functionalities, can be created, without, actually, using other application programs. However, recommended best practice is to design and manage projects with multiple programs, each managing a functional application aspect.
A project can contain only one Main Program and this is the only program that cannot be renamed.
Application Programs (E)
The Application Programs can have, virtually, any functionality. They enable the operator to perform certain tasks and communicate with the host, as well as with peripherals.
Detail of a Tree View
A – Main Program
B – Screen “Screen_1” (within the Main Program)
C – Routine “Routine_3” (within the Main Program)
D – Local Procedure “Local_Procedure_1“ (within the Local Procedure Group in the Main Program)
E – Application Program “Login”
F – Screen “Screen_1” (within the Application Program “Login”)
G – Routine “Routine_1” (within the Application Program “Inventory”)
H – Local Procedure Group (within the Application Program “Inventory”)
|
Typical Program Components
Screens (B, F)
Screens are more than a set of objects. They contain the coded commands (processes) that carry out the actual program work, as well as the variables that store the application data and other objects. Screens provide the interface between the device operator and the application.
Routines (C)
Routines contain commands (processes) that are executed as needed. They are usually called with a Go To Branch Process (ex: "Go to R: Routine_1") but can only be used in screens within the program they were created in.
Routines can also call other Routines and Local Procedures within that same program or Global Procedures.
Local Procedures (D, H)
Local Procedures contain commands (processes)."In" and "Out" parameters are defined with the aid of variables. Local Procedures can only be implemented/called from screens within the program that contains them. They are called with a “Call Local Proc” Branch Process. See Working with Call Local Proc Process.
Right-clicking the Program displayed in the tree view provides access to a menu with the following options:
Copy |
Copies the selected program. Use "Paste" to complete the operation. This option is only available after the "Copy" option is used. |
|
Paste |
Pastes a copied program. Only available if a previous "Copy" operation is performed. |
|
Duplicate Program |
Duplicates the selected program with all its features, screens, objects and processes. |
|
Add program |
Adds another program to the project. |
|
Add Local Procedure |
Adds a local procedure. See Local Procedures. |
|
Add Screen |
Adds a new screen to the program. |
|
Add Routine |
Adds a routine. See Working with Routines. |
|
Delete |
Deletes the selected program. This option is not available, if you right-click the "Main Program" (P:Main) because this program cannot be deleted. If the "Main" program is selected this option is not available. |
|
Open All Screens |
Opens all the screens included in the selected program. |
|
Export Program |
Enables the exporting of the selected Program to "Library". See To Export a Program to Library |
|
Import Program |
Enables the importing of a Program from "Library". See To Import a Program from Library |
|
Import Screen |
Enables the importing of a Screen from "Library". See To Import a Screen from Library |
|
Import Routine |
Enables the importing of a Routine from "Library". See To Import a Routine from Library |
|
Properties |
Is used to add notes to the selected program. |
Right-clicking outside the tree view (within the Program Module) provides access to a menu with the following options:
|
Add Program |
Import Program |
Adds another program to the project. It is also possible to add notes to the program.
|
Enables the import of a program from "Library". See To Import a Program from Library.
|
The previous menu only appears if there is no object, screen, program or routine selected.
Right-clicking a Routine represented in the tree view (within the Program Module) provides access to a menu with the following options:
Copy |
Copies the selected routine. Use "Paste" to complete the operation. This option is only activated after the "Copy" option is used. |
|
Paste |
Pastes a copied routine. Only available if there is a previous "Copy" operation. |
|
Duplicate Routine |
Duplicates the selected routine with all its processes. See Working with Routines. |
|
Add Program |
Adds another program to the project. |
|
Add Local Procedure |
Adds a local procedure. See Local Procedures. |
|
Add Screen |
Adds a new screen to the program. |
|
Add Routine |
Adds a routine. See Working with Routines. |
|
Delete |
Deletes the selected routine. |
|
Export Routine |
Enables the exporting of the selected routine to the "Library". See To export a Routine to Library. |
|
Import Routine |
Enables the importing of a routine from "Library". See To Import a Routine from Library. |
|
Properties |
Is used to add notes to the selected program. |
Right-clicking a Local Procedure, represented in the tree view, provides access to the following menu:
Copy |
Copies the selected routine. Use "Paste" to complete the operation. This option is only activated after the "Copy" option is used. |
|
Paste |
Pastes a copied routine. Only available if there is a previous "Copy" operation. |
|
Duplicate Local Procedure |
Duplicates the selected local procedure with all its processes.See Local Procedures. |
|
Add Program |
Adds another program to the project. |
|
Add Local Procedure |
Adds a local procedure. See Local Procedures. |
|
Add Screen |
Adds a new screen to the program. |
|
Add Routine |
Adds a routine. See Working with Routines. |
|
Delete |
Deletes the selected local procedure. |
|
Properties |
Is used to add notes to the selected program. |