WinCC flexible2008系统内部函数
- 格式:pdf
- 大小:308.50 KB
- 文档页数:15
WinCC部分函数说明凡是C与VB脚本函数名称一样的是实现一样的功能,只是调用环境不一样以下是部分CAPI1、int soundonce(char *src)//声音播放,仅仅播放一次,未使用src=声音文件位置2、void ccsleep(float sec) //暂停一段时间sec=时间S3、int ccGetPicStr(char *DesStr, char *SourPrefix, char *SourStrem, char *SourFomat) //生成图片的地址DesStr=生成后的地址SourPrefix=源前缀SourStrem=图片名称SourFomat=格式以下是部分VB函数说明,没有涉及到的请参照同名C函数的注释说明1、is_Correct_Pre_Visible(Byval pre_loc,Byval cur_val) ''用来修正一种情况的显示错误Pre_loc=前一轮出的牌位置Cur_loc=当前出的牌位置以下请自行参照源代码中的注释1、实现声音播放:SendSound、SendGetSound、SendUngetSound、GetSound2、实现牌面动态布局:GetGroupLeftByObj动作以及其他未涉及到函数的说明请参照源码中的注释PLC端部分函数、函数块说明(依次)1、未使用,2、产生一个随机整数3、等待一小段时间(西门子有提供标准块)(请注意该函数与硬件挂钩不基于时间单位)4、识别牌类型5、摸牌6、手牌转换成选中的牌7、判定是否是双已经连对并返回和8、判定是否是四带二并返回和(含飞机)9、判定是否是顺子并返回和10、判定是否是三带一并返回和(含飞机)11、判定是否是三不带并返回和(含飞机)12、抓牌调用了513、选中牌转换成手牌(14、选中牌转换成当前出牌15、洗牌16、排序从小到大。
WinCC flexible 2008 SP5 Update 1 Readme05/2018Legal informationWarning notice systemThis manual contains notices you have to observe in order to ensure your personal safety, as well as to preventdamage to property. The notices referring to your personal safety are highlighted in the manual by a safety alertsymbol, notices referring only to property damage have no safety alert symbol. These notices shown below aregraded according to the degree of danger.DANGERindicates that death or severe personal injuryWARNINGindicates that death or severe personal injury may result if proper precautions are not taken.CAUTIONindicates that minor personal injury can result if proper precautions are not taken.NOTICEindicates that property damage can result if proper precautions are not taken.If more than one degree of danger is present, the warning notice representing the highest degree of danger will beused. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to propertydamage.Qualified PersonnelThe product/system described in this documentation may be operated only by personnel qualified for the specifictask in accordance with the relevant documentation, in particular its warning notices and safety instructions. Qualifiedpersonnel are those who, based on their training and experience, are capable of identifying risks and avoidingpotential hazards when working with these products/systems.Proper use of Siemens productsNote the following:WARNINGSiemens products may only be used for the applications described in the catalog and in the relevant technicaldocumentation. If products and components from other manufacturers are used, these must be recommended orapproved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation andmaintenance are required to ensure that the products operate safely and without any problems. The permissibleambient conditions must be complied with. The information in the relevant documentation must be observed. TrademarksAll names identified by ® are registered trademarks of Siemens AG. The remaining trademarks in this publicationmay be trademarks whose use by third parties for their own purposes could violate the rights of the owner. Disclaimer of LiabilityWe have reviewed the contents of this publication to ensure consistency with the hardware and software described.Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the information inthis publication is reviewed regularly and any necessary corrections are included in subsequent editions.Siemens AGDivision Digital FactoryPostfach 48 4890026 NÜRNBERGGERMANYⓅ 05/2018 Subject to changeCopyright © Siemens AG 2018.All rights reservedTable of contents1Validity (5)2Solved problems (7)3Installation (11)WinCC flexible 2008 SP5 Update 1Readme, 05/20183Table of contentsWinCC flexible 2008 SP5 Update 1 4Readme, 05/2018Validity1 ValidityThis update is valid for the following WinCC flexible editions:●WinCC flexible 2008 SP5InstallationTo install the update, please follow the instructions in the chapter "Installation".WinCC flexible 2008 SP5 Update 1Readme, 05/20185ValidityWinCC flexible 2008 SP5 Update 1 6Readme, 05/2018Solved problems2 This update contains the following improvements:Empty graphic list entries cause errors during printingWhen there was no graphic in a graphic list entry, it was not possible to create the projectdocumentation.Info texts in WinCC flexibleWith some HMI devices, the maximum number of characters permitted for an information textwas too low.Generator: Project files that are too large prevent transferWith some HMI devices, the generated project could become unusually large so that, in somecircumstances, it was no longer possible to transfer the project.Texts in faceplate instances not editable after migrationAfter the migration of a project, it was no longer possible to edit the texts of faceplate instancesdefined at the interface.STEP 7 integrationAfter ProSave had been uninstalled, it sometimes occurred that the STEP 7 integration nolonger functioned without errors because, under some circumstances, a commonly usedruntime library was also uninstalled.Mobile Panels IWLAN V2The EU image for Mobile Panels IWLAN V2 is not included in WinCC flexible. You can onlytransfer the image present in WinCC flexible to non-EU devices.However, you can download the EU image for Mobile Panels IWLAN V2 from SIOS.After the introduction of the new EU article numbers, the associated image which enablesoperation of Mobile Panels IWLAN V2 is made available.The following individual IWLAN EU devices are supported:●Mobile Panel 277 8" IWLAN V2●Mobile Panel 277F 8" IWLAN V2●Mobile Panel 277F 8" IWLAN (RFID Tag)WinCC flexible 2008 SP5 Update 1Readme, 05/20187Solved problemsYou need to select version 1.4.0.0 under "Device selection > Version of the HMI device".Selecting version 1.5.0.0 will result in a bad configuration of the HMI device.The product announcement "EU order numbers for Mobile Panel 277(F) IWLAN" waspublished under entry ID 109745667 (https:///cs/document/109745667/eu-order-numbers-for-mobile-panel-277(f)-iwlan?dti=0&lc=en-WW) for which theEU image is made available for download under entry ID 109746331 (https:///cs/document/109746331/images-for-mobile-panel-277(f)-iwlan?dti=0&lc=en-WW).You can find the corresponding product information documents online in the Product Support(https:// (https:///cs/start?lc=en-WW)):●Product information "Radio operation within the EU": 109745797 (https:///cs/document/109745797/simatic-hmi-radio-operation-within-the-eu?dti=0&lc=en-WW)●Product information "Radio operation outside the EU": 109745796 (https:///cs/document/109745796/simatic-hmi-radio-operation-outside-the-eu?dti=0&lc=en-WW)●Product information "HMI Device Images for Download in SIOS": 109748151 (https:///cs/document/109748151/simatic-hmi-mobile-panel-277-iwlan-v2-mobile-panel-277f-iwlan-v2-mobile-panel-277f-iwlan-(rfid-tag)-hmi-device-images-for-download-in-sios?dti=0&lc=en-WW)You can find additional information under Industry Support (https:///cs/document/109746331/images-for-mobile-panel-277(f)-iwlan?dti=0&lc=en-WW).Transfer to IWLAN devicesIn 1.5.0.1, you can transfer IWLAN devices with the device versions 1.4.0.0 and 1.5.0.0.If you transfer alternately to a 1.4 and 1.5 device, it can occur sporadically that transfer is nolonger possible.SolutionRestart WinCC flexible if autostart is disabled in the Start Center or end the processTransferTool.exe.Use of Asian fonts●When using Asian fonts, it can occur that various characters are not displayed in Runtime,especially with the "SimSun" font. This problem occurs more often with Windows 10.●When using an Asian locale, in particular the "Chinese (Simplified, PRC)" locale (can beset under "Control Panel > Region and Language > Administrative > Language for non-Unicode programs") and depending on the software installed in parallel, Asian fonts maynot be transferred in full size or at all into CE Runtime. This may cause Runtime to abortwith an error or result in the project not being transferred due to the large file size.In this context, problems with Basic Runtime can also occur if there are characters in theproject path that do not match the current locale. With the "Chinese (Simplified, PRC)"locale, for example, these may be characters such as "ä", "ö", "ü" or "ß".WinCC flexible 2008 SP5 Update 1 8Readme, 05/2018Solved problems●It may be possible to configure the reserved font "WinCC_flexible_smart" if the TIA Portalis installed in parallel. This should not be possible. Instead, only the "WinCC_flexible" fontmay be offered.●The following fonts may be missing, depending on the software installed in parallel:–Siemens AD Sans–Siemens Logo–Siemens Sans–Siemens Sans Global–Siemens Sans SC–Siemens Serif–Siemens Serif SC–Siemens Serif SC Semi–Siemens Slab–Siemens Slab SC–WinCC_flexible–WinCC_flexible_high●Internal generation errors may occur when using the "WinCC_flexible" or"WinCC_flexible_smart" fonts, if they are available.SQL ServerDuring startup of the PC or start of WinCC flexible 2008 SP5, an error message sporadicallyappears that no connection to Microsoft SQL Server 2014 Express can be established. Whenthis occurs, WinCC flexible 2008 SP5 projects can no longer be started from STEP 7. Theseproblems have required manual intervention of the user up to now.The patch corrects a problem with the SQL Server "user instance" that has already beendiscontinued by Microsoft. In it, instead of Microsoft SQL Server 2014 Express, the LocalDBvariant of the SQL Server 2014 Express is used. The independent LocalDB variant of the SQLServer does not require the "SQL Server (WINCCFLEX2014)" service, which is prone to errorsin user instances, and no longer requires administrator rights.RoutingIf transfer via routing is available and active for the current configuration, the project cannotbe transferred due to a validation problem.WinCC flexible 2008 SP5 Update 1Readme, 05/20189Solved problemsWinCC flexible 2008 SP5 Update 1 10Readme, 05/2018Installation3 RequirementsThis update requires one of the following WinCC flexible installations:●WinCC flexible 2008 SP5Install the update on your configuration PC.ProcedureTo install the update, proceed as follows:1.Double-click on the "WinCCflexible2008_SP5_Upd1.exe" file.2.Select "C:\WinCCflexible2008_SP5_Upd1" as the installation directory in the "WinZip Self-Extractor" dialog.3.Enable "When done unzipping open .\setup.exe" and exit the dialog by clicking "Unzip".4.Open your project on the configuration PC.5.Execute a full compilation with the menu command "Project > Compiler > Rebuild All...".6.Transfer the project to the HMI device once again.WinCC flexible 2008 SP5 Update 1Readme, 05/201811InstallationWinCC flexible 2008 SP5 Update 1 12Readme, 05/2018。
WinCC系统函数1.activaterightscreen应用将画面切换到与激活画面同一层级的右侧的画面。
如果当前画面的右侧没有其它画面,则不发生画面切换。
表明必须已经在“画面浏览”编辑器中组态了一个浏览结构。
语法activaterightscreen在脚本中是否可用:有(activaterightscreen)参数--2.activaterootscreen应用领域将画面切换到定义为起始画面的画面。
如果所表明的画面就是根画面,则不能出现画面转换。
说明必须已经在“画面下载”编辑器中组态了一个下载结构。
语法activaterootscreen在脚本中与否需用:存有(activaterootscreen)参数--3.activatescreen应用将画面转换至选定的画面。
使用“activatescreenbynumber”系统函数可以从根画面切换到永久性窗口,反之亦然。
语法activatescreen(screenname,objectnumber)在脚本中与否需用:存有(activatescreen)参数screenname要切换到的画面的名称。
objectnumber画面转换后在选定画面中赢得焦点的操作员控件元素。
操作员控件元素的编号在组态期间采用tab顺序确认。
在选定为“0”时:如果调用该系统函数时焦点位于永久性窗口,则永久性窗口保留焦点。
如果调用该系统函数时焦点位于根画面,则指定画面中的第一个操作员控件元素获得焦点。
表明如果将“到达边界”事件分配给“activatescreen”系统函数,则只有数值“0”对“objectnumber”参数有效。
活动对象不是由对象号定义的,而是由画面更改之前其x位置定义的。
4.activatescreenbynumber应用领域根据变量值将画面切换到另一画面。
画面由其画面号标识。
语法activatescreenbynumber(screennumber,objectnumber)在脚本中与否需用:存有(activatescreenbynumber)参数screennumber涵盖必须转换至的画面号的变量。
WinCC flexible系统涵数简介下列表格显示了按组排列的可用系统函数。
在WinCC flexible 中,下列名称惯例应用于系统函数:以动词(例如“Start”或“Activate”)开头的系统函数可以用在脚本中。
以“Get”开头的系统函数用于读取值,例如从变量中读取。
以“Set”或“Write”开头的系统函数用于写入值,例如写入到变量中。
以ActiveX 控件的名称(例如HTMLBrowser)开头的系统函数不能在脚本中使用。
在脚本中使用系统函数请在脚本中使用系统函数的英文名称。
如果该系统函数可以在脚本中使用,那么该系统函数的英文名称也可以找到,例如:GetPassword (Tag)报警1、ClearAlarmBuffer应用:删除HMI设备报警缓冲区中的报警。
说明:尚未确认的报警也被删除。
2、ClearAlarmBufferProtoolLegacy应用:该系统函数用来确保兼容性。
它具有与系统函数“ClearAlarmBuffer”相同的功能,但使用旧的ProTool编号方式。
参数:Alarm class number将要删除其消息的报警类别号:-1 (hmiAllProtoolLegacy) = 所有报警/事件0 (hmiAlarmsProtoolLegacy) = 错误1 (hmiEventsProtoolLegacy) = 警告2 (hmiSystemProtoolLegacy) = 系统事件3 (hmiS7DiagnosisProtoolLegacy) = S7 诊断事件3、SetAlarmReportMode应用:确定是否将报警自动报告到打印机上。
4、ShowAlarmWindow应用:隐藏或显示HMI 设备上的报警窗口。
5、ShowSystemAlarm应用:将已传递参数的值显示为HMI 设备上的系统报警。
编辑位1、InvertBit应用:对给定的“Bool”型变量的值取反。
winccflexible 2008的问题
我的屏是tp177bpn/dpplc是s7-314c-2dp
现在要实现一功能,描述如下
1.有15个阀,做在流程图上,阀是以图形表示,点击其中任意一个阀图形弹出的对话框都是同一个,上面有手动和自动选择,开合关选择。
开合关需要在手动时才有效。
还有指示灯,当这个阀动作时亮(不管是手动还是自动)。
还有文本显示,当选择阀1就显示阀1,选择阀5就切换的阀5。
问题补充:
不过好像没有完全理解问题。
要问的是调用同一个画面,对应不动得点
图片说明:1,实际图
最佳答案
可以。
在相应阀的位置上,放上透明方式的换页按钮。
这样当按下相应位置阀时会将画面切换到相应页面。
wincc - 函数在WinCC的全局脚本里有几种函数专门是用来提取(GetTag 函数)和设置函数值(SetTag 函数)的。
这里的列表给出了不同的函数及它们的功能: SetTag 函数:SetTagxxx此函数给作业赋予一个值去写,然后立即返回到调用函数。
它并不等到值实际写好后再返回。
该调用的明显特点是:? ? ?此调用比较快。
调用函数并不清楚这个值实际是在何时写的。
该函数也不提供写作业状态的有关信息。
SetTagxxxWait此函数给作业赋予一个值去写,但是只有当值已经写好后才返回到调用函数。
该调用的明显特点是:? ? ?该调用慢于SetTagxxx。
其实际速度取决于通道和PLC的其它因素。
调用后值已经实际写好。
该函数不提供写作业状态的有关信息。
SetTagxxxState此函数具有SetTagxxx相同的特点。
另外,SetTagxxxState函数还提供写作业的状态的信息。
由于状态永远是内部提供的,故相比于SetTagxxx性能上没有什么差别。
SetTagxxxStateWait此函数具有与SetTagxxxWait相同的特点。
但是SetTagxxxStateWait函数还提供了写作业的状态信息。
由于状态永远是内部提供的,故相比于SetTagxxxWait性能上没有什么差别。
SetTagxxxStateWait与SetTagxxxState这两个函数间的差别与 SetTagxxxWait与SetTagxxx这两个函数间的差别相对应。
注意:当写过程结束时只能给出某些状态。
SetTagMultiWait此函数的特点与SetTagxxxWait相同。
但是它也提供在一个作业里发出多个写作业的选件。
GetTag 函数:GetTagxxx当此函数被调用时变量被注册下来。
然后变量受到PLC的周期性请求。
注册的周期取决于触发器(参看下面的叙述)。
使用GetTagxxx调用,提供了WinCC中的可用值。
wincc flexble 2008 设置参数数据保存问
题
使用S7-300CPU,带存储卡,里面用到一个DB数据块,DB数据块在属性里已设置掉电保持,但断电后在WINCC 里设置的参数就变为0了,每次断电后都要重新设置。
请解答。
问题补充:
我知道默认是掉电保持的1:(我在WINCC实例中用的是,类型,模式为输入,数据DB8.DBD82,设定的是一个温度设定值),断电后数据为0。
2:我另外还有一个温度设定值为MD4,类型模式为输入,输出,在PLC设定掉电保持,断电后数据不会掉。
最佳答案
断电后恢复后你在PLC中查看DB块中的数据是否保持住了。
关于Wincc的C函数(6)关于Wincc的C函数(6)二、内部函数内部函数用来画图形对象和使归档动态化,并用于项目函数、标准函数和全局脚本动作中。
在整个项目中都识别内部函数。
既不能创建新的内部函数,也不能修改已存在的内部函数。
1. allocate保留和释放工作存储器空间的函数void SysFree(void* lpFree)函数,通过SysMalloc函数释放保留的存储器区域。
参数lpFree,指向通过SysMalloc函数保留的存储器区域的指针。
2. void* SysMalloc(unsigned long int size)函数,为动作保留存储器空间。
存储器区域被分配给该动作。
已完成动作和已传送结果时,系统再次释放存储器。
SysFree函数可用来过早释放保留的存储器空间。
参数size,按字节计算的存储器区域的大小。
3. c_bib函数组c_bib包含来自C库的C函数Graphics - 简短描述使用Graphics组中的函数可以修改或调用WinCC对象的图形属性。
Axes - 简短描述Axes组中的函数仅用于棒图对象。
该函数可用来修改或调用各种棒图对象属性。
1. BOOL GetAlignment(LPCTSTR lpszPictureName, LPCTSTR lpszObjectName)函数,使用棒图对象时,它指明文本在棒图的左面还是右面。
读出棒图对象的布尔型属性的实例{BOOL bscaling;//获得标尺状态 bscaling= GetScaling(lpszPictureName,"Bar1");if (bscaling){// 自定义代码// 棒图对象有一个附加的标尺...}else{// 自定义代码// 棒图对象没有附加的刻度...}}GetScaling函数参数:“lpszPictureName”是在其中组态该对象的画面的名称。
“Bar1”是该对象的名称。
WinCC flexible系统涵数简介下列表格显示了按组排列的可用系统函数。
在 WinCC flexible 中,下列名称惯例应用于系统函数:以动词(例如“Start”或“Activate”)开头的系统函数可以用在脚本中。
以“Get”开头的系统函数用于读取值,例如从变量中读取。
以“Set”或“Write”开头的系统函数用于写入值,例如写入到变量中。
以 ActiveX 控件的名称(例如HTMLBrowser)开头的系统函数不能在脚本中使用。
在脚本中使用系统函数请在脚本中使用系统函数的英文名称。
如果该系统函数可以在脚本中使用,那么该系统函数的英文名称也可以找到,例如: GetPassword (Tag) 报警1、ClearAlarmBuffer 应用:删除HMI设备报警缓冲区中的报警。
说明:尚未确认的报警也被删除。
2、ClearAlarmBufferProtoolLegacy 应用:该系统函数用来确保兼容性。
它具有与系统函数“ClearAlarmBuffer”相同的功能,但使用旧的ProTool编号方式。
参数:Alarm class number 将要删除其消息的报警类别号: -1 (hmiAllProtoolLegacy) = 所有报警/事件 0 (hmiAlarmsProtoolLegacy) = 错误1 (hmiEventsProtoolLegacy) = 警告2 (hmiSystemProtoolLegacy) = 系统事件3 (hmiS7DiagnosisProtoolLegacy) = S7 诊断事件3、SetAlarmReportMode 应用:确定是否将报警自动报告到打印机上。
4、ShowAlarmWindow 应用:隐藏或显示 HMI 设备上的报警窗口。
5、ShowSystemAlarm 应用:将已传递参数的值显示为 HMI 设备上的系统报警。
编辑位1、InvertBit 应用:对给定的“Bool”型变量的值取反。
版本 和STEP7 Micro WIN wincc flexible2008 SP4 chinese版本4.0.9的安装和调试过程Contents前言: (2)1、wincc flexible2008 SP4 chinese简介 (2)2、STEP7 Micro WIN 4.0.9软件软件简介 (2)触摸屏))硬件平台的选型和搭建 (3)HMI((触摸屏1.PLC和HMI1.1PLC硬件的选型 (3)1.2HMI触摸屏的选型 (3)1.3网络总线连接器的选型 (3)2. PLC和HMI编程软件平台的安装 (4)2.1 PLC STEP 7- Micro/WIN V 4.0.9.25的下载和安装 (4)2.2 HMI 编程软件flexible 2008 SP4下载及安装 (6)3. PLC和HMI的硬件连接和软件设置 (8)3.1PLC和HMI系统连接框图 (8)PLC编程通过Port0口;和触摸屏通讯通过port1口,采用编程和通讯分开方案,可以解决频繁插拔编程和通讯电缆的问题;也可以只用一个port0作为编程口和hmi通讯口方案。
(8)下面讲述的是编程和通讯分开方案: (8)3.2 PLC编程软件的设置 (9)3.3 flexible 2008 SP4 china版本的软件设置 (10)4.难点和注意点总结: (14)前言::前言1、wincc flexible2008 SP4 chinese简介A、wincc flexible2008 SP4是什么?Wincc flexible 2008 sp4是西门子下位机触摸屏的开发集成环境,即为取代传统电气面板上的开关和显示指示灯而开发的人机界面(HMI),如果不涉及到动画和其他复杂功能的话,基本不涉及到使用代码型的编程语言问题,主要编程方法是:设置前面板控件和PLC内部变量的映射关系,所以说编程下位机触摸屏的前提是已经编辑好了plc程序即plc程序的内部和触摸屏对应的变量已经定义好了(也可以先定义触摸屏的控件的变量映射,但是一般不符合设计的顺序);一般是plc编程开发环境软件(STEP7 Micro WIN 4.0.9)和下位机触摸屏开发集成环境软件(winccflexible2008 SP4)同时打开,交替使用(即先定义PLC变量,后定义触摸屏控件)。
WinCC Flexible 2008 变量表格结构WinCC Flexible 2008 是一款用于可编程逻辑控制器(PLC)和人机界面(HMI)的软件平台,它提供了强大且易于使用的功能,用于构建和管理工业自动化系统。
其中,变量表格结构是WinCC Flexible 2008 中一个重要的特性,它提供了一个友好的界面,用于管理和监视PLC 中的数据变量。
一、概述变量表格结构是WinCC Flexible 2008 中的一个数据管理功能,用于显示和配置PLC 中的变量。
它通过一个表格的形式,列出了PLC 中的各个变量以及相关的属性,如名称、数据类型、地址等。
这样,用户可以方便地查看和编辑PLC 中的变量信息。
二、变量表格的功能特点1. 显示变量信息:变量表格可以展示PLC 中的各个变量,包括输入变量、输出变量和内部变量。
用户可以通过表格直观地了解到变量的名称、数据类型、地址等相关信息。
2. 变量配置:用户可以对变量进行配置,包括命名、分组、数据类型设置等。
通过变量表格,用户可以快速、准确地对PLC 中的变量进行设置。
3. 批量修改:变量表格支持批量修改功能,用户可以选择多个变量,使用相同的配置进行批量修改。
这样,用户可以提高工作效率,减少重复的操作。
4. 变量监视:变量表格不仅可以显示变量的静态信息,还可以在运行时监视变量的实时数值。
用户可以开启变量表格的监视功能,实时观察PLC 中变量的变化,以便及时发现问题。
三、变量表格的使用方法变量表格在WinCC Flexible 2008 中的使用非常简单,只需要按照以下步骤进行操作:1. 打开WinCC Flexible 2008 软件,并创建一个新的项目。
2. 在项目中添加PLC 连接,选择对应的PLC型号和通信接口。
3. 在PLC 连接下方的“数据”选项卡中,选择“变量表格”选项。
4. 系统将自动列出PLC 中的变量,并显示其名称、数据类型等信息。
第一部分 标准函数一、Alarm - 简短描述Alarm组包含控制WinCC报警控件的函数。
标准函数可用于工具栏中的每一个按钮。
这些函数可用来创建自定义工具栏,例如选择画面,或者定义控件上的设置。
1.void AcknowledgeMessage(DWORD MsgNr)函数,确认消息系统中带编号的消息,该编号被传递为参数。
使用标准函数操作WinCC报警控件的实例{//确认选择的报警记录消息AcknowledgeMessage(GetTagWord("U08i_MsgNr"));}指定待确认的消息号。
在本例中是从变量读取的。
2.BOOL AXC_OnBtnArcLong(char* lpszPictureName, char* pszMsgWin)函数,在消息窗口中该函数表示消息存储在长期归档中。
使用标准函数操作WinCC报警控件的实例{// 跳转到WinCC报警控件中的第一条消息AXC_OnBtnMsgFirst("gs_alarm_00","Control1");}AXC_OnBtnMsgFirst函数参数:“gs_alarm_00”是在其中组态WinCC报警控件的画面的名称。
Control 1是WinCC报警控件的对象名。
3.BOOL AXC_OnBtnArcShort(char* lpszPictureName, char* pszMsgWin)函数,在消息窗口中该函数表示消息存储在短期归档中。
使用标准函数操作WinCC报警控件的实例{// 跳转到WinCC报警控件中的第一条消息AXC_OnBtnMsgFirst("gs_alarm_00","Control1");}AXC_OnBtnMsgFirst函数参数:“gs_alarm_00”是在其中组态WinCC报警控件的画面的名称。
Control 1是WinCC报警控件的对象名。
SIMATIC HMIWinCC flexible 2008 Compact / Standard / Advanced系统手册07/2008安全技术提示为了您的人身安全以及避免财产损失,必须注意本手册中的提示。
人身安全的提示用一个警告三角表示,仅与财产损失有关的提示不带警告三角。
警告提示根据危险等级由高到低如下表示。
危险表示如果不采取相应的小心措施,将会导致死亡或者严重的人身伤害。
警告表示如果不采取相应的小心措施,可能导致死亡或者严重的人身伤害。
小心带有警告三角,表示如果不采取相应的小心措施,可能导致轻微的人身伤害。
小心不带警告三角,表示如果不采取相应的小心措施,可能导致财产损失。
注意表示如果不注意相应的提示,可能会出现不希望的结果或状态。
当出现多个危险等级的情况下,每次总是使用最高等级的警告提示。
如果在某个警告提示中带有警告可能导致人身伤害的警告三角,则可能在该警告提示中另外还附带有可能导致财产损失的警告。
合格的专业人员仅允许安装和驱动与本文件相关的附属设备或系统。
设备或系统的调试和运行仅允许由合格的专业人员进行。
本文件安全技术提示中的合格专业人员是指根据安全技术标准具有从事进行设备、系统和电路的运行,接地和标识资格的人员。
按规定使用请注意下列说明:警告设备仅允许用在目录和技术说明中规定的使用情况下,并且仅允许使用西门子股份有限公司推荐的或指定的其他制造商生产的设备和部件。
设备的正常和安全运行必须依赖于恰当的运输,合适的存储、安放和安装以及小心的操作和维修。
商标所有带有标记符号 ® 的都是西门子股份有限公司的注册商标。
标签中的其他符号可能是一些其他商标,这是出于保护所有者权利的目地由第三方使用而特别标示的。
责任免除我们已对印刷品中所述内容与硬件和软件的一致性作过检查。
然而不排除存在偏差的可能性,因此我们不保证印刷品中所述内容与硬件和软件完全一致。
印刷品中的数据都按规定经过检测,必要的修正值包含在下一版本中。
wincc怎么用内部变量使用函数
wincc 怎么用内部变量使用函数
我建了3个内部变量111,222,333然后
在wincc项目函数内建立了个函数:
#pragmaoption(mbcs)
floatmaft(inta,intb,intc)
{
c=a+b;
a=a-1;
b=b+1;
return0;
}
然后在动作脚本里调用函数maft(“111”,”222”,”333”);
可是提示我类型不对,应该怎么使用呢
问题补充:
我现在在动作脚本里改成这样还是不行,触发为250ms,没有错误,但是变量不计算,该怎么做?
intx,y,z;
x=gettagword(“111”);
y=gettagword(“222”);
z=gettagword(“333”);
maft(x,y,z);
settagword(“111”,x);
settagword(“222”,y);
settagword(“333”,z);
最佳答案
你应该在动作中先把这三个变量值读到脚本的变量中,脚本变量和wincc的内部变量不是一个概念,你在脚本动作中建立三个变量tag1,tag2,tag3,然后用:
tag1=gettagfloat(“111”); tag2=gettagfloat(“222”); tag3=gettagfloat(“333”); maft(“111”,”222”,”333”);。