WinCC - Script problem in the picture window

Sergihno

Member
Join Date
Oct 2016
Location
Ukraine
Posts
70
Hello community,

There is next issue connected with executing script in the picture window. It doesn't depend on code , it depends on the picture window or its type. Even if I write value to the tag and it is executed up to 10-15 sec while just in the picture it is executed immediately. What the problem it can be.

I use main window, in the main window placed picture window, where also placed picture window where situated button with the script writing value.

Code on left mouse button press:
HMIRuntime.Tags("com_write").Write 1

 
If you look main window execution and picture window's configuration, is there update of change selected?
 
Updater Cycle - "Upon change"
Layer - 2

I define more precisely that there is a problem only with PLC tags, and there is no any issues with internal ones. There is also no problem even with PLC tags beyond the bounds of Picture Window, just on the Picture.
 
Last edited:
o_O
Thinking that tags are updated when picture is called. On main window tag is updated fast, because tags are allready "active".

On picture window when you open it, tag is first queried from driver. Is your communication something pretty slow which can make tag updating from PLC slow.
Also if there is lot of scripts active, it can make changing of page slow for tags.
 
... It's in fact not the first called picture window and it is picture window in the picture window.

Communication is not slow. I've mentioned that if I write some value from the first picture window it is OK, quickly updated.

No, there are no many scripts active.
 
Have you also checked that both picture windows properties have update cycle 500ms-1s (upon change is not good, because it can load communication a lot if there is lot of tags on page.)

If you copy your 2nd picture windowd from picture window to main page (link from main page to picture window)
Will it work then or is it still slow?
Also if you put tags to layer and only hide/show layer on picture window, is tags still slow?

If it works now fast, then there is maybe some bug on your WinCC version which prevents use of 2nd picture window?
Which WinCC and are updates installed.
 
There was installed WinCC RT & Configuration - v7.0 + SP3 K7.0.3.0

I suppose any updates were installed at all...


I have many windows , I would say, all of them with update - upon change. I think update - cyclically will load system. For sure if there are many tags it is preferable cyclically update.
Because if there are not many tags it's better not to load system with updating forcibly...
 
Last edited:
If you have lot of measuremts and they change, updating of upon change is not good, bacause it makes load for pages.
Updating periocidally updates tags only after certain time, even if tag value changes between this update cycle. (upon change updates as soon as possible tags)
 
sorry, don't know of updates, maybe time for call to Siemens technician.

Before updating I would try make it differently and see if it works with different approach before updating.
I know that picture window on picture window can work.
 
You have to diagnose sricpting and how often script gets executed.

On scripts add printf (C-code) or HMIRuntime.Trace (VBS) lines so that you can see when particular script is executed.

something:

printf("This is a my script on picture window");


Or

HMIRuntime.Trace "this is my script on picture window"


Then open apdiag-tool (from Siemens\WinCC\uTools")

on apdiag-tool open status window and you should see every time when script is executed (your line is printed out)

Something is slowing down script. On opening of picture windows, apdiag should show also if there is errors.

https://support.industry.siemens.co...ipt-diagnostics-gsc/135049?page=0&pageSize=10
 
Thanx a lot , Lare. I added in VB trace almost everywhere in my scripts.

I really don't understand how to see my scripts are executing in this utility,
so I added GSC Diagnostics in RT in my window, but it shows only Global Scripts Run.

I don't have such path described on the Siemens Forum :

Open a screen
Place a GSC Diagnostic (Controls → Print job / Script diagnostic)


I added Diagnostic Tools the next way:
Application Window -> Global Script -> GSC Diagnostics and then template is added...

GSC Diagnostics Wincc.png
 
Last edited:

Similar Topics

Dim i, a(10) For i = 0 To 9 Step 1 a(i) = SmartTags("visuf")(i) Next For i = 10 To 2 Step -1 a(i)= a(i-1) a(0)= SmartTags("valuetag")...
Replies
6
Views
5,484
Hi! In a WinCC Flexible script I'm trying to get some bit from some Tag so as I don't have to read to much Tags from PLC. Now, for example, I'm...
Replies
15
Views
11,494
Hello all, I am new to WinCC & would greatly value any help or pointers in the right direction that this obviously knowledgeable forum can...
Replies
0
Views
6,097
Hello, I have a quick question. I have been using scripts to change the color of buttons. The reason, I am usually using multiple hmiruntime.tags...
Replies
1
Views
95
Hello all, In an WinCC Professional v15 application I need to filter the alarms by alarm class, not using the filter button on the toolbar of the...
Replies
3
Views
2,560
Back
Top Bottom