dynamic composite variable

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
15 posts • Page 2 of 2
marcel.gay@wimag.ch
Posts:62
Joined: Thu May 07, 2015 6:55 pm

Re: dynamic composite variable

Post by marcel.gay@wimag.ch »

I create a file arzGlobalVar.ctl
I add it in the file pvss_scripts.lst
this in the directory C:\Siemens\Automation\WinCC_OA\3.16\scripts
The contents of my global variables are not visible in any scripts

Then I deleted my filename in pvss_scripts.lst and I copied the two files in the dir: C:\WinCC_OA_Proj\Arzimar_3.8\scripts and add in pvss_scripts.lst only arzGlobalVar.ctl.
There were not .lst-file here before.
Control Manager (-f pvss_scripts.lst) stops with error at any time and can no longer be started

(I had to add .txt to the scripts to be able to upload they)
Attachments
pvss_scripts.lst.txt
(16 Bytes) Downloaded 244 times
arzGlobalVar.ctl.txt
(1004 Bytes) Downloaded 245 times

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: dynamic composite variable

Post by leoknipp »

The file pvss_scripts.lst is used to start several runtime scripts with one manager. A CTRL library is not a runtime script.
Therefore you get errors when trying to start the script list.

In your previous posts you have written that you want to use the variables in the UI. Then you have to modifiy the settings for the UI and not for a CTRL manager.
You can load a library with the #uses keyword in a script in the UI or with the config entry loadCtrlLibs.

Best Regards
Leopold Knipp
Senior Support Specialist

marcel.gay@wimag.ch
Posts:62
Joined: Thu May 07, 2015 6:55 pm

Re: dynamic composite variable

Post by marcel.gay@wimag.ch »

to load the library with #uses "arzGlobalVar.ctl" was the first thing I tried. Again, the global variable was not visible or unavailable

I don't understand ?
have to modifiy the settings for the UI

Whats wrong with my script in the file "arzGlobalVar.ctl" ?

Does the lib have to be loaded in each script with #uses when the global variables are used ?

marcel.gay@wimag.ch
Posts:62
Joined: Thu May 07, 2015 6:55 pm

Re: dynamic composite variable

Post by marcel.gay@wimag.ch »

everything works almost perfectly now

Loading the lib with #uses only has to be done once

mapping is now also perfect running for my solution
with a dyn_string (from tree widget) I can cover everything via mapping with ONE function in a few lines (for over 1000 Variables)

only one thing, the writing of the global variable I had to do in a script, writing in the file arzGlobalVar.ctl does not work (see attaced file arzGlobalVar.ctl in older post).
Is that correct or have I still made a mistake here

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: dynamic composite variable

Post by leoknipp »

It looks like arzGlobalVar.ctl is a script and not a CTRL library as you have defined a main() function.
A CTRL library does not have a main() function and is saved in scripts/libs.

Best Regards
Leopold Knipp
Senior Support Specialist

15 posts • Page 2 of 2