资源预览内容
第1页 / 共2页
第2页 / 共2页
亲,该文档总共2页全部预览完了,如果喜欢就下载吧!
资源描述
www.4008104288.com.cn(填写文档类型:常问问题)P#-2www.4008104288.com.cn(填写文档类型:常问问题)P#-2在画面中如何通过一个按钮来执行登录/退出?显示订货号6AV6371-1.SIMATIC WinCC Optio nen/Powerpacks6AV6371-2.SIMATIC WinCC V7.06AV6381-1.SIMATIC WinCC Software6AV6381-2.SIMATIC WinCC V7.06AV6382-1.SIMATIC WinCC Packages说明:在画面中结合不同按钮来组态下面 C操作:Actio n for logi n (for example, mouse click even t): #pragma code (useadm in. dll)#in clude PWRT_api.h#pragma code()PWRTLogi n( c);Actio n for logout (for example, mouse click even t): #pragma code (useadm in. dll)#in clude PWRT_api.h#pragma code()PWRTLogout();PWRTLogin参数必须是CHAR字符。它指定了显示对话框的监视器。如果只使用一个监视器,那么 保留默认参数“或者指定“ 1”可以使用PASSLoginDialog函数来代替PWRTLogin或者PWRTLogout函数。这个函数需要和函数 PWRTLogin相同的参数。PWRTLogin和PASSLoginDialog函数可以调用登录界面,在上面可以登 录或者注销。函数PWRTLogout被正确执行并且不调用登录界面。正确执行后这两个函数都返回“ 1”然而,登录不会等到显示对话框之后。如果使用多个显示器,为了能使登录对话框显示在合适的显示器上,需要WinCC Basic ProcessControl (OS项目编辑器)。不使用WinCC Basic Process Control时,可以指定显示器编号,但登录对话框始终显示在第一个显关键字: 编程注意事项条目号:71087日期:2008-09-12How can you impleme nt log in/logout via a butt on in a picture? Display part nu mber6AV6371-1.SIMATIC WinCC Optio nen/Powerpacks6AV6371-2.SIMATIC WinCC V7.06AV6381-1.SIMATIC WinCC Software6AV6381-2亠LSIMATIC WinCC V7.06AV6382-1.SIMATIC WinCC PackagesIn struct ions:Con figure the followi ng C actions in a picture in comb in ati on with differe nt butt ons:Service & SupportSIEMENS? Action for logi n (for example, mouse click even t):#pragma code (useadm in. dll)#in clude PWRT_api.h#pragma code()PWRTLogi n( c);? Actio n for logout (for example, mouse click even t):#pragma code (useadm in. dll)#in clude PWRT_api.h#pragma code()PWRTLogout();The parameter for PWRTLogin must be a CHAR character. It specifies on which monitor the dialog is displayed. If you are only using one scree n, the n you can leave the default parameter c, or specify 1.Note:You can also use the fun ctio n PASSLogi nDialog in stead of the fun ctio ns PWRTLogin or PWRTLogout. This fun ctio n requires the same parameters as the PWRTLogin fun ctio n. The functions PWRTLogin and PASSLoginDialog call the login mask, where you can log in or log out. The function PWRTLogout is executed directly and does not call the login mask.Both functions return 1 if they are executed correctly. However, the login does not wait to see if the dialog is really displayed.Note:If you are using more tha n one mon itor, you n eed WinCC Basic Process Con trol(OS Project Editor), so that the Login dialog is displayed on the appropriate monitor.You can also specify a mon itor nu mber without Basic Process Con trol, but the Logi n dialog the n always appears on the first mon itor.Keywords:Program ming tipsEntry ID: 71087Date: 2008-08-15www.4008104288.com.cn(填写文档类型:常问问题)P#-2
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号