WinCC Unified V16: create your own Screen buffer with JavaScript

preview_player
Показать описание
In this Video I show you how you can create your own Screen buffer.
So you have a easy navigation between the previous screen and next screen

Download the project:
project:

Adaption project of V18

#DerHecht #WinCC #Unified #TIAPortal #JavaScript
Рекомендации по теме
Комментарии
Автор

Thankyou for providing this example. Unfortunately, this is another hole in WinCC Unified functionality, which has not been resolved as of V18

waronuakiwis
Автор

Hello! I wish I was learning about this a few years ago when you were active 😅.

In this video I was curious if you were using the array to cycle through other screens you had made with a different background color.

Or perhaps if you were writing to change the background color.

I am having issues trying to script a change in background color of an object when reading a particular tags.

Could you please provide any insight?

thallonpitchure
Автор

I had this working in V17 and after the upgrade to V18, is being flagged as an error. Seems like Siemens has made some changes and the tag of array type can be only accessed as a single element of an array, e.g.

OlgierdSnieszko
Автор

How can one achieve this without a buffer? Only using 'Next' and 'Previous' buttons.
I essentially want to define and switch between images as follows






Thanks,
MG

MehmetGuzen-kv
Автор

It shows me an error when I write Screen_buffer.PreviousScreen, that means the funktion does not exist !
How would this work ?
Thanks

khaledalktiesh
Автор

idk how but this doesnt work (i'm using V17), the buffer values aren't written in the buffer

Dirk
Автор

How can i access the ScreenNumber property? I just want to set that value to a tag.
Thanks,
Greg

gregradford
Автор

Any workaround for version 18? I see this isn't working on version 18

versaceblue
Автор

Love your content, helps me allot! I have a big project with 25 popups 10 pictures. 15 faceplate i use in diffrent popups. It seems to be working but after i open a serten amount of pictures and popups it stops "rendering" the pictures. And stops completly. I can still open the pop ups that i have alredy opend but and I can open new ones but there is no faceplates showing.
The traceViewer says: Failed to call LookupResources.

Not sure what the problem could be, ever heard it before?

alexandercanderskog
Автор

This Video is without tone, I don't know if it's just me?

ubarcturus
Автор

Good but... Not practical. If 2 clients are connected at the same time and one changes screen it will change for the other one aswell. If you can make a solution without using tags but rather global variables that wouls be great.

markosimic
Автор

Hello, you asked for suggested improvements. I have done a similar thing using your idea, but with a single string, separating the buffer entries using /. So the buffer looks like

screen name change code:

let newCmd =
let oldCmd =

if(!(newCmd === oldCmd))
{
let hist =

//make room in the string for the new tag
if(hist.length + newCmd.length + 1 > 254)
hist = hist.slice(0, -(newCmd.length + 1));

//append screen to buffer
if(hist.length == 0)
hist =
else
hist = Tags("MAP_Screen_Cmd").Read() + "/" + hist;


}

//save previous. This is because the 'on change' seems to fire whenever the tag is written to


previous screen script:
let hist =
let screens = hist.split('/');
if(screens.length >= 2)
{
//navigate back


//shuffle the buffer
let newHist = hist.slice(screens[0].length + screens[1].length + 2);

}

waronuakiwis
visit shbcf.ru