6.6.2 Exercise

This section gives an illustrative example of using a page link object. Settings may differ depending on your project’s configuration.

This section gives an illustrative example of using a page link object. Settings may differ depending on your project’s configuration.

Exercise: Changing the screen shown by a PageLink object

a) Create an analog tag named ‘SCREEN’ and specify its initial value as 1. Set the minimum and maximum values to 1 and 3, respectively.

b) Create three popup pages and reduce their sizes so that they can fit inside of the main page.

c) In popup page 1, you can view temperatures and elapsed fire time for each floor. Alarms are displayed in the alarm summary object.

d) In popup page 2, you can monitor fire and sprinkler status.

e) In popup page 3, temperatures of each floor will be shown in the trend graph. You may also check the alarm history in the alarm summary object.

f) Click [Draw] – [Pagelink] to configure a page link object on the main screen. Select ‘Specify by Tag Values’ for the page control option, then choose ‘Popup Page’ as the page type. Choose ‘SCREEN’ as the page select tag.

g) Create left and right touch objects which change the value of the ‘SCREEN’ tag. Assign command expressions as shown in the table below.

Function

Touch

Action

Command expression

Command

SCREEN = SCREEN – 1;

Function

Touch

Action

Command expression

Command

SCREEN = SCREEN + 1;

h) Launch the project in Xpanel or the simulator. When you click the left and right touch buttons, the page link screen should switch between pages.

Â