Programs

Navigation:  How to Work with Programs >

Programs

Previous pageReturn to chapter overviewNext page

 

Overview

 

A program is comprised of screens which, in turn, encompass controls 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.

If you add a program via an import and that program is locked, its content will not be displayed in the tree view, only its name. A "locked" program means it is not editable.

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. The Main Program ("P:Main") is the only program that CANNOT be renamed or deleted.

 

 

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

 

The "Programs" module organizes the project's elements (programs, screens, global/local procedures, routines, controls, etc.) into a tree view. This provides a perspective of the project's architecture but also allows access to the displayed elements - it is possible to add, edit, delete or define the properties of the elements being displayed (ex: the right-click of an element in the tree view provides a menu with related options).

 

 

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 . Its content is NOT visible/editable or expandable)

 

 

Typical Program Components

 

Screens (B, F)

Screens are more than a set of controls. 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 controls. Screens provide the interface between the 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:

 

 

Edit

Is used to open the selected program's properties window where you can edit its name and/or add notes.

If you open the properties window of the "Main" program, the "Name" option will be inactive - it is NOT possible to change the default program's name.

 

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).

Copy

Copies the selected program.

Use "Paste" to complete the operation. The "Paste" option is only available after the "Copy" option is used, when you right-click an empty space in the "Programs" module.

Paste

Pastes a copied element. Only available if there is a previous "copy" operation (of a local procedure, routine, screen, etc.)

Duplicate Program

Duplicates the selected program with all its features, screens, controls and processes.

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.

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.

Convert to Global Procedure

Converts the selected program into a global procedure - it will be displayed in the "Procedures" module.

This option is NOT available for the "Main Program" and/or previously imported programs that are "locked".

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.

Library Export

Exports the selected program to "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.

Library Import

Provides import options for elements that relate to programs ("Screens" or "Routines") and programs.

See To Import a Program from Library.

See To Import a Screen from Library.

See To Import a Routine from Library.

 

These options do NOT apply to "locked" programs.

Search in ...

Opens the "Search" window. See Detail of Search.

 

The "Search in..." option in this right-click menu enables an automatic to search in the selected program.

 

Search 'xxx'

Opens the "Search" window. See Detail of Search.

 

The "Search 'xxx'" option in this right-click menu enables an automatic search of the selected text string in the current project and returns all the occurrences.

 

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, opening all the included screens or import/export operations) 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 "Programs" module) provides access to a menu with the following options:

 

Paste

Pastes the previously copied program. This option is only available after a "copy a program" operation takes place.

Add Program

Adds another program to the project:

 

a. Select "Add Program" to open a new program's properties window.

b. Maintain the suggested name or enter a new one.

c. If required, add notes.

d. Click to conclude.

 

The new program is displayed in the module's tree view.

Library Import

Provides access to the "Library Manager":

 

a. Click the "Library Import" option. This opens the "Library Manager" window.

 

b. Proceed with the import of a program from Library. See To Import a Program from Library.

 

The newly imported program is displayed in the module's tree view.

 

 

Right-clicking a Routine represented in the tree view (within the "Programs" module) provides access to a menu with the following options:

 

Edit

Is used to open the properties window of the selected routine. Working with Routines.

Copy

Copies the selected routine. Use the "Paste" option in the right-click menu of the destination program to complete the operation.

Delete

Deletes the selected routine.

Routine

Opens the selected routine's "Routine" tab directly.

Library Export

Provides access to the "Library Manager":

 

a. Click the "Library Export" option. This opens the "Library Manager" window.

 

b. Proceed with the export of the selected routine into Library. See To Export a Routine to Library.

Search in ...

Opens the "Search" window. See Detail of Search.

 

The "Search in..." option in this right-click menu enables an automatic to search in the selected routine.

 

Search 'xxx'

Opens the "Search" window. See Detail of Search.

 

The "Search 'xxx'" option in this right-click menu enables an automatic search of the selected text string in the current project and returns all the occurrences.

 

 

Right-clicking a Local Procedure, represented in the tree view, provides access to the following menu:

 

Edit

Is used to open the selected local procedure's properties window so you can edit it. See Local Procedures.

Copy

Copies the selected local procedure. Use the "Paste" option in the right-click menu of the destination element (a program or the "Local Procedure's" section) to complete the operation.

Duplicate Local Procedure

Duplicates the selected local procedure with all its processes. See Local Procedures.

Delete

Deletes the selected local procedure.

Param In

Opens the selected local procedure's "Param In" tab directly.

Param Out

Opens the selected local procedure's "Param Out" tab directly.

Procedure

Opens the selected local procedure's "Procedure" tab directly.

Search in ...

Opens the "Search" window. See Detail of Search.

 

The "Search in..." option in this right-click menu enables an automatic to search in the selected Local Procedure.

 

Search 'xxx'

Opens the "Search" window. See Detail of Search.

 

The "Search 'xxx'" option in this right-click menu enables an automatic search of the selected text string in the current project and returns all the occurrences.

 

 

Right-clicking the general "Local Procedures" entry represented in the tree view, provides access to the following menu:

 

Paste

Pastes the previously copied local procedure. This option is only available after a "copy a local procedure" operation takes place.

Add Local Procedure

Adds a local procedure to the program that contains the general "Local Procedures" tree view entry. See Local Procedures.