REGION

Concept Link IconSee also Concept Link IconExample

Manage regions on a single display or multiple displays on a desktop client.

  • A physical display may be divided into a number of virtual screens.
  • On systems with a multi-screen graphics card (or multiple graphics cards), each region can be set up to appear on a different physical screen.

When a window is opened on a multi-region system, the position at which it opens is relative to the selected region.

WebVue support - Not applicable. Returns an unsuccessful code if used in this context.

Mode

Mnemonic

Syntax

1 SETSYSREGION 1
2 GETSYSREGION 2
3 SETREGION 1
4 GETREGION 2
5 SETSELECTION 3
6 GETSELECTION 2
7 GETSELECTIONMODE 2

Syntax 1

IntVal = REGION(Mode, Regions);

Return type: INTEGER.

Argument

Meaning

Regions

The number of regions (mode 1), or a particular region (mode 3). Type INTEGER.

Return type: INTEGER.

Execution

Mode

Mnemonic

Action

1

SETSYSREGION

Dynamically set the number of regions.

3

SETREGION

Set the region in which all future window opening initiated by a Link Open animation will occur.

 

 

Return: -1 if error else OK.

If you run a program from an animation, you can get the region in which the mimic is located using GETARG("GETREGION")

Dim iRegion As Integer;

iRegion = GETARG("GETREGION");

Region ("SETREGION", iRegion);

Alarmdisplay("ACK_SELECTED", "Alarmwindow", "", "Alarm1");

If using multiple regions, you must set the region before executing any instructions that interacts with the HMI (WINDOW, ALARMDISPLAY etc.).

Dim iRegion As Integer;

iRegion = 1;

Region ("SETREGION", iRegion);

Window("OPEN", "Alarmwindow", "");

Syntax 2

IntVal = REGION(Mode);

Return type: INTEGER.

Execution

Mode

Mnemonic

Action

2

GETSYSREGION

Return the number of regions or -1 if unsuccessful.

3

GETREGION

Return the current region or -1 if unsuccessful.

6

GETSELECTION

Return the current selection or -1 if unsuccessful.

7

GETSELECTIONMODE

Return the selection mode or -1 if unsuccessful.

Syntax 3

IntVal = REGION(Mode, Regions[, SubMode]);

Return type: INTEGER.

Argument

Meaning

Regions

The number of regions. Type INTEGER.

SubMode

Any numeric type

Execution

Mode

Mnemonic

Action

5

SETSELECTION

Set the region in which all future window opening initiated by a Link Open animation will occur.

 

 

The behavior depends on SubMode as follows:

0 The window is opened in the same region as the window in which the Link Open animation resides.
1 The window is always opened in the selected region. The selection is remembered even after the system has been shutdown and restarted. This is the default option.
2 The first Link Open animation selected after the instruction has been executed opens a window in the selected region. Subsequent Link Open animations operate as in mode 0.

 

 

Return: -1 if error else OK.

Example

For an example, select the Example link above.