您好,欢迎访问三七文档
#includeapdefap.hlong_main(char*lpszPictureName,char*lpszObjectName,char*lpszPropertyName){//WINCC:TAGNAME_SECTION_START//syntax:#defineTagNameInActionDMTagName//nextTagID:2//WINCC:TAGNAME_SECTION_END//WINCC:PICNAME_SECTION_START//syntax:#definePicNameInActionPictureName//nextPicID:1//WINCC:PICNAME_SECTION_END//definitionofvariablesfloaty_org;//leftuppercornerofyourstaticobjectfloaty_setpoint;//calculatedleftuppercornerofyourobjectfloatheight;//maximimumheightofyourstaticobjectfloatprocent;//processvalueinpercent//presetvaluesofyourWinCCGraphicsDesignerobjecty_org=100;height=150;procent=GetTagWord(testvar);//prozessvalue(0-100%)//calculatenewy-valuey_setpoint=y_org+((100-procent)/100)*height;//returnnewy-valuetoyourobjectreturn(int)y_setpoint;}
本文标题:y_coord
链接地址:https://www.777doc.com/doc-5332933 .html