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