没有合适的资源?快使用搜索试试~ 我知道了~
首页SIMATIC WinCC V17 VBScript编程手册
SIMATIC WinCC V17 VBScript编程手册
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 20 下载量 31 浏览量
更新于2024-07-05
6
收藏 10.17MB PDF 举报
"TIA Portal WinCC Engineering V17 – VBS脚本编程参考手册提供了关于在SIMATIC HMI WinCC(TIA Portal)环境下使用VBScript进行脚本编程的详细指导。该手册涵盖系统手册、在线文档,以及针对VBScript、C脚本(RT Professional)和运行系统API(RT Professional)的编程信息。手册还强调了安全警示,提醒用户遵循警告提示以确保人身安全和防止财产损失。此外,手册指出产品应由合格的专业人员操作,并且只能按照Siemens的规定和推荐进行使用。"
在TIA Portal WinCC V17中,VBScript是一种强大的工具,用于创建自动化任务、数据处理和交互式用户界面。以下是一些关键知识点:
1. **VBScript基础**:VBScript是一种轻量级的脚本语言,适用于Windows环境,尤其在HMI和自动化系统中广泛使用。它基于Visual Basic语法,支持基本的数据类型、变量、控制结构(如if...then、for...next)、函数和对象。
2. **WinCC中的VBScript应用**:在WinCC工程中,VBScript可用来实现报警管理、数据记录、画面交互、用户权限控制等功能。用户可以创建自定义的脚本事件,例如在按钮点击或特定条件下执行脚本。
3. **运行时API**:RT Professional 提供的运行时API允许开发者访问更底层的系统功能,如直接与PLC通信、执行复杂的数据转换和处理等。
4. **安全性**:手册强调了安全警示的重要性,区分了不同级别的警告,包括危险、警告、小心和注意,以指导用户安全操作。对于不恰当的使用,可能会导致人身伤害或设备损坏。
5. **合格专业人员**:操作WinCC和VBScript编程的人员需具备相关资质和经验,以识别潜在风险并避免问题。
6. **Siemens产品的使用**:Siemens产品应按官方指导使用,包括正确的运输、存储、安装和维护,以确保安全和性能。第三方组件的使用需获得Siemens的许可。
7. **商标和法律事项**:手册提醒用户尊重Siemens的商标权,同时声明信息可能存在偏差,公司保留修改权利。
通过深入理解和掌握这些知识点,用户能够有效地利用TIA Portal WinCC V17的VBScript功能,提高自动化系统的效率和可靠性。同时,遵循手册中的安全指南和使用建议,能确保操作过程的安全性和合规性。
3.3.1 基本知识 (RT Professional) .......................................................................................2178
3.3.1.1 函数概览 (RT Professional) .......................................................................................2178
3.3.1.2 结构概览 (RT Professional) .......................................................................................2179
3.3.1.3 错误消息 (RT Professional) .......................................................................................2179
3.3.1.4 常数 (RT Professional) ..............................................................................................2181
3.3.1.5 对象属性列表 (A-K)(图形编辑器) (RT Professional) ...............................................2183
3.3.1.6 列出对象属性 (L-Z)(图形编辑器) (RT Professional) ................................................2196
3.3.1.7 OCX 的 API 调用 (RT Professional) ............................................................................2209
3.3.2 结构 (RT Professional) ..............................................................................................2210
3.3.2.1 LINKINFO (RT Professional) ......................................................................................2210
3.3.2.2 MULTILINK (RT Professional).....................................................................................2212
3.3.2.3 MULTILINKINFO (RT Professional) .............................................................................2213
3.3.2.4 FOCUSINFO (RT Professional)...................................................................................2214
3.3.3 常规函数 (RT Professional) .......................................................................................2215
3.3.3.1 PDLRTClosePicture (RT Professional) .........................................................................2215
3.3.3.2 PDLRTDisableClosePicture (RT Professional)..............................................................2217
3.3.3.3 PDLRTEnableClosePicture (RT Professional)...............................................................2218
3.3.3.4 PDLRTGotoPicture (RT Professional) ..........................................................................2220
3.3.3.5 PDLRTInquireFreeArea (RT Professional) ...................................................................2222
3.3.3.6 PDLRTOpenPicture (RT Professional) .........................................................................2224
3.3.3.7 PDLRTPictureNavigation (RT Professional).................................................................2226
3.3.3.8 PDLRTShowApp (RT Professional) .............................................................................2228
3.3.3.9 PDLRT_CALLBACK (RT Professional) ..........................................................................2229
3.3.4 用于调整运行系统光标的函数 (RT Professional)........................................................2231
3.3.4.1 PDLRTGetCursorKeys (RT Professional)......................................................................2231
3.3.4.2 PDLRTGetFocus (RT Professional)..............................................................................2234
3.3.4.3 PDLRTSetCursorKeys (RT Professional) ......................................................................2236
3.3.4.4 PDLRTSetFocus (RT Professional) ..............................................................................2238
3.3.5 用于处理对象属性的函数 (RT Professional)...............................................................2240
3.3.5.1 PDLRTGetDefPropEx (RT Professional).......................................................................2240
3.3.5.2 PDLRTGetPropEx (RT Professional) ............................................................................2243
3.3.5.3 PDLRTSetPropEx (RT Professional) ............................................................................2246
3.3.6 处理动态性的函数 (RT Professional) .........................................................................2251
3.3.6.1 PDLRTGetLink (RT Professional) ................................................................................2251
3.3.6.2 PDLRTSetLink (RT Professional).................................................................................2253
3.3.6.3 PDLRTSetMultiLink (RT Professional).........................................................................2256
3.4 脚本函数 (RT Professional) .......................................................................................2258
3.4.1 基本知识 (RT Professional) .......................................................................................2258
3.4.1.1 函数概览 (RT Professional) .......................................................................................2258
3.4.1.2 结构概览 (RT Professional) .......................................................................................2259
3.4.1.3 错误消息 (RT Professional) .......................................................................................2259
3.4.1.4 常数 (RT Professional) ..............................................................................................2262
3.4.2 结构 (RT Professional) ..............................................................................................2264
3.4.2.1 AP_ACT_KEY (RT Professional)..................................................................................2264
目录
WinCC Engineering V17 – 编程参考
16 系统手册, 05/2021, 在线文档
3.4.2.2 AP_ACT_RESULT_STRUCT (RT Professional) ...............................................................2266
3.4.2.3 CREATE_USER_HEADER_FILE (RT Professional) ..........................................................2267
3.4.2.4 GENERATE_COMPILE (RT Professional)......................................................................2268
3.4.2.5 GET_ACTION_STREAM (RT Professional) ...................................................................2269
3.4.3 常规函数 (RT Professional) .......................................................................................2270
3.4.3.1 APConnect (RT Professional) ....................................................................................2270
3.4.3.2 APDisconnect (RT Professional) ................................................................................2272
3.4.3.3 APSetLanguage (RT Professional) .............................................................................2275
3.4.3.4 AP_RT_PROC (RT Professional)..................................................................................2276
3.4.4 用于处理源代码的函数 (RT Professional) ..................................................................2279
3.4.4.1 APCompile (RT Professional).....................................................................................2279
3.4.4.2 APCompileEx (RT Professional) .................................................................................2281
3.4.4.3 GSCGenCompile (RT Professional) ............................................................................2284
3.4.4.4 GSCGenCompileUserFunctions (RT Professional) ......................................................2286
3.4.5 用于处理动作的函数 (RT Professional)......................................................................2287
3.4.5.1 GSCGenGetActionStream (RT Professional)...............................................................2287
3.4.6 动作编程的函数 (RT Professional).............................................................................2289
3.4.6.1 APActive (RT Professional)........................................................................................2289
3.4.6.2 APEndAct (RT Professional) ......................................................................................2291
3.4.6.3 APFreeResultStruct (RT Professional) ........................................................................2293
3.4.6.4 APInactive (RT Professional) .....................................................................................2294
3.4.6.5 APStart (RT Professional)..........................................................................................2296
3.4.6.6 APTransact (RT Professional) ....................................................................................2299
3.4.7 示例 (RT Professional) ..............................................................................................2301
3.4.7.1 建立与脚本编程的连接 (RT Professional) ..................................................................2301
3.5 用户管理的函数 (RT Professional).............................................................................2304
3.5.1 基本知识 (RT Professional) .......................................................................................2304
3.5.1.1 函数概览 (RT Professional) .......................................................................................2304
3.5.1.2 结构概览 (RT Professional) .......................................................................................2305
3.5.1.3 错误消息 (RT Professional) .......................................................................................2305
3.5.1.4 常数 (RT Professional) ..............................................................................................2307
3.5.2 结构 (RT Professional) ..............................................................................................2307
3.5.2.1 PWGEN_GROUPINFO (RT Professional)......................................................................2307
3.5.2.2 PWGEN_LEVELINFO (RT Professional) .......................................................................2308
3.5.2.3 PWGEN_USERINFO (RT Professional).........................................................................2309
3.5.3 常规函数 (RT Professional) .......................................................................................2310
3.5.3.1 PWGENConnect (RT Professional).............................................................................2310
3.5.3.2 PWGENDisconnect (RT Professional).........................................................................2311
3.5.4 用于处理用户的函数 (RT Professional)......................................................................2313
3.5.4.1 PWGENAddUser (RT Professional).............................................................................2313
3.5.4.2 PWGENAddUserEx (RT Professional) .........................................................................2315
3.5.4.3 PWGENChangePassword (RT Professional)................................................................2317
3.5.4.4 PWGENCheckUser (RT Professional)..........................................................................2318
3.5.4.5 PWGENDeleteUser (RT Professional) .........................................................................2320
目录
WinCC Engineering V17 – 编程参考
系统手册, 05/2021, 在线文档 17
3.5.4.6 PWGENEnumUsers (RT Professional).........................................................................2322
3.5.4.7 PWGEN_ENUM_USERS_CALLBACK (RT Professional)..................................................2323
3.5.5 用于处理用户组的函数 (RT Professional) ..................................................................2325
3.5.5.1 PWGENAddGroup (RT Professional) ..........................................................................2325
3.5.5.2 PWGENEnumGroups (RT Professional) ......................................................................2327
3.5.5.3 PWGEN_ENUM_GROUPS_CALLBACK (RT Professional)...............................................2328
3.5.6 用于处理授权的函数 (RT Professional)......................................................................2330
3.5.6.1 PWGENAddPermLevel (RT Professional) ....................................................................2330
3.5.6.2 PWGENCheckPermission (RT Professional) ................................................................2331
3.5.6.3 PWGENDeletePermLevel (RT Professional) ................................................................2333
3.5.6.4 PWGENEnumPermLevels (RT Professional)................................................................2334
3.5.6.5 PWGEN_ENUM_LEVELS_CALLBACK (RT Professional) ................................................2336
3.5.6.6 PWGENReadUserPerm (RT Professional)....................................................................2337
3.5.6.7 PWRTCheckPermission (RT Professional) ...................................................................2339
3.5.6.8 PWRTCheckPermissionOnPicture (RT Professional) ....................................................2340
3.5.6.9 PWRTPermissionLevelDialog (RT Professional)...........................................................2341
3.5.6.10 PWRTPermissionLevelDialogEx (RT Professional) .......................................................2342
3.5.6.11 PWRTPermissionToString (RT Professional)................................................................2343
3.5.7 用于登录、注销的函数 (RT Professional) ..................................................................2345
3.5.7.1 PWRTGetCurrentUser (RT Professional) .....................................................................2345
3.5.7.2 PWRTGetLoginPriority (RT Professional) ....................................................................2346
3.5.7.3 PWRTIsLoggedInByCard (RT Professional) .................................................................2347
3.5.7.4 PWRTLogin (RT Professional) ....................................................................................2348
3.5.7.5 PWRTLogout (RT Professional)..................................................................................2350
3.5.7.6 PWRTLogoutEx (RT Professional) ..............................................................................2351
3.5.7.7 PWRTSilentLogin (RT Professional)............................................................................2352
3.5.7.8 PWRTSilentLoginEx (RT Professional)........................................................................2354
3.5.8 示例 (RT Professional) ..............................................................................................2356
3.5.8.1 PWRT 检查许可 (RT Professional)..............................................................................2356
3.5.8.2 检查画面的某等级的权限 (RT Professional)...............................................................2358
3.5.8.3 获取与许可编号关联的字符串 (RT Professional)........................................................2359
3.5.8.4 通过指定可能出现的错误在对话框中进行授权级别查询 (RT Professional)..................2360
3.5.8.5 返回当前用户的名称 (RT Professional)......................................................................2361
3.5.8.6 查询当前登录优先级 (RT Professional)......................................................................2362
3.5.8.7 检查用户是否已通过智能卡登录 (RT Professional) ....................................................2362
3.5.8.8 PWRT 登录 - WinCC 自身提供的对话框 (RT Professional) ...........................................2364
3.5.8.9 PWRT 注销 (RT Professional).....................................................................................2365
3.5.8.10 通过优先级进行静默注销 (RT Professional)...............................................................2366
3.5.8.11 不通过对话框登录 (RT Professional) .........................................................................2367
3.5.8.12 通过优先级进行静默登录 (RT Professional)...............................................................2368
3.6 测试系统的函数 (RT Professional).............................................................................2369
3.6.1 基本知识 (RT Professional) .......................................................................................2369
3.6.1.1 函数概览 (RT Professional) .......................................................................................2369
3.6.1.2 错误消息 (RT Professional) .......................................................................................2370
目录
WinCC Engineering V17 – 编程参考
18 系统手册, 05/2021, 在线文档
3.6.1.3 语言代码 (RT Professional) .......................................................................................2372
3.6.2 常规函数 (RT Professional) .......................................................................................2373
3.6.2.1 TXTCloseProject (RT Professional).............................................................................2373
3.6.2.2 TXTGetMaxTextID (RT Professional) ..........................................................................2375
3.6.2.3 TXTOpenProject (RT Professional).............................................................................2376
3.6.2.4 TXTRTConnect (RT Professional) ..............................................................................2378
3.6.2.5 TXTRTDisconnect (RT Professional)...........................................................................2379
3.6.3 用于处理信息文本的函数 (RT Professional)...............................................................2381
3.6.3.1 TXTEnumInfoText (RT Professional) ..........................................................................2381
3.6.3.2 TXT_ENUM_INFOTEXTS_PROC (RT Professional)........................................................2383
3.6.3.3 TXTUpdateRuntime (RT Professional)........................................................................2384
3.6.3.4 TXTRTGetInfoText (RT Professional) ..........................................................................2386
3.6.3.5 TXTRTGetInfoTextMC (RT Professional) .....................................................................2387
3.6.4 用于处理语言的函数 (RT Professional)......................................................................2389
3.6.4.1 TXTEnumLanguages (RT Professional)......................................................................2389
3.6.4.2 TXT_ENUM_LANGUAGES_PROC (RT Professional) .....................................................2391
3.6.4.3 TXTGetFont (RT Professional) ...................................................................................2393
3.6.4.4 TXTShowLanguagesDialog (RT Professional).............................................................2395
3.6.4.5 TXTRTGetLanguageID (RT Professional) ....................................................................2397
3.6.4.6 TXTRTSetLanguage (RT Professional)........................................................................2398
3.6.5 示例 (RT Professional) ..............................................................................................2400
3.6.5.1 获取信息文本 (RT Professional) ................................................................................2400
3.6.5.2 枚举信息文本 (RT Professional) ................................................................................2403
3.7 报表系统函数 (RT Professional) ................................................................................2405
3.7.1 基本知识 (RT Professional) .......................................................................................2405
3.7.1.1 函数概览 (RT Professional) .......................................................................................2405
3.7.1.2 常数 (RT Professional) ..............................................................................................2406
3.7.1.3 错误消息 (RT Professional) .......................................................................................2409
3.7.1.4 对象属性列表 (RT Professional) ................................................................................2410
3.7.1.5 处理打印作业属性的一般步骤(报表编辑器) (RT Professional)................................2416
3.7.2 用于建立连接的函数 (RT Professional)......................................................................2420
3.7.2.1 RPJAttach (RT Professional) ......................................................................................2420
3.7.2.2 RPJDetach (RT Professional)......................................................................................2421
3.7.2.3 RPJMemFree (RT Professional)..................................................................................2422
3.7.3 用于处理项目属性的函数 (RT Professional)...............................................................2423
3.7.3.1 RPJGetNumProjectProperties (RT Professional)..........................................................2423
3.7.3.2 RPJGetProjectPropertyAt (RT Professional) ................................................................2424
3.7.3.3 RPJGetProjectProperty (RT Professional)....................................................................2426
3.7.3.4 RPJProjectLock (RT Professional) ...............................................................................2428
3.7.3.5 RPJProjectUnlock (RT Professional) ...........................................................................2429
3.7.3.6 RPJProjectUnlockAll (RT Professional)........................................................................2431
3.7.4 用于处理打印作业的函数 (RT Professional)...............................................................2432
3.7.4.1 RPJCreateJob (RT Professional) .................................................................................2432
3.7.4.2 RPJDeleteJob (RT Professional) .................................................................................2433
目录
WinCC Engineering V17 – 编程参考
系统手册, 05/2021, 在线文档 19
3.7.4.3 RPJCreatePropertyHandle (RT Professional)...............................................................2435
3.7.4.4 RPJDeletePropertyHandle (RT Professional)...............................................................2437
3.7.4.5 RPJGetJobNameAt (RT Professional) .........................................................................2438
3.7.4.6 RPJGetNumJobs (RT Professional).............................................................................2440
3.7.4.7 RPJJobLock (RT Professional) ....................................................................................2441
3.7.4.8 RPJJobUnlock (RT Professional).................................................................................2443
3.7.4.9 RPJJobUnlockAll (RT Professional).............................................................................2445
3.7.5 用于处理打印作业方法的函数 (RT Professional)........................................................2446
3.7.5.1 RPJCallJobMethod (RT Professional)..........................................................................2446
3.7.5.2 RPJGetJobMethodAt (RT Professional).......................................................................2448
3.7.5.3 RPJGetNumJobMethods (RT Professional) .................................................................2449
3.7.6 用于处理打印作业方法的函数 (RT Professional)........................................................2450
3.7.6.1 RPJGetJobPropertyAt (RT Professional)......................................................................2450
3.7.6.2 RPJGetJobProps (RT Professional) .............................................................................2452
3.7.6.3 RPJGetNumJobProperties (RT Professional) ...............................................................2454
3.7.6.4 RPJGetProperty (RT Professional) ..............................................................................2455
3.7.6.5 RPJPropertyClear (RT Professional)............................................................................2458
3.7.6.6 RPJSetProperty (RT Professional)...............................................................................2459
3.7.7 示例 (RT Professional) ..............................................................................................2464
3.7.7.1 获取打印作业方法名称 (RT Professional) ..................................................................2464
3.7.7.2 获取打印作业名称 (RT Professional) .........................................................................2467
3.7.7.3 获取打印作业属性 (RT Professional) .........................................................................2470
3.7.7.4 修改打印作业属性 (RT Professional) .........................................................................2473
3.7.7.5 显示打印作业预览 (RT Professional) .........................................................................2478
3.8 变量和日志函数 (RT Professional).............................................................................2481
3.8.1 基本知识 (RT Professional) .......................................................................................2481
3.8.1.1 函数概览 (RT Professional) .......................................................................................2481
3.8.1.2 结构概览 (RT Professional) .......................................................................................2483
3.8.1.3 错误消息 (RT Professional) .......................................................................................2484
3.8.1.4 常数 (RT Professional) ..............................................................................................2486
3.8.2 结构 (RT Professional) ..............................................................................................2501
3.8.2.1 TLG_ARCHIV_STR (RT Professional) ...........................................................................2501
3.8.2.2 TLG_ARCHIVDATARAW (RT Professional) ...................................................................2504
3.8.2.3 TLG_BACKUP_TABLE_INFO (RT Professional) .............................................................2508
3.8.2.4 TLG_CURVESCALEX (RT Professional)........................................................................2510
3.8.2.5 TLG_CURVESCALEY (RT Professional)........................................................................2515
3.8.2.6 TLG_GETARCHIVDATA (RT Professional).....................................................................2519
3.8.2.7 TLG_IO_BACKUP_SELECT (RT Professional)................................................................2520
3.8.2.8 TLG_PROT_CURVE_INFOS (RT Professional)...............................................................2521
3.8.2.9 TLG_SCAL_STR (RT Professional)...............................................................................2523
3.8.2.10 TLG_TABLE_INFO (RT Professional) ...........................................................................2524
3.8.2.11 TLG_TABLESCALE (RT Professional)...........................................................................2526
3.8.2.12 TLG_TEMPLATEITEM_INFO (RT Professional) .............................................................2529
3.8.2.13 TLG_TIME_STR (RT Professional)...............................................................................2531
目录
WinCC Engineering V17 – 编程参考
20 系统手册, 05/2021, 在线文档
剩余2977页未读,继续阅读
2011-05-18 上传
2019-03-21 上传
2021-08-14 上传
2020-07-08 上传
2023-07-31 上传
2023-07-31 上传
214 浏览量
2021-07-05 上传
AAA_自动化工程师
- 粉丝: 7024
- 资源: 3445
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- C语言数组操作:高度检查器编程实践
- 基于Swift开发的嘉定单车LBS iOS应用项目解析
- 钗头凤声乐表演的二度创作分析报告
- 分布式数据库特训营全套教程资料
- JavaScript开发者Robert Bindar的博客平台
- MATLAB投影寻踪代码教程及文件解压缩指南
- HTML5拖放实现的RPSLS游戏教程
- HT://Dig引擎接口,Ampoliros开源模块应用
- 全面探测服务器性能与PHP环境的iprober PHP探针v0.024
- 新版提醒应用v2:基于MongoDB的数据存储
- 《我的世界》东方大陆1.12.2材质包深度体验
- Hypercore Promisifier: JavaScript中的回调转换为Promise包装器
- 探索开源项目Artifice:Slyme脚本与技巧游戏
- Matlab机器人学习代码解析与笔记分享
- 查尔默斯大学计算物理作业HP2解析
- GitHub问题管理新工具:GIRA-crx插件介绍
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功