I have been using v3.15 P006 and just have tested my app with P007, and something that worked correctly in P006 no longer works in P007. In P007, when a reference panel with a dollar parameter in the ScopeLib script is opened, the dollar parameter in ScopeLib is not replaced with the assigned value like it was in prior versions of WinCC/OA.
Update: I am incorrect about this; the dollar parameter replacement does occur, but an error is put into the diagnostic log saying that it couldn't find the dollar parameter, even though it did the replacement.
The error message in the log:
WCCOAui (1), 2017.12.01 15:01:40.259, CTRL, SEVERE, 17/ctrl, Cannot find dollar parameter $LogNr. Location:
Module: mainModule_1
Panel: D:\\HMI_SHELL\\panels\\objects\\misc\\HsdlUsrLogStatus.xml [objects\\misc\\HsdlUsrLogStatus.xml]
Script: ScopeLib
In panel scope library: objects\\misc\\HsdlUsrLogStatus.xml []
Line: 1
Line 1 of ScopeLib of HsdlUsrLogStatus.xml:
const int iLogN = $LogNr;
The dollar parameter is defined in the parameter section of the properties of the reference panel where HsdlUsrLogStatus.xml is placed on another panel. Obviously, if it wasn't no replacement would have occurred.
Now that I understand that the replacement is really occurring, and that it is just a bogus error message, it is no longer a matter of much significance, although you may still want to include it in your errata. I apologize for the "false alarm".
Dollar parameter replacement broken in v3.15 P007
- tgdannemiller
- Posts:23
- Joined: Thu Apr 21, 2016 3:29 pm
Dollar parameter replacement broken in v3.15 P007
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Dollar parameter replacement broken in v3.15 P007
I've tested it and it looks like the log message is only written when using the XML panel format.
The log message also occurs when just opening the file selector to choose the panel which shall be loaded in the Vision module.
I'll discuss it with our UI development team.
Best Regards
Leopold Knipp
Senior Support Specialist
The log message also occurs when just opening the file selector to choose the panel which shall be loaded in the Vision module.
I'll discuss it with our UI development team.
Best Regards
Leopold Knipp
Senior Support Specialist
- willw
- Posts:22
- Joined: Thu Nov 19, 2015 4:40 pm
Re: Dollar parameter replacement broken in v3.15 P007
We have also seen this behaviour, and I have raised the issue with ETM tech support. The response:
The proposed solution is to move initialisation of ScopeLib variables into init routines.
This a surprising reply becauseThe official position is that it is not a bug and it is not planned for the future to modify it, this is not WinCC OA specific issue.
This is related to interpreted programming language like CTRL, where dynamic variables should be initialized during a panel event like the init scripts.
This will works for constants because they are not changed during the initialization event but the dynamic parameters could result into a kind of race condition.
Such as the modification will help to avoid some strange behaviour for the future and it will make the bugging easier.
So you have to modify your code as I have written before.
- it is an unannounced change in behaviour introduced by a patch
- the behaviour is confusing (it generates an exception yet still appears to work)
- it only seems to occur when panels are stored in XML format. Panels stored in PNL format continue to function as before.
The proposed solution is to move initialisation of ScopeLib variables into init routines.
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Dollar parameter replacement broken in v3.15 P007
The initialization of variables in the ScopeLib should also work.
Today I had a look at the support request together with a colleague and at the same time I've seen that the same topic is described in the ETM Portal.
As written in my previous post the issue will be discussed with the UI development team.
Best Regards
Leopold Knipp
Senior Support Specialist
Today I had a look at the support request together with a colleague and at the same time I've seen that the same topic is described in the ETM Portal.
As written in my previous post the issue will be discussed with the UI development team.
Best Regards
Leopold Knipp
Senior Support Specialist