SymphonyPlus Harmony系统功能码详解

需积分: 1 0 下载量 84 浏览量 更新于2024-07-22 收藏 2.14MB PPT 举报
"FC_Overview for Lecture1 是一份关于 SymphonyPlus Harmony 系统中的功能码应用的培训资料,由 ABB Bailey Beijing 提供。这份资料旨在介绍和阐述功能码的基本概念、用途以及如何在实际应用中使用它们。" 在 SymphonyPlus Harmony 系统中,功能码(FunctionCode)是关键组成部分,它们是一系列预定义的软件模块,每个模块都有独特的代码,用于执行特定的自动化任务。功能码的种类丰富,超过200种,涵盖了各种不同的控制和处理功能,以满足用户在组态控制器时的需求。这些功能码存储在控制器的只读存储器(ROM)中,且不同控制器的ROM包含适用于各自组态的功能码。 功能码库(FunctionCodeLibrary)则是一个收集了所有可用功能码的集合,存在于控制器的ROM内。当用户在系统中选择并分配一个功能码时,需要指定一个块号,这个选定的功能码就被称为功能块,它在运行时执行特定的控制逻辑或计算。 规格参数(Specification)是功能码的重要组成部分,它们定义了功能码的输入需求。规格参数可以是布尔值(Bool)、整型数(Integer,如 INT(1) 和 INT(2))、实型数(Real,如 REAL(2) 和 REAL(3))或者字符串(String)。这些参数依据功能的不同,可以分为地址类和内部规格参数两类,地址类参数通常关联外部输入/输出,而内部规格参数则涉及功能块内的计算或设置。 功能码的输出(Output)是指功能码执行后产生的结果,可以是一个或多个,它们可以是数据、状态信息或者其他系统响应。这些输出用于传递处理后的信息给其他系统组件或进行进一步的处理。 这份文档的前言部分主要介绍了功能码的基本术语,包括其定义、库的概念以及与功能块、规格参数和输出相关的细节。通过深入学习这份资料,用户将能更好地理解和应用 SymphonyPlus Harmony 系统中的功能码,从而提高自动化系统的配置效率和性能。

请以最详细的方式解释这段代码with a01 as( select sm_id, isname, case when isname in ('冰箱', '冷柜') then '制冷' when isname = '商空' then '楼宇' when isname = '家空' then '空调' else isname end as cyx, factory_code, mtname, curstatus, model_code, model_name, start_time, --'保养起始时间' expire_time, --'保养到期时间' substring(start_time, 1, 7) byqsny, substring(expire_time, 1, 7) byjssj, case when stype = '2' then '二保' when stype = '3' then '三保' else stype end as bylx, case when mm_type = '2' then '二保' when mm_type = '3' then '三保' when mm_type = '4' then '三保带二保' else mm_type end as mmtype, --实际保养类型 upper_time, --上次保养时间 mm_time, --实际保养时间 scustcode, -- 实供应商编码 scustname, --实供应商名称 mould_status, --模具维保状态 mm_status, --实际是否保养 smould_status --模具实际维保状态 from dwd_mm_staymaintain_all a where by_status <> '无需保养' and length(factory_code) = 4 and curstatus not in ('报废中', '已报废', '冻结数据', '垃圾数据') and isname in ('冰箱', '冷柜', '家空', '商空', '洗涤', '厨电', '热水器') and substring(expire_time, 1, 10) <= from_unixtime(unix_timestamp(), 'yyyy-MM-dd') and expire_time is not null and expire_time <> '' ), b01 as( select cyx, byjssj, count(sm_id) by_ying from a01 group by cyx, byjssj ), b02 as( select cyx, byjssj, count(sm_id) by_shi from a01 where mm_status = '已保养' group by cyx, byjssj ),c01 as( select from_unixtime(unix_timestamp(), 'yyyy-MM') months, t1.cyx industry, t1.byjssj byjsyf, cast(t1.by_ying as string) by_ying, cast(t2.by_shi as string) by_shi, cast(t2.by_shi/t1.by_ying as decimal(8,5)) bywcl from b01 t1 left join b02 t2 on t1.cyx = t2.cyx and t1.byjssj = t2.byjssj) insert overwrite table dh_yf.tt_mould_asset_maintenance_overview select months, industry, byjsyf, by_ying, by_shi, cast(bywcl as string) bywcl, from_unixtime(unix_timestamp(), 'yyyy-MM-dd') etl_date, '%' unit from c01

2023-05-30 上传