




已阅读5页,还剩21页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1? ? ? ? C-Action: #pragma code(kernel32.dll); BOOL Beep(DWORD dwFreq,DWORD dwDuration); #pragma code(); Beep(500,500); 2? ? C ? ? ? ?1? ? 4 ? WinCC BOOL OnBtnSinglAckn?char*lpszPictureName,char*lpszObjectName? 5 ? WinCC BOOL AXC_OnBtnSinglAckn?char*lpszPictureName,char*lpszObjectName? ?2? ? 4 ? WinCC BOOL OnBtnVisibleAckn?char*lpszPictureName,char*lpszObjectName? 5 ? WinCC BOOL AXC_OnBtnVisibleAckn?char*lpszPictureName,char*lpszObjectName? 3? ? WinCC ? ? ? C-Action? #pragma code(kernel32.dll); Void GetLocalTimes(SYSTEMTIME*lpst); #pragma code(); SYSTEMTIME time; GetLocalTime( SetTagWord(Varname,time.wYear); SetTagWord(Varname,time.wMonth); SetTagWord(Varname,time.wDayOfWeek); SetTagWord(Varname,time.wDay); SetTagWord(Varname,time.wHour); SetTagWord(Varname,time.wMinute); SetTagWord(Varname,time.wSecond); SetTagWord(Varname,time.wMilliseconds); 4? ? Windows ? ? ? Windows ? #includeapdefap.h void onClick(char*lpszPictureName,char*lpszObjectName, char*lpszPropertyName) ProgramExcute(c:win98control.exe timedate.cpl); ? 5? ? WinCC ? SQL ? ? 1? SQL ? ISQL ? SQL ? ?Windows ? 2? WinCC ? C Script ? SQL ? #includeapdefap.h void OnLButtonDown(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName, UINT nFlags,int x,int y) char*a=c:siemenscommonSQLANYISQL-q-b-c UID=DBA;PWD=SQL;DBF=E:testsqltestsqlRT.DB; DBN=CC_testsql_99-12-03-12:48:26R;READ E:testsqltest.sql; Printf(%srn,a); ProgramExcute(a); ? SQL ? select *from pde#hd#t#test; output to e:test2.txt FORMAT ascii ? 6? ? ? ?Globle Script? Project function ?cyclicarchive BOOL cyclicarchive() #pragma code(kernel.dll); void GetLocalTime(SYSTEMTIME*lpsz); #pragma code(); SYSTEMTIME time; Int t1; GetLocalTime( T1=time.wMinute; If(t1=00) SetTagBit(startarchive,1); Return(BOOL) (GetTagBit(startarchive); ? Tagloging ?Properties of process tag?archive tagTab ? Archive type ? Cycle-selective?Event?StartEvent? cyclicarchive ? 7? How can I set and reset a WinCC variable by mouse click with C script? ? The following function shows how you can alternately set and reset a WinCC variable by mouse click. #include apdefap.h void OnClick(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName) BOOL z; z=GetTagBit(MyBitVariable); if (z=0) SetTagBit(MyBitVariable,1); else SetTagBit(MyBitVariable,0); 8? How can I program a waiting function (Sleep) in WinCC? ? The following sample program shows how the Sleep is used. #pragma code(Kernel32.dll) void Sleep(int milliseconds); #pragma code() Sleep(1000); /time specification in milliseconds Warning: If you use Sleep(), processing the C script is interrupted for the time indicated. Requests for the interrupted function cannot be processed during this time. 9? How can I output a SIMATIC timer minutes and seconds in WinCC? ? If you want to output a SIMATIC Timer in minutes and seconds in WinCC, then in WinCC please use a static text in the Graphics Designer to which you interface the following action: char* _main(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName) char *p; DWORD hilf; int min, sec; p=SysMalloc(10); hilf=GetTagDWord(Time); min=hilf/60000; sec=hilf%60000/1000; sprintf(p,%d min %d sec,min,sec); return p; The Time variable linked to the I/O field must have the following properties: Data type 32-bit value without sign Format adaptation DwordToSimaticBCDTimer Address: data area Times and addressing Word 10? ? ? ? WinCC ? ?(? ?)? ? WinCC ? ?OLE(?)? ?(Smart Object) ? (Picture Window),?-? ?-? C ? #includeapdefap.h void onClick(char *lpsz PictureName, char *lpsz ObjectName,char *lpsz PropertyName) SetPictureName(?, ?, ?); /?/? ?(Picture Window)? ?/? ? 11? C ?(?)? Windows ? ? ? ? ? 12? WinCC ? ? ? WinCC ? ? C ? ? ? ? ? E+H ? 4?20 ? ? PLC? 4 ? ? 20 ? PLC ? 4?20 ? ?0.55.5 ? ? PLC ? 0?100%? ? C ? ?-?-? #include apdefap.h long _main(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName) static int x=25,y,z;/x ? 25?y ?z ? z=GetTagBit(202 ?); /? PLC ? if(z!=0) switch(y) case 0: x=x-4; if(x=25) y=0; break; return x; 13? ? ? ? ? ? ? WinCC ? ? ? ? ? WinCC ? ? WinCC ? Windows ? API ? C ? long _main(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName) #pragma code(Winmm.dll) void WINAPI PlaySoundA(char *pszSound,char *hmode,DWORD dwflay); #pragma code() if(GetTagBit(112 ?) PlaySoundA(d:winntmediaMircosoft sound.wav,NULL,8); return 1020; ? ? ? ? 14? WinCC ? PC ? ?: ? 13 ? ? 15 ? ? a to z, A to Z, 0 to 9 ? ? SIMATIC WinCC V6.0 ? ? DNS ? 15? plc ? S7 ?D801? ?: ? WinCC ? ? 16? plc ? S7 ? 8304? ?: WinCC ?WinCC ? 8304? WinCC ? S7 ? ?: ?AS?WinCC Explorer ? ? SIMATIC S7 PROTOCOL SUITE ? S7 ?“? PLC”? ? 17? ?: ? WinCC ? C ? ? ?: ? ? ”? ?“Login”? ? ? ?“Password”? ? C ? ?CurrentUser ?“ 2 s”? ? CurrentUser(?)? 2 ? ? ?“Startup”?“Global Script Runtime”? ?SIMATIC PCS 7(SIMATIC PCS 7 V6.0 SP1 ?)? ?Welcome.pdl ? ? Graphics Designer ?Welcome.pdl? ?C?(? ?) Event Picture Object Miscellaneous Open Picture)? ?“PASSLoginDialog(Screen);”? / ? ? C ? ? ?Welcome.pdl? 20? WinCC ? S7 ? ?:? ?C ? ? 1.? ? DATE_AND_TIME ? ?Flag ? WinCC ? 1? SFC0 SET_CLK?D B1 ? Flag ( DB1.DBX 8.0)? WinCC ? SetTagBitWait(DB1_FLAG,TRUE) ? 1? ? ? C ? WinCC ?,?SFC0 ? Step7 ? ? ? DB? SFC0 ?DATE_AND_TIME ?DateAndTime? ? SET_CLK ? ?Flag? ? ? ?DateAndTime? 0 ? ? ? ? 2.?“?”? Unsigned 8-bit value? ByteToBCDByte? ? DB ? ? WinCC ? ? Unsigned 16-bit value ? WordToBCDByte ? DB ? ? 3.?,? WinCC ? C ? DB1 ? S7 PLC ?DBI_FLAG? 21? WINCC-? 1?“?”-?“?”-?“?”-?“?”-?“?ODBC?”? ? ODBC ? 2? ? DSN ? ?“CC_ ?_?”? 3? #pragma code(UseGen.dll) #include USEGENAP.H #pragma code() LPCMN_ERROR err; /? LPCMN_ERROR ?,? if (PWGENConnect(CC_ass_04-09-21_16:35:22,err) /?,? CC_ass_04-09-21_16:35:22 ? if (PWGENChangePassword(GetTagChar(user),GetTagChar(oldpassword),GetTagChar(passw ord),err) /?,user,oldpassword,password ?,?,? ?,? 8 ? /?,? PWGENDisconnect(err); /? 4? 5? 6? ? APPLIB ? USEGENAP.H ? ? ? 22?WinCC6.0 ? 5.1 ? WinCC V6.0 ? MS SQL Server 2000? ? V5.1 ? ?segment? ? ? ? ? ? ? ? 23?WinCC6.0 ? WinCC V6.0 ? ? 24? ? 32 ? 2 ? ? 5040 ? 5000 ? 3250005040?806400000 byte ? ? 800MB ? 20? 1G ? ?1GB9?9GB 25? ? 3 ? ? 2 ? ? ? 302400 ? 50 ? 350302400?45360000 byte ? ? 46MB ? 20? 60MB ? ?60MB9?540MB 26? ? ? ? ? ? 27?WinCC V5.1 ? 1?WinCC V5.1 ? V5.1 ?WinCC V5.1 ? ? Windows 2000 SP2 ? 2) WinCC ? ? WinCC ? ? 28? WinCC ? OPC DA ? MS Access?MS SQL Server ? Oracle ? ? WinCC Industrial Data Bridge ? WinCC ? OPC DA ? MS Access?MS SQL Server ? Oracle ? 128? 512?2K ? 10K 29?WinCC ? ? WinCC ? 250 ? ? WinCC ? RawData ? S7-400PLC ? 30? WinCC ? WinCC ? RawData ? S7-400PLC ? ? PLC ? PLC ? ? DB ?PLC ? ? SFB37?AR_Send? DB ? WinCC, ? WinCC ? ? DLL ? WinCC ? ? ? ? DB ? ? 1 ? PLC ? ? PLC ?DB ? 16KB? ? DB ? DB ? ? CPU ? 31?WinCC ? 1? WinCC ? V5.1 ? 2? S7-400 ? CPU 3? WinCC ? S7 400 ? S7 ? MPI,ProfiBus,TCP/IP,? ? 32? WinCC ? STEP 7 ? ? WinCC ? STEP 7 ?WinCC ? STEP 7 ? ? Simatic ? ?CDDocumentsInstallNotes.chm? ? WinCC ? STEP 7 ? WinCC ? STEP 7 ? ? WinCC ? STEP 7?STEP 7 ? WinCC ? 33? WinCC ? STEP 7 ? ? WinCC ? STEP 7? ? WinCC ? STEP 7 ? ? WinCC ? WinCC ? WinCC ? ? WinCC ? ? WinCC ? STEP 7 ? 1.? STEP 7 ? OS ? WinCC ? 2.? STEP 7 ?OS? WinCC? ?STEP 7 ? ?wincproj? d:siemensSTEP7S7projSTEP7_IntegrationwincprojName of the OS 3.?Save as?WinCC?STEP 7? ?Start SIMATIC WinCC Tools? ? STEP 7 ? WinCC ?Packer? ? WinCC ? 34?wincc ? s7plc-sim ? ? PLCSIM ? STEP 7 V 5.x PLCSIM V4.x ? WinCC V5.x ? ? SIMATIC WinCC V5 SP1 ?,?“?”?“S7Dos”?“?”? ? SIMATIC WinCC V5 SP2 ? “S7Dos”? ?“?” ? PG/PC ?“? PG/PC ?”?“? ?”?“MPI (WinCC)”?“?”?“”? STEP 7? ? SIMATIC ? ? PLCSIM ? ? OS? ? PLCSIM ? ? WinCC ? WinCC ?“SIMATIC S7 PROTOCOL SUITE”? ? MPI ? ?“?”? ?“?”? ?“?”? MPI ? STEP 7 ? CPU ? ? ? WinCC ? ?“? SIMATIC WinCC ? ?”? ?“?”? ? ? WinCC ?“? - MPI ?”? ?“?”? ?“? - MPI ?”?“? PLC ?”? wincc ? PLC ? PLCSIM ? PLCSIM ? WINCC ? MPI ? MPI ? PLC ? PLCSIM ? ?I ? ? ? M ? ?I ? ? 35?WINCC-? ?: #pragma code(useadmin.dll) #include PWRT_API.H #pragma code() if (PWRTSilentLogin(username, PassWord) /? ?USERNAME,PASSWORD?.?: PWRTSilentLogin(GetTagChar(user), GetTagChar(PassWord) ?,?;?,? 36?WINCC-? ? #pragma code(useadmin.dll) #include PWRT_api.h #Pragma code() PWRTlogin(1); ? #pragma code(useadmin.dll) #include PWRT_api.h #Pragma code() PWRTlogout(); 37? GIF ? wincc ? ? aniGIF.ocx ? ole ? GIF ? GIF ? ? 38? WinCCV6.0 ? ? WinCC V6.0 ? WinCC V6.0 ? WinCC V5.0 Service Pack2 ? WinCC V5.1 ? WinCC V6.0 ? ? ?WinCC V6.0 ? ? ? ? ? WinCC ?“? WinCC”“?”“? ?”? ?:? WinCC V6.0? ? dBASE III ? ?:? WinCC V5.0 SP2 ? V5.1 ? WinCC V6.0 ? ? ? ?,? ?“? ?”? ?:? ? ? WinCC V5.0 Service Pack 2 ? WinCC ?:? WinCC V5.0 SP2 ? WinCC ? ?,? WinCC V5.1? ? WinCC V6.0? 39?wincc6.0 ? ab plc ? WinCC V6.0 ? Allen Bradley DH DH+ DH485 Allen Bradley Serial DF1 Applicom Multi Protocol Interface GE Fanuc SNP SNPX Mitsubishi FX Modbus Protocol Suite Modbus Serial SIMATIC S5 PMC Ethernet SIMATIC S5 PMC Profibus SIPART ? OPC ? 40?WINCC? “Authorization SIK/SIMATIC WINCC RT 128 PowerTags is faulty.”? ? ? ? authorsw ? manageauthorization ? ?“recover autrorization”? 41:? C ?(acsun ?) ? WinCC ? Tag ?,? C ? ? Tag ?.? 146 ? WinCC ? 128 ? Tag ? ? C ?. ? WinCC ? Tag ? ? Tag ? ? LTN44001 ? LTN44023 ? 16 ? DD99.DW146 ? DD99.DW148 ? WinCC ? Tag ? PackageTag ? 32 ? DD99.DBD146 ? tag ? LTN44001 ? LTN44023 ? Global Script ? C ? Union Long Dword Int Word2 union Union.Dword=GetTagDword(PackageTag) SetTagWord(LTN44001,Union.Word0) SetTagWord(LTN44023,Union.Word0) ? LTN44001 ? LTN44023 ? Tag ? ? WinCC ? Tag ?. 42:? WinCC ? C ? SQL ? 1? SQL ? ? ISQL ? SQL ? 2? WinCC ? C Script ? SQL ? ?i nclude apdefap.h void OnLButtonDown(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName, UINT nFlags, int x, int y) char*a=C:SIEMENSCommonSQLANYISQL-q-b-c UID=DBA;PWD=SQL;DBF=E:testsqltestsqlRT.DB; DBN=CC_testsql_99-12-03_12:48:26R; READ E:testsqltest.sql; printf(%srn,a); ProgramExecute(a); ? SQL ? select * from pde#hd#t#test; output to E:test2.txt FORMAT ascii ?:? 43:? ?Global Script? Project functions ?cyclicarchive BOOL cyclicarchive() #pragma code (kernel32.dll); void GetLocalTime (SYSTEMTIME* lpst); #pragma code(); SYSTEMTIME time; Int t1; GetLocalTime( t1=time.wMinute; if(t1=00) SetTagBit(startarchive,1); return(BOOL)(GetTagBit(startarchive); ? Tagloging ?Properties of process tag?Archive Tagtab ? Archiving type ? Cycle-selective?Event?Start Event? cyclicarchive ? 44:? WinCC ? WinCC Control Center? ? C-action? ? WinCC 5.0 ? #pragma code (user32.dll); BOOL SetForegroundWindow(HWND); #pragma code(); HWND handle; handle=FindWindow(MCPFrameWndClass,NULL); If (!SetForegroundWindow(handle) Printf (rn SetForeground fails); WinCC 5.0 ? #pragma code(user32.dll); BOOL SetForegroundWindow(HWND); #pragma code(); HWND handle; handle=FindWindow(WinCCExplorerFrameWndClass,NULL); If (!SetForegroundWindow(handle) Printf (rn SetForeground fails); 45:WinCC ? OnMouseOVer ? ? WINDOWAPI ? GetCusorPos ? GetWindowRect ? ? WINCC frame ? 1s ? ? ? OnMouseOver ? ? ?i nclude apdefap.h int gscAction( void ) #pragma code(user32.dll); BOOL GetCusorPos(POINT lpPoint); /?-? BOOL GetWindowRect(HWND hwnd,LPRECT lpRect); /? #pragma code(); POINT pPos; RECT rRec; HWND hwnd; BOOL bRet,bRet2; long lLeft,lTop,lWidth,lHeight; long lX,lY; char szStr100;
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025资产管理公司合同模板
- 民办院校老师合同范本
- 修缮改造房子合同范本
- 学校发廊出租合同范本
- 北京购房制式合同范本
- 营地招租转让合同范本
- 承包专柜卸货合同范本
- 食品蔬菜供货合同范本
- 过敏性鼻炎药物治疗护理查房
- 门窗维修协议合同范本
- 基于SERVQUAL模型的物业公司服务质量提升研究
- 精索静脉曲张治疗-洞察及研究
- 养老护理员培训班课件
- 服装厂开业搞活动方案
- 临水作业安全培训
- 清洁与消毒培训
- DB11∕T 637-2024 房屋结构综合安全性鉴定标准
- 2024年10月中级注册安全工程师《金属冶炼安全》真题及答案
- 《高值医用耗材临床应用点评制度》
- 图书分类与管理制度
- 探索数字化技术在博物馆藏品保护与展示中的创新应用
评论
0/150
提交评论