西門子培訓教程手冊大合集的主要問題集錦_第1頁
西門子培訓教程手冊大合集的主要問題集錦_第2頁
西門子培訓教程手冊大合集的主要問題集錦_第3頁
西門子培訓教程手冊大合集的主要問題集錦_第4頁
西門子培訓教程手冊大合集的主要問題集錦_第5頁
已閱讀5頁,還剩69頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領

文檔簡介

1、1 丣 C-Action:#pragma code(kernel32.dll);BOOL Beep(DWORD dwFreq,DWORD dwDuration); #pragma code();Beep(500,500);2 C 俆享14 儈 WinCCBOOL OnBtnSinglAcknchar*lpszPictureName,char*lpszObjectName 5 儈 WinCCBOOL AXC_OnBtnSinglAcknchar*lpszPictureName,char*lpszObjectName24 WinCCBOOL OnBtnVisibleAcknchar*lpszPic

2、tureName,char*lpszObjectName5 儈 WinCCBOOL AXC_OnBtnVisibleAcknchar*lpszPictureName,char*lpszObjectName3 WinCC C-Action #pragma code(kernel32.dll);Void GetLocalTimes(SYSTEMTIME*lpst); #pragma code();SYSTEMTIME time;GetLocalTime(&time); SetTagWord(Varname,time.wYear); SetTagWord(Varname,time.wMonth);

3、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.hvoid onClick(char*lpszPictureName,char*lpszObjectName, cha

4、r*lpszPropertyName)ProgramExecute(c:winntsystem32 control timedate.cpl );5 WinCC SQL 1 SQL ISQL SQL Windows 2 WinCC C Script SQL #includeapdefap.hvoid OnLButtonDown(char* lpszPictureName, char* lpszObjectName,char* lpszPropertyName, UINT nFlags,int x,int y)char*a=c:siemenscommonSQLANYISQL-q-b-c UID=

5、DBA;PWD=SQL;DBF=E:testsqltestsqlRT.DB; DBN=CC_testsql_99-12-03-12:48:26R;READE:testsqltest.sql; Printf(%srn,a); ProgramExcute(a); SQL select *from pde#hd#t#test;output to e:test2.txt FORMAT ascii6 Globle Script Project function cyclicarchive BOOL cyclicarchive()#pragma code(kernel.dll);void GetLocal

6、Time(SYSTEMTIME*lpsz); #pragma code();SYSTEMTIME time;Int t1; GetLocalTime(&time); T1=time.wMinute; If(t1=00)SetTagBit(startarchive,1); Return(BOOL) (GetTagBit(startarchive); Tagloging Properties of process tagarchive tagTab Archive type Cycle-selectiveEventStartEvent cyclicarchive 7 How can I set a

7、nd 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.hvoid OnClick(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName)BOOL z;z=GetTagBit(MyBitVariable); if (z=0) Se

8、tTagBit(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:

9、If you use Sleep(), processing the C script is interrupted for the time indicated. Requestsfor 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

10、Winlease use a static text in the Graphics Designer to which you interface thefollowing 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 m

11、in %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 #i

12、ncludeapdefap.hvoid onClick(char *lpsz Picturechar *lpsz ObjectName,char *lpsz PropertyName)SetPictureName(, , ); / (PictureWindow)/11享仌 C (啐) Windows 12WinCC WinCC C 儈儈 E+H 420 PLC 4 20 儈儈 PLC 420 儈0.55.5 PLC 0100% C -#include apdefap.hlong _main(char* lpszPictureName, char* lpszObjectName, char* l

13、pszPropertyName)static int x=25,y,z;/x 25y 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(c

14、har *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 WinCCExplorer SIMA

15、TIC S7 PROTOCOL SUITE仈 S7 “ PLC”17?: WinCC C : & & | | ! Object Properties Dynamic WinCC Dynamic Value Ranges dialog 18WinCC 啐/ OCX“SpinButton” WinCC “Control”Microsoft Forms 2.0 SpinButton O “SpinButton”“Value” ActiveX () ActiveX 仈ActiveX C C ActiveX 5 5 C 19亴 HMI 儈 C 畝僔“Silentlogin.pas”畝“PAS” 畝 Gl

16、obal Script C Editor Actions Global Actions (Global Action)“Silentlogin.pas”“PWRTSilentLogin (“Login”,“Password”);”“Login” “Password” C CurrentUser “ 2 s” CurrentUser() 2 ?!癝tartup”畝“Global Script Runtime”SIMATIC PCS 7(SIMATIC PCS 7 V6.0 SP1 儈)僔Welcome.pdl Graphics Designer Welcome.pdlC() Event Pict

17、ure Object Miscellaneous Open Picture)“PASSLoginDialog(Screen);” / C Welcome.pdl20 WinCC S7 ?:享C 1. DATE_AND_TIME Flag WinCC 1 SFC0 SET_CLKD B1 Flag ( DB1.DBX 8.0) WinCC SetTagBitWait(DB1_FLAG,TRUE) 1 C WinCC ,SFC0 享 Step7 DB SFC0 DATE_AND_TIMEDateAndTime SET_CLK Flag DateAndTime 0 享仈2. “ ” Unsigned

18、 8-bit value ByteToBCDByte DB WinCC Unsigned 16-bit value WordToBCDByte DB 3., WinCC C DB1 S7 PLC DBI_FLAG21 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) /

19、, CC_ass_04-09-21_16:35:22 if (PWGENChangePassword(GetTagChar(user),GetTagChar(oldpassword),GetTagChar(passw ord),err) /,user,oldpassword,password , , 8 /,PWGENDisconnect(err); / 456 APPLIB USEGENAP.H 22WinCC6.0 5.1 WinCC V6.0 MS SQL Server 2000 V5.1 segment 23WinCC6.0 WinCC V6.0 畝24 32 2 5040 5000

20、3250005040806400000 byte 800MB 20 1G1GB99GB25 3 2 。 302400 50 35030240045360000 byte 46MB 20 60MB 60MB9540MB26 27WinCC V5.1 1WinCC V5.1 V5.1 WinCC V5.1 Windows 2000 SP2 2) WinCC WinCC 28 WinCC OPC DA MS AccessMS SQL Server Oracle WinCC Industrial Data Bridge WinCC OPC DA MSAccessMS SQL Server Oracle

21、 128 5122K 10K29WinCC 儈WinCC 儈 250 。 WinCC RawData S7-400PLC 儈30 WinCC 儈WinCC RawData S7-400PLC 儈 PLC PLC 亪 DB PLC SFB37AR_Send DB WinCC, WinCC DLL 亪 WinCC 儈儈 仁 DB 1 。 PLC PLC DB 16KB DB DB 亪 CPU 31WinCC 儈123 WinCC V5.1 儈S7-400 CPUWinCC S7 400 S7 MPI,ProfiBus,TCP/IP,32 WinCC STEP 7 WinCC STEP 7 WinC

22、C 畝享 STEP 7 畝 Simatic 畝 CDDocumentsInstallNotes.chm WinCC STEP 7 WinCC STEP 7 享享 WinCC STEP 7STEP 7 WinCC 享33 WinCC 畝 STEP 7 畝 WinCC STEP 7 WinCC 畝 STEP 7 畝享 WinCC WinCC 傡 WinCC WinCC 僔 WinCC 畝 STEP 7 畝1. STEP 7 畝 O WinCC 畝2. STEP 7 畝 OS WinCC 畝 STEP 7 畝wincprojd:siemensSTEP7S7projSTEP7_Integrationw

23、incprojName of the OS3.畝Save as WinCC 畝 STEP 7 畝 畝畝Start SIMATIC WinCC Tools STEP 7 畝 WinCC 畝Packer WinCC 畝34wincc s7plc-sim PLCSIM 享亪STEP 7 V 5.x PLCSIM V4.x WinCC V5.x SIMATIC WinCC V5SP1 ,“”享“S7Dos”“” SIMATIC WinCC V5SP2 儈“S7Dos”“ ”畝 PG/PC “ PG/PC ” “”“MPI(WinCC)”“”“” STEP 7 SIMATIC PLCSIM畝畝畝 OS

24、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 35WINCC-:#pragma code(useadmin.dll)#include PWRT_API.H#pragma code()if (PWRTSilentLogin(username, PassWo

25、rd)/USERNAME,PASSWORD.:PWRTSilentLogin(GetTagChar(user), GetTagChar(PassWord),;,36WINCC- #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 V

26、6.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畝畝39wincc6.0 ab plc 傡WinCC V6.0 Allen

27、Bradley DH DH+ DH485 Allen Bradley Serial DF1 Applicom Multi Protocol InterfaceGE Fanuc SNP SNPXMitsubishi FX Modbus Protocol Suite Modbus SerialSIMATIC S5 PMC Ethernet SIMATIC S5 PMC Profibus SIPART OPC 40WINCC “Authorization SIK/SIMATIC WINCC RT 128 PowerTags is faulty.” authorsw manageauthorizati

28、on “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 UnionLong Dword Int Word2union Union.Dword=GetTagDword(PackageTag) SetTagWord(LTN440

29、01,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.hvoid OnLButtonDown(char* lpszPictureName,char* lpszObjectName,char* lpszPropertyName,UINT nFlags, int x, int y)char*a=C:SIEMENSCommonSQLANYISQL-q-b-

30、cUID=DBA;PWD=SQL;DBF=E:testsqltestsqlRT.DB;DBN=CC_testsql_99-12-03_12:48:26R;READE: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 cyclicarchiveBOOL cyclicarchive()#pragma code (kernel32.dll);void

31、 GetLocalTime (SYSTEMTIME* lpst);#pragma code();SYSTEMTIME time;Int t1;GetLocalTime(&time);t1=time.wMinute;if(t1=00)SetTagBit(startarchive,1);return(BOOL)(GetTagBit(startarchive); Tagloging Properties of process tagArchive Tagtab Archiving type Cycle-selectiveEventStart 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(

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論