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”)
I - Locked Element "P:Inventory_1 (identified with a
|
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 a 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. If the selected program is a previously imported program that is "locked" (not editable), this option is NOT applicable. |
|
Add Program |
Adds another program to the project. |
|
Add Local Procedure |
Adds a local procedure to the selected program. See Local Procedures. If the selected program is a previously imported program that is "locked" (not editable), this option is NOT applicable. |
|
Add Screen |
Adds a new screen to the selected program. See Setting Screen Properties. If the selected program is a previously imported program that is "locked" (not editable), this option is NOT applicable. |
|
Add Routine |
Adds a routine to the selected program. See Working with Routines. If the selected program is a previously imported program that is "locked" (not editable), this option is NOT applicable. |
|
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. |
|
Open All Screens |
Opens all the screens included in the selected program. If the selected program is a previously imported program that is "locked" (not editable), this option is NOT applicable. |
|
Export Program |
Exports the selected program into "Library". See To Export a Program to Library. If the selected program is a "locked" program (not editable), this option is NOT applicable. "Locked" elements are not exportable. |
|
Import Program |
Imports a program from "Library" into the project. See To Import a Program from Library. |
|
Import Screen |
Imports a screen from "Library" into the selected program. See To Import a Screen from Library. If the target program is "locked" (not editable), this option is NOT applicable. |
|
Import Routine |
Imports a routine from "Library" into the selected program. See To Import a Routine from Library. If the target program is "locked" (not editable), this option is NOT applicable. |
|
Properties |
Is used to add notes to the selected program.
If the selected element is a locked imported program (from Library), it is NOT editable. The corresponding properties window will be inactive (displayed in gray). |
Some of the right-click menu options are not applicable if the program in question is a previously imported program that is "locked" (an Export option - see Exporting/Importing Programs). A "locked" program is not editable so, certain operations (related to a program's duplication, the adding of screens/local procedures/routines or opening all the included screens) are NOT executable.
If you right-click a "locked" program (identified with a ) and select options that relate to its edition, you get one of the following messages:
Right-clicking outside the tree view (within the Program module) provides access to a menu with the following options:
This menu only appears if there is no object, screen, program or routine selected.
|
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.
|
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 to the program that contains the selected routine. See Local Procedures. |
|
Add Screen |
Adds a new screen to the program that contains the selected routine. See Setting Screen Properties. |
|
Add Routine |
Adds another routine to the program that contains the selected routine. See Working with Routines. |
|
Delete |
Deletes the selected routine. |
|
Export Routine |
Exports the selected routine to the "Library". See To Export a Routine to Library. |
|
Import Routine |
Imports a routine from "Library" into the program that contains the selected routine. See To Import a Routine from Library. |
|
Properties |
Is used to add notes to the selected routine. |
Right-clicking a Local Procedure, represented in the tree view, provides access to the following menu:
Copy |
Copies the selected local procedure. Use "Paste" to complete the operation. This option is only activated after the "Copy" option is used. |
|
Paste |
Pastes a copied local procedure. 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 another local procedure to the program that contains the selected local procedure. See Local Procedures. |
|
Add Screen |
Adds a new screen to the program that contains the selected local procedure. |
|
Add Routine |
Adds a routine to the program that contains the selected local procedure. See Working with Routines. |
|
Delete |
Deletes the selected local procedure. |
|
Properties |
Is used to add notes to the selected local procedure. |
Right-clicking the general "Local Procedures" entry represented in the tree view, provides access to the following menu:
Add Program |
Adds another program to the project. |
|
Add Local Procedure |
Adds a local procedure to the program that contains the general "Local Procedures" tree view entry. See Local Procedures. |
|
Add Screen |
Adds a new screen to the program that contains the general "Local Procedures" tree view entry. |
|
Add Routine |
Adds a routine to the program that contains the general "Local Procedures" tree view entry. See Working with Routines. |