Jump to content
Sign in to follow this  
Interroga

How to function the layer in HMI screen? it's possible change visible images with layer?

Recommended Posts

No,

The Layer is just a feature for creating layered UI (for example, you an element above another element). This feature allows you to hide a specific layer, so then you can see and edit the elements behind it.
Feature like this exists in Siemens Step 7, Photoshop, and other UI designing softwares.

 

You cannot control the layer visibility in code. If you want to do that, then you can submit a feature request and maybe it will be implemented in the future.

For now, you can place the elements you want, inside a Custom Control, and use that custom control inside your screen. Then you can hide the entire custom control by linking it to a visibility bit.

 

Share this post


Link to post
Share on other sites

Please try to be specific with information / definition like:

* How you define the initial state of the layers visibility for a screen when it loads (where you define it and how?

Note: this is not possible with Custom Controls, since they have layers too, so if placed in a screen, then there would be layers inside layers (so controlling visibility would affect only the screen).

 

* How would you change the  visibility for one or more layers when after a screen already loaded.

 

 

I can't promise that it will be added to the features list (but it is worth trying)

 

Share this post


Link to post
Share on other sites

* How would you change the  visibility for one or more layers when after a screen already loaded.

A: I use bollean variable in each layer, or put one index for active through value...

 

 

Share this post


Link to post
Share on other sites

OK. But the index suggestion makes it that only one layer is visible (and this most likely not the case when people use layers). Some people use the layer in order to make a Message Box (or a popup window). It pops over the screen content, while the content below stays visible.

Defining a set to Booleans (in this case 8), also requires a lot of Boolean tags to be defined, and it is hard to handle.

 

Here is my suggestion (I'm still not saying that it will be implemented, it is just a suggestion).

Each screen will have an optional tag, which is a "bitmap" of the visible layers. Assuming there are only 8 layers, then an 8 bit number is enough.

If that tag is not set, or it's value is -1 (on a signed Int 8), or 255 (on an unsigned int 8), then all layers are visible.

Value = 0 means no layer is visible (since all bits are 0).

1 -> Layer 0 is visible

2 -> Layer 1 is visible

3 -> Layer 0 and 1 are visible

 

(Each layer visibility is depended on the value of the related bit in that tag value). This makes it easy enough to handle and understand without defining a start state and several other states that you defines the layers visibility.

 

What do you think?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...