1/17/2014 9:16 AM | |
Joined: 10/31/2006 Last visit: 9/21/2022 Posts: 134 Rating:
|
Its not quite correct. I have changed it so that "Actual_TT44" is your external or PLC tag and "Reading_maxTT44" is your internal tag to store the highest value. I have used the tag upon change for the trigger, you need to decide based on your environment what you need to use. I have attached a new example pdl as well. Your Graphics Designer code should look like this. #include "apdefap.h" Your Global Script code should look like this. Remember to add a trigger to make the script run and that Global Script Runtime is selected in the Startup properties in WinCC Explore. If not your global script wont run. #include "apdefap.h" int gscAction( void ) if(GetTagFloat("Actual_TT44") >GetTagFloat("Reading_maxTT44")) AttachmentMaxValue.zip (147 Downloads) |
This contribution was helpful to
1 thankful Users |
1/17/2014 9:19 AM | |
Joined: 10/31/2006 Last visit: 9/21/2022 Posts: 134 Rating:
|
how to activate global script runtime
AttachmentGSStartup.zip (138 Downloads) |
This contribution was helpful to
1 thankful Users |
1/19/2014 10:52 AM | |
Posts: 12 Rating:
|
Thanks Crompton it's working. your C-script for the max reading is running. I have attache the snapshot & the wincc.pdl. now I can reading the max value but still there is one issue as Mike mention the max value is disappear if I close window ,even I use the global script.(check script.png) in the attached file. you can see snapshot2.png value & snapshot3.png value. and the maxTT44 tags is not updated even the max value has change. in the attached file you can find the snapshot for the script which I add it in the global script and in the pdl graphics designer.
Attachmentmax_value.zip (159 Downloads) |
1/19/2014 11:07 AM | |
Posts: 12 Rating:
|
Just information the global script in our project is active. check the attached file.
|
1/19/2014 12:35 PM | |
Posts: 12 Rating:
|
thanks team for your support. EspeciallyCromptonS & Mike for there useful support. =============================================== Sorry ,I have made a mistake when I create the global script . in the attached file the right link for the script which is in Global Action. http://support.automation.siemens.com/WW/view/en/22196773 the last question ,is it possible to run the script with condition to start update the value. I mean ,to use expression/Formula to trigger the script. AttachmentGlobal Script link.zip (105 Downloads) |
Follow us on