TSL Automation Solutions Logo

Section 15.4.15 · Chapter 15: Using Macros

Screen Operation

■ OPEN_WS

Format OPEN_WS P1 Data Type U
Function Opens the window screen specified by P1. This command can only be used in a Cycle Macro.
P1 (I/C) The number of the window screen to be opened. This command will not open the specified screen if it is a normal screen or menu screen. The macro commands following this command will not be executed until the opened window screen is closed. Also, when a screen's Cycle macro is waiting for the closing of the window screen opened by this command, that screen cannot be closed or switched by any means.

■ CLOSE_WS

Format CLOSE_WS
Function Closes the window screen that was opened by the macro command OPEN_WS.

■ InitWndPos

Format InitWndPos( P1,P2,P3) Data Type U
Function Sets the initial position of the specified window screen. The window screen will be shown at the specified position when it is opened.
P1 (I/C) The number of the window screen.
P2 (I/C) The X-coordinate of the initial position. If you want the window screen to be shown at the center of the display, set P2 to 65535.
P3 (I/C) The Y-coordinate of the initial position.
Example InitWndPos(10, 120, 100) /* Set the initial position of the window screen No. 10 at (120, 100) */

■ OpenScreen

Format OpenScreen( P1,P2,P3) Data Type U
Function Opens the screen specified by P1 at the designated position (P2, P3).
P1 (I) The number of the screen to be opened.

The command can open any kind of screen. If the specified screen is a normal screen, the command closes the currently displayed normal screen before opening the specified screen. If the specified screen is a menu screen, the screen will be dragged down at the designated position. If the specified screen is nonexistent or already opened, the operation is cancelled.
P2 (I) The x-coordinate of the position where the upper-left corner of the screen is placed at.

The parameter is ignored when the specified screen is a normal screen because a normal screen is always displayed at (0, 0). If the parameter makes the right part of the screen unseen, the command will move the screen left to make the whole screen visible.

To center the screen on the display, set P2 to 65535 (0xffff).
P3 (I/C) The y-coordinate of the position where the upper-left corner of the screen is placed at.

The parameter is ignored when the specified screen is a normal screen or the value of P2 is 65535 (0xffff). If the parameter makes the lower part of the screen unseen, the command will move the screen up to make the whole screen visible.
Example OpenScreen(10, 0, 0) /* Open the normal screen numbered 10 */
OpenScreen(35, 120, 200) /* Open the window screen numbered 35 and place it at the position (120, 200) */
OpenScreen($U50, 65535, 0) /* Open the window screen specified by the internal word $U50 at the center of the display */

■ CloseScreen

Format CloseScreen(P1) Data Type U
Function Closes the window screen or menu screen specified by P1.
P1 (I/C) The number of the window screen or menu screen to be closed.
Example CloseScreen(27) /* Close the window screen numbered 27 */

Need PM Designer itself?

V4 for current PK, PT, ITV and PM panels, V2 for older models. Free, sent by email.

Source.Section 15.4.15 of the PM Designer Software User Manual, Edition 2.0, © Cermate Technologies Inc. (www.cermate.com, service@cermate.com). Reproduced online, with the manual's own figures, by TSL Automation Solutions, authorised Cermate distributor, for users of Cermate HMI panels. PM Designer and PanelMaster are trademarks of Cermate Technologies Inc.

Text and figures are the manufacturer's and may describe features your panel or software version does not have. For a plain-language introduction read the PM Designer guide; for help with a specific panel contact TSL Automation.