Sign in to follow this  
Followers 0
dugmick

understanding a WinCC script

2 posts in this topic

I am trying to understand what a script in WinCC v6 is doing. I can find the source of the data tag used, but this script is altering its value and displaying something different on the HMI. The code is: #include "apdefap.h" double _main(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName) { // WINCC:TAGNAME_SECTION_START // syntax: #define TagNameInAction "DMTagName" // next TagID : 1 #define TAG_1 "StdMC/PLCtoPCReal.SHTR_L_POS" // WINCC:TAGNAME_SECTION_END // WINCC:PICNAME_SECTION_START // syntax: #define PicNameInAction "PictureName" // next PicID : 1 // WINCC:PICNAME_SECTION_END // update mimic of shutter position to show any skewing float Pos = GetTagFloat(TAG_1); return StraightLineInterpolate(Pos,0,285,-4.24e8f,0); } It has been too many years since I had a single C++ class in college.... Thanks

Share this post


Link to post
Share on other sites
Try to understand the theory of straightline with two foreseen interpolate by this link, https://support.automation.siemens.com/WW/llisapi.dll/8803015?func=ll&objId=8803015&objAction=csView&nodeid4=20229587?=en&siteid=cseus&aktprim=4&extranet=standard&viewreg=WW&load=content&csSort=-DOCBETREFF Hope you will be clear!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0