Visibility

<< Click to Display Table of Contents >>

Navigation:  Functionalities >

Visibility

YouTube_icon Tutorial video about visibility

 

 

Example projects: Download this example to see how Visibility is used.

 

There are several reasons for using Visibility.

The Visibility can be used...

to hide symbols or information on the device, until for example an error occurs.

in case you would like to use the same project for different systems (for example, for machines with different equipment).

to define different work flows depending on the access rights. For example a normal user view and an admin user view. So you can hide/show buttons or pages for specific user groups.

 

New simplification of the Visibility system

 

The Visibility system has been extended to make things easier. Now every variable can be used as a visibility variable for objects.

 

To do this, drag & drop a variable from the Variable View onto the object. In the context menu, select the object first, and in the second level, select "Use as Visibility variable".

clip0017

 

This activates the property Visibility for the object and sets the variable as the Visibility variable for the object.

 

Alternatively, the Visibility variable can be set through the properties.

Select the object and activate Visibility in the properties.

clip0018

 

Then open the Visibility dialog by pressing the three-dot button in the Visibility Bit property.

clip0019

 

First, check the check box next to "Select Variable". Then choose a variable below by filtering by owner and/or group. After choosing the variable you want to use, click OK to save the setting. The variable will be displayed in the Visibility Bit property.

clip0020

 

Setting the object visible / invisible is very easy:

 

If the variable is 0, the object is invisible

If the variable has ANY other value than that, the object is visible.

 

If variables are initialized as invalid, their default value will be used to determine the visibility status, i.e. if a variable is configured to be initialized as invalid and with default value 5, the according object will still be visible, even when the variable has not been set to a valid value.

 

Note that a variable can be used for several objects, i.e. one variable can make any number of objects visible / invisible at the same time.

Note that String variables cannot be used as visibility variables. Any other data type that is offered can be used.

Also note that the pre-defined Visibility variables (see below) can't be used for the new visibility system.

 

Alternatively to the new system described above, Visibility variables are provided by the OPUS Projektor. Every project contains a set of 64 Visibility variables. All of them have 16 Visibility bits, which can be assigned to any graphical object(s). Each bit is a flag to hide or show graphical objects by switching between the value 0 or 1.

The value range of the Visibility variables is from 0x0000 to 0xFFFF. The default value is set to 0xFFFF, which means that all corresponding object will be visible.

 

How to configure Visibility
Before the Visibility can be used, you have to define the Visibility variables and its bits. Therefore please navigate to main menu tab [File][Project Properties] and select category Visibility Number 1.

Project_Properties

This dialog provides the fields to add new Visibility variables. The 'Index' of the variables defines what internal Visibility variable should be used. So @Visibility00 variable could be set with Index 0 by double press of the column 'Assigned Name'Number 2.

Afterwards you can configure the bits for each Visibility variable by clicking on 'Modify bit names' Number 3. Therefore a new dialog called 'Modify bit names' will be opened:

Modify Bit Names

Please select the Visibility variable which you want to configure Number 4. Now you can define for each of the 16 bis (Bit 0 - Bit 15) the correspondent visibility name Number 5.

After defining names for the Visibility bits please confirm both dialogs with 'OK'.

 

Now the Visibility variables is configured properly and it can be used in the project.

 

NOTE:

Each entry in both tables should be committed with 'Enter' key.

To show the object corresponding to the specific bit of the Visibility variable, this bit should be set.

 

Structure of Visibility Variables

 

@Visibility00

Bit

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

Name

 

 

 

 

 

 

 

 

 

 

 

 

 

technical

admin

user

Value

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Decimal

32768

16384

8192

4096

2048

1024

512

256

128

64

32

16

8

4

2

1

 

If you want to show all objects which are corresponding with the first bit of the Visibility variable (user), the value of the variable @Visibility00 should be set to '1' (value in decimal)

 

@Visibility00

Bit

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

Name

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

user

Value

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

Decimal

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

If you want to show all objects which are corresponding with the 3rd bit of the Visibility variable (technical), the value of the variable @Visibility00 should be set to '4' (value in decimal)

 

@Visibility00

Bit

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

Name

 

 

 

 

 

 

 

 

 

 

 

 

 

technical

 

 

Value

 

 

 

 

 

 

 

 

 

 

 

 

 

X

 

 

Decimal

 

 

 

 

 

 

 

 

 

 

 

 

 

4

 

 

 

If you want to show all objects which are corresponding from the 1st - 3rd bit of the Visibility variable(user, admin and technical), the value of the variable @Visibility00 should be set to '7' (value in decimal)

 

@Visibility00

Bit

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

Name

 

 

 

 

 

 

 

 

 

 

 

 

 

technical

admin

user

Value

 

 

 

 

 

 

 

 

 

 

 

 

 

X

X

X

Decimal

 

 

 

 

 

 

 

 

 

 

 

 

 

4

2

1

 

Recommendation: To make handling of visibility variables easier, it is recommended to start by using only the Bit 0 of the visibility variables. 64 visibility switches are enough for most usecases. This avoids difficult bit operations and makes things very easy: 0 - invisible, 1 - visible.

 

Use Visibility Variables in the Project

To make a graphical object Visibility dependent please follow the following steps:

Click on a graphical object e.g. 'Text Field' Number 1

Navigate to 'Properties' window Number 2

oEnable checkbox at property 'Visibility'

oClick on 'Value not set' at property 'Visibility Bit'

Select Visibility variable and Visibility bit at the dialog 'Visibility Bit'Number 3

Visibility Page

 

 

Set Visibility Dialog

 

 

At the end following settings should be set:

Visibility Page Finished

Now the Visibility variable @Visibility00 can be updated by setting the value of the 'Numeric Field' Number 4.

 

 

NOTE for J939 PGNs:

Be careful with adding visibility variables to receive PGNs.

To make sure all values are forwarded to the Visibility variable, enable the option Forward Don't Care for the variable in the J1939 mapping dialog, otherwise a value of all 1's will be ignored.