Creating a screen using standard controls

<< Click to Display Table of Contents >>

Manual > Surveillance system construction guide > Creating graphic screens >

Creating a screen using standard controls

Introduction to creating screens using standard controls

This section provides a simple explanation of the steps to create a screen using standard controls.

 

We will introduce the steps to create a simple screen like the one below using labels, edit boxes, rectangles, and Button control.

 

(Screen image)

p_gra_0003

 

 

hint

For details on how to use Panel Editor, see "Editing operations with Panel Editor". For details on how to edit controls, see "Basic control editing methods".

 

hint

Detailed specifications for each control are described in "Control Reference".

 

 

■ Creation procedure

 

The following steps assume that the following tags are registered in Panel Server.

 

•U01.F01.D0000 - Numeric tag

•U01.F01.M0000 ... bit tag

 

 

1.Add a label to the form

 

From the control view displayed to the right of Panel Editor, select Basic > Label.

 

p_gra_0004

 

Anywhere on the form, drag the mouse from the upper left to the lower right of the area where you want to paste the control to specify the area.

 

p_gra_0005

 

The label was attached.

 

p_gra_0006

 

Furthermore, controls and parts attached to the screen are called "objects." In the following explanations, for example, a pasted label will be referred to as a label object, Label control object, or simply as a "label."

 

 

2.Set the label

 

When you double-click the label you have pasted onto the form, the properties dialog box will appear.

 

p_gra_0007

 

Click the link icon to the right of "Text" in the dialog.

 

p_gra_0008

 

The following dialog will then be displayed:

 

p_gra_0009

 

In the "Tag" input box in the dialog, enter the tag path "U01.F01.D0000" and click OK.

 

p_gra_0010

 

This setting binds the U01.F01.D0000 tag to the label's text (the Text property).

 

 

3.Paste the edit box

 

In the same way as with labels, select Basic > Edit Box from the Control View in the upper right-hand corner of the screen, and anywhere on the form, drag the mouse from the upper left to the lower right of the area where you want to paste the control to specify the range.

 

p_gra_0011

 

The edit box is attached.

 

p_gra_0012

 

 

4.Configure the edit box

 

Double-click the edit box to display the properties dialog.

 

p_gra_0013

 

Select the "Type" combo box in the dialog and set it to "NUMBER".

 

p_gra_0014

 

Then click the link icon to the right of "Value" in the dialog.

 

p_gra_0015

 

The following dialog will then be displayed:

 

p_gra_0016

 

Enter the tag path "U01.F01.D0000" in the "Input Tag" input box of the dialog.

 

p_gra_0017

 

Similarly, enter the tag path "U01.F01.D0000" in the "Output Tag" input box in the dialog, and click OK.

 

p_gra_0018

 

 

5.Paste a rectangle

 

From the Controls view, select Shapes > Rectangle and place the rectangle anywhere on the form.

 

p_gra_0019

 

The rectangle is attached.

 

p_gra_0020

 

By setting this rectangle, we will create a lamp that changes color depending on the tag value.

 

 

6.Set the rectangle

 

When you double-click the rectangle pasted on the form, the following dialog box will be displayed.

 

p_gra_0021

 

Click the link icon to the right of "Background Color" in the dialog.

 

p_gra_0022

 

The following dialog will then be displayed:

 

p_gra_0023

 

Click the "+" button twice under "Add condition" to add two lines of conditions.

 

p_gra_0024

 

Click the "..." selection button for the "If" condition in the first line to display the condition dialog.

 

p_gra_0025

 

In the input box of the condition dialog, enter the tag path "U01.F01.M0000" and click OK.

 

p_gra_0026

 

Next, click on the color of the condition in the first row.

 

p_gra_0027

 

A color selection dialog will appear, so select red and click OK.

 

p_gra_0028

 

Next, click "..." in the second condition row.

 

p_gra_0029

 

Click "Other than the above" at the top of the condition dialog that appears.

 

p_gra_0030

 

Next, specify the color for the second condition. Specify green in the same way as you specified the color for the first condition.

 

p_gra_0031

 

The conditions have been set. Click the OK button to close the setting screen.

 

p_gra_0032

 

 

7.Attach two buttons

 

Next, attach two buttons to the form and make each button into a write button for the ON operation and OFF operation.

 

From the Controls view, select Basic > Button and paste it anywhere on the form.

 

p_gra_0033

 

The button was attached.

 

p_gra_0034

 

Paste another button in the same way (you can also copy the first button).

 

p_gra_0035

 

 

8.Set one button as the ON button

 

When you double-click the button on the form, the following dialog box will be displayed.

 

p_gra_0036

 

Edit the dialog's "Text" to "ON" and change the "Switch Type" to "ON_SWITCH".

 

p_gra_0037

 

Next, click the link icon to the right of "Switch Value" in the dialog.

 

p_gra_0038

 

The following dialog will then be displayed:

 

p_gra_0039

 

In the "Output tag" input box of the dialog, enter the tag path "U01.F01.M0000" and click OK.

 

p_gra_0040

 

 

9.Edit the ON button color

 

From the list on the left side of the dialog, open "Advanced Settings" and select "Fill".

 

p_gra_0041

 

Among the setting items, click the color display (square) of "Color when value is ON."

 

p_gra_0042

 

The following color selection dialog will then be displayed, so select the "Theme" tab, select "@ButtonColor" from the list, and click the OK button.

 

p_gra_0043

 

 

10.Set the other button as the OFF button

 

Double-click the other button to display the dialog, then change "Text" to "OFF" and "Switch Type" to "OFF_SWITCH".

 

p_gra_0044

 

Next, click the link icon to the right of "Switch Value" in the dialog.

 

p_gra_0045

 

In the "Output tag" input box in the dialog that appears, enter the tag path "U01.F01.M0000" and click OK.

 

p_gra_0046

 

This completes the setup process.

 

 

11.Operation check

 

Click Panel Server Online (yellow arrow) to bring it online.

 

p_gra_0047

 

Next, click the Panel Editor browser run icon (green arrow) to bring Panel Browser online.

 

Once Panel Browser is launched, display the form you created above.

 

p_gra_0048

 

Enter a number (in this example, "15") in the edit box.

 

p_gra_0049

 

Then, the label display changed from 0 to 15.

 

p_gra_0050

 

If you check the current value of the target tag on the Panel Server side, you can confirm that it has also changed to "15".

 

p_gra_0051

 

The above is the result of a series of processes: when the value in the edit box was changed, the value was written to the D0000 tag assigned to the output tag of the edit box, and because the same D0000 tag is also assigned to the input tag of the label text, the same value as that written is displayed on the label.

 

Next, check the operation of the lamp and the ON/OFF button.

 

Currently the lamp is green.

 

p_gra_0052

 

Clicking the "ON" or "OFF" button will change the lamp color to red or green.

 

The flow of this operation is as follows: First, each time a button is clicked, the value of each switch (TRUE for the ON button, FALSE for the OFF button) is written to the M0000 tag assigned to the output tag of the switch value of each button.

 

And because the background color of the lamp display rectangle references the same M0000 tag as above as the input tag, the display color changes according to the change in the tag value written by button operation.

 

 

If you check the current value of the target tag on the Panel Server side, you can see that the value is written each time the button is operated and changes to "TRUE" or "FALSE".

 

p_gra_0053

 

In this way, you can use standard controls to display tag values and write values. You can also use the same technique to create animations by dynamically changing the display position and size of a part itself, for example by assigning a tag to the display position property of a control, or to switch the display/hide of the part itself depending on the tag value.