在 SIMATIC WinCC powerrate V3 中, 如何使 FIFO 数据缓冲区中保存更长时间的数据?

n

初始状态
需要在缓冲区中保存的测量值太多但已有的FIFO缓冲区不够大。n

补救方法 1
通过改变”font-size: 12pt; font-family: “Times New Roman”;”>PRE/PR3_FIFO_DATA功能块中”font-size: 12pt; font-family: “Times New Roman”;”>FIFO_DATA参数的队列长度改变”font-size: 12pt; font-family: “Times New Roman”;”>FIFO缓冲区的长度。
“font-size: 12pt; font-family: “Times New Roman”;”>FIFO缓冲区的默认长度是”font-size: 12pt; font-family: “Times New Roman”;”>1000列数据,这可以最多增大为”font-size: 12pt; font-family: “Times New Roman”;”>4000列,其尺寸受限于”font-size: 12pt; font-family: “Times New Roman”;”>PLC中数据块的最大尺寸,大约是”font-size: 12pt; font-family: “Times New Roman”;”>64,000个字节,必须在控制程序扩展更大的缓冲区。n

补救方法 2
如果采用方法”font-size: 12pt; font-family: “Times New Roman”;”>1增加后的”font-size: 12pt; font-family: “Times New Roman”;”>FIFO缓冲区还是不够大,必须在控制程序中另外增加一个数据缓冲区。n

注意
上面的处理办法依赖于所使用的”font-size: 12pt; font-family: “Times New Roman”;”>SIMATIC S7控制器类别。
下面的例子是基于”font-size: 12pt; font-family: “Times New Roman”;”>S7-400系列控制器的一个”font-size: 12pt; font-family: “Times New Roman”;”>WinCC项目。n

基本原理
处理程序涉及到下面几个”font-size: 12pt; font-family: “Times New Roman”;”>SIMATIC powerrate中的功能块n

  • PRE_FIFO_DATAn
  • PRE_AR_DATAn
  • PRE_SUM.

关于这些功能块的详细说明请参考”font-size: 12pt; font-family: “Times New Roman”;”>SIMATIC powerrate的相关文档。n

在”font-size: 12pt; font-family: “Times New Roman”;”>SIMATIC powerrate V4.0中的处理
在”font-size: 12pt; font-family: “Times New Roman”;”>SIMATIC powerrate V4.0中,不同于”font-size: 12pt; font-family: “Times New Roman”;”>SIMATIC powerrate V3.0,对于在”font-size: 12pt; font-family: “Times New Roman”;”>WinCC程序中的操作通过”font-size: 12pt; font-family: “Times New Roman”;”>SIMATIC powerrate向导自动处理。
在”font-size: 12pt; font-family: “Times New Roman”;”>SIMATIC powerrate V4.0中的处理请参考条目”font-size: 12pt; font-family: “Times New Roman”;”>ID 52255681。n

控制程序中的处理

  1. 基于新增加的数据块调用”font-size: 12pt; font-family: “Times New Roman”;”>PRE_FIFO_DATA 和”font-size: 12pt; font-family: “Times New Roman”;”>PRE_AR_DATA
    在”font-size: 12pt; font-family: “Times New Roman”;”>”System”功能块中再次调用”font-size: 12pt; font-family: “Times New Roman”;”>PRE_FIFO_DATA 和”font-size: 12pt; font-family: “Times New Roman”;”>PRE_AR_DATA功能块。
    指定功能块的”font-size: 12pt; font-family: “Times New Roman”;”>FIFO参数为新增加的数据块,用于储存用于缓冲的测量数据。
    注意
    给新创建的数据块一个符号名称,并且使能”font-size: 12pt; font-family: “Times New Roman”; color: black;”>“Operator Control and Monitoring object”属性,从而在编译”font-size: 12pt; font-family: “Times New Roman”;”>OS时,在”font-size: 12pt; font-family: “Times New Roman”;”>WinCC项目中能正确创建这些变量。
实例 基于新增加的数据块调用”font-size: 12pt; font-family: “Times New Roman”;”>PRE_FIFO_DATA 和”font-size: 12pt; font-family: “Times New Roman”;”>PRE_AR_DATA
标准 在 SIMATIC WinCC powerrate V3 中, 如何使 FIFO 数据缓冲区中保存更长时间的数据?
图 01
FIFO 2 在 SIMATIC WinCC powerrate V3 中, 如何使 FIFO 数据缓冲区中保存更长时间的数据?
图 02
  1. 在”font-size: 12pt; font-family: “Times New Roman”;”>PRE_SUM中指定”font-size: 12pt; font-family: “Times New Roman”;”>DB-FIFO
    在”font-size: 12pt; font-family: “Times New Roman”;”>PRE_SUM中指定新增加的”font-size: 12pt; font-family: “Times New Roman”;”>DB-FIFO,用于储存用于归档的测量变量。
    再创建一个”font-size: 12pt; font-family: “Times New Roman”;”>”Energy”功能块,在第一个”font-size: 12pt; font-family: “Times New Roman”;”>”Energy”功能块中,调用所有使用”font-size: 12pt; font-family: “Times New Roman”;”>DB-FIFO_1存储数据的”font-size: 12pt; font-family: “Times New Roman”;”>PRE_SUM。
    在第二个”font-size: 12pt; font-family: “Times New Roman”;”>”Energy”功能块中,调用所有使用”font-size: 12pt; font-family: “Times New Roman”;”>DB-FIFO_2存储数据的”font-size: 12pt; font-family: “Times New Roman”;”>PRE_SUM”font-family: “Times New Roman”;”>。
    为了举例说明这个过程,在下面的例子中,数据块”font-size: 12pt; font-family: “Times New Roman”;”>DB_FIFO_1用于存储整数类型数据。
    数据块”font-size: 12pt; font-family: “Times New Roman”;”>DB_FIFO_2用于存储脉冲类型数据。
实例 在”font-size: 12pt; font-family: “Times New Roman”;”>PRE_SUM中指定”font-size: 12pt; font-family: “Times New Roman”;”>DB-FIFO
标准 在 SIMATIC WinCC powerrate V3 中, 如何使 FIFO 数据缓冲区中保存更长时间的数据?
图 03
FIFO 2 在 SIMATIC WinCC powerrate V3 中, 如何使 FIFO 数据缓冲区中保存更长时间的数据?
图 04
  1. 在”font-size: 12pt; font-family: “Times New Roman”;”>SIMATIC管理器中编译控制程序和”font-size: 12pt; font-family: “Times New Roman”;”>OS站
    在进行上面处理后,为了在”font-size: 12pt; font-family: “Times New Roman”;”>WinCC项目中能够使用第二个新建的”font-size: 12pt; font-family: “Times New Roman”;”>FIFO缓冲区,必须重新编译控制程序并下载到控制器中,然后编译”font-size: 12pt; font-family: “Times New Roman”;”>OS站。

WinCC 项目中的处理

  1. 在”font-size: 12pt; font-family: “Times New Roman”;”>WinCC的变量归档中创建”font-size: 12pt; font-family: “Times New Roman”; color: black;”>原始数据变量
    在变量归档中,每一个”font-size: 12pt; font-family: “Times New Roman”;”>PRE_AR_DATA块必须创建一个”font-size: 12pt; font-family: “Times New Roman”; color: black;”>原始数据变量,从而在”font-size: 12pt; font-family: “Times New Roman”;”>WinCC变量管理中能够归档相应的变量。
实例 在”font-size: 12pt; font-family: “Times New Roman”;”>WinCC的变量归档中创建”font-size: 12pt; font-family: “Times New Roman”; color: black;”>原始数据变量
标准 在 SIMATIC WinCC powerrate V3 中, 如何使 FIFO 数据缓冲区中保存更长时间的数据?
图 05
FIFO 2 在 SIMATIC WinCC powerrate V3 中, 如何使 FIFO 数据缓冲区中保存更长时间的数据?
图 06
  1. 创建另外一个”font-size: 12pt; font-family: “Times New Roman”;”>PRE_AR_SND全局动作
    在全局脚本中,创建另外一个”font-size: 12pt; font-family: “Times New Roman”;”>PRE_AR_SND.PAS全局动作用于确认归档。
    修改用在”font-size: 12pt; font-family: “Times New Roman”;” lang=”ZH-CN”>原始数据变量的触发器进行归档。
    在”font-size: 12pt; font-family: “Times New Roman”;”>C脚本中用”font-size: 12pt; font-family: “Times New Roman”;”>the PRE_AR_DATA数据块的变量名称匹配变量连接。
实例 创建附加的 PRE_AR_SND 全局动作
标准 在 SIMATIC WinCC powerrate V3 中, 如何使 FIFO 数据缓冲区中保存更长时间的数据?
图 07
FIFO 2 在 SIMATIC WinCC powerrate V3 中, 如何使 FIFO 数据缓冲区中保存更长时间的数据?
图 08
  1. 为过程变量指定”font-size: 12pt; font-family: “Times New Roman”; color: black;”>原始数据变量
    在变量归档中,为用于过程归档的过程变量指定正确的”font-size: 12pt; font-family: “Times New Roman”; color: black;”>原始数据变量。
    改变标准化”font-size: 12pt; font-family: “Times New Roman”;”>DLL选项内容。
实例 为过程变量指定”font-size: 12pt; font-family: “Times New Roman”; font-weight: bold;”>原始数据变量
标准 在 SIMATIC WinCC powerrate V3 中, 如何使 FIFO 数据缓冲区中保存更长时间的数据?
图 09
FIFO 2 在 SIMATIC WinCC powerrate V3 中, 如何使 FIFO 数据缓冲区中保存更长时间的数据?
图 10

原创文章,作者:ximenziask,如若转载,请注明出处:https://www.zhaoplc.com/plc330981.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2020年11月5日
下一篇 2021年4月12日

相关推荐

发表回复

登录后才能评论