IFS 开发培训文档(Chapter-05)
- 格式:doc
- 大小:289.50 KB
- 文档页数:4
1 客户定制报表1.1 概述所谓客户定制报表,也是用 Quick Report 或 Crystal Report 开发的,不同于集成报表的是,此类报表多数是查询统计报表,与实际业务流程基本无关,并且它是由 IFS ADMIN 管理工具进行设置,通过 IFS 系统的客户报表定制功能加以调用的。
1.2 创建视图1.2.1创建新的包在包中添加所需要的视图。
建议在一个项目中可以建立一个包含所有报表视图的包。
下面给出 API/APY 文件的模板。
API 模板文件Template.API---- Logical unit: <<<LU: Put your LU name here>>>---- IFS/Design Template Version 2.2---- Date Sign History-- ------ ---- ----------------------------------------------------------------------------------------------------------------------------------------define MODULE = <<<MODULE: Put your module name here>>> define LU = <<<LU: Put your lu name here>>>define SERVICE = <<<SERVICE: Put your system service name here>>> define PKG = <<<PKG: Put your package name here>>>define DOMAIN = <<<DOMAIN: Put your domain name here>>>PROMPT Creating &PKG specificationCREATE OR REPLACE PACKAGE &PKG ISmodule_ CONSTANT VARCHAR2(25) := '&MODULE';lu_name_ CONSTANT VARCHAR2(25) := '&LU';domain_ CONSTANT VARCHAR2(25) := '&DOMAIN';service_ CONSTANT VARCHAR2(25) := '&SERVICE';<<<PUBREC: public record definition>>>------------------------------------------------------------------------------------------------- FOUNDATION1 METHODS -----------------------------------------------------------------------------------------------------------------PROCEDURE Init;END &PKG;/SHOW ERRORAPY 模板文件Template.APY---- Logical unit: <<<LU: Put your LU name here>>>---- Purpose:---- IFS/Design Template Version 2.2---- Date Sign History-- ------ ---- ----------------------------------------------------------------------------------------------------------------------------------------define MODULE = <<<MODULE: Put your module name here>>> define LU = <<<LU: Put your lu name here>>>define TABLE = <<<TABLE: Put your TABLE name here>>> define VIEW = <<<VIEW: Put your view name here>>> define PKG = <<<PKG: Put your package name here>>>------------------------------------------------------------------------------------------------- VIEWS FOR SELECTS -------------------------------------------------------------------------------------------------------------------PROMPT Creating &VIEW viewCREATE OR REPLACE VIEW &VIEW ASSELECT <<<VIEWCOL: Put your view column here>>>FROM <<<VIEWTAB: Put your view table(s) here>>>WHERE <<<VIEWSEC: Put your security restrictions on rows here>>>WITH read only;------------------------------------------------------------------------------------------------- PACKAGES FOR METHODS ----------------------------------------------------------------------------------------------------------------PROMPT Creating &PKG implementationCREATE OR REPLACE PACKAGE BODY &PKG IS------------------------------------------------------------------------------------------------- FOUNDATION1 METHODS ------------------------------------------------------------------------------------------------------------------- Init-- Dummy procedure that can be called at database startup to ensure that-- this package is loaded into memory for performance reasons only.-----------------------------------------------------------------------------PROCEDURE InitISBEGINNULL;END Init;END &PKG;/SHOW ERROR1.2.2也可以采用在系统已有的包内添加视图的方法。
IFS应用系统基本操作说明B/S结构客户端界面说明:A区:菜单B区:树形导航栏值列表数据值列表显示相应字段的系统已定义的数据列表。
适用于编码类型的数据。
按值列表图标可得到对应字段的值列表信息。
值列表型的数据是工作规范化、标准化的体现。
操作方式基本知识启动工作窗口在树形导航栏中单击应用标题则启动相应的工作窗口启动系统在IE浏览器地址栏中输入地址http://sac2:58080/b2e/secured/Default.page 在<用户标识>中输入用户名,在<密码>中输入密码,单击登入按钮退出系统在右上角菜单选择可选模块参考,单击登出4.1.1 修改密码第一次登录系统应修改用户密码,请按照以下步骤操作(1)点击[文件/选项]菜单(2)在//安全//界面中,按[更改密码],在<旧密码>中输入原密码,在<新密码>中输入新密码,并在<证实密码>中重新输入新密码,按[确定]保存。
提示:密码首位不能是数字。
4-2 查询基本知识4.2.1 查询方法4.2.1.1 查询数据在工作窗口可对具体条目进行查询,直接按或者一般在工作区单击鼠标右键可以弹出类似的菜单。
此时可单击查询(Q)…条目进行查询操作。
4.2.1.2 查询条件查询统配符表(以下符号可以通过条件框的下拉列表选取或直接输入查询结果)点击查询(Q)后,将弹出类似的查询对话框窗口。
我们可以看到,“#”、“项目”、“价值”、“排序”等几个条目。
系统将根据我们的输入条件综合进行查询,将结果根据我们设定的条件排序后输出。
# (order 序号):.定义需要排序的多个属性的进行排序的顺序。
项目(Item ):.列出用于查询的对象属性。
值(Value ):.在这一列中输入所查询项目的条件或数值,也就是查询条件。
排序(Sort ):通过下拉列表选择升序或降序排序,但如果多个属性要排序,必须在#列定义顺序。
1 客户定制报表1.1 概述所谓客户定制报表,也是用 Quick Report 或 Crystal Report 开发的,不同于集成报表的是,此类报表多数是查询统计报表,与实际业务流程基本无关,并且它是由 IFS ADMIN 管理工具进行设置,通过 IFS 系统的客户报表定制功能加以调用的。
1.2 创建视图1.2.1创建新的包在包中添加所需要的视图。
建议在一个项目中可以建立一个包含所有报表视图的包。
下面给出 API/APY 文件的模板。
API 模板文件Template.API---- Logical unit: <<<LU: Put your LU name here>>>---- IFS/Design Template Version 2.2---- Date Sign History-- ------ ---- ----------------------------------------------------------------------------------------------------------------------------------------define MODULE = <<<MODULE: Put your module name here>>> define LU = <<<LU: Put your lu name here>>>define SERVICE = <<<SERVICE: Put your system service name here>>> define PKG = <<<PKG: Put your package name here>>>define DOMAIN = <<<DOMAIN: Put your domain name here>>>PROMPT Creating &PKG specificationCREATE OR REPLACE PACKAGE &PKG ISmodule_ CONSTANT VARCHAR2(25) := '&MODULE';lu_name_ CONSTANT VARCHAR2(25) := '&LU';domain_ CONSTANT VARCHAR2(25) := '&DOMAIN';service_ CONSTANT VARCHAR2(25) := '&SERVICE';<<<PUBREC: public record definition>>>------------------------------------------------------------------------------------------------- FOUNDATION1 METHODS -----------------------------------------------------------------------------------------------------------------PROCEDURE Init;END &PKG;/SHOW ERRORAPY 模板文件Template.APY---- Logical unit: <<<LU: Put your LU name here>>>---- Purpose:---- IFS/Design Template Version 2.2---- Date Sign History-- ------ ---- ----------------------------------------------------------------------------------------------------------------------------------------define MODULE = <<<MODULE: Put your module name here>>> define LU = <<<LU: Put your lu name here>>>define TABLE = <<<TABLE: Put your TABLE name here>>> define VIEW = <<<VIEW: Put your view name here>>> define PKG = <<<PKG: Put your package name here>>>------------------------------------------------------------------------------------------------- VIEWS FOR SELECTS -------------------------------------------------------------------------------------------------------------------PROMPT Creating &VIEW viewCREATE OR REPLACE VIEW &VIEW ASSELECT <<<VIEWCOL: Put your view column here>>>FROM <<<VIEWTAB: Put your view table(s) here>>>WHERE <<<VIEWSEC: Put your security restrictions on rows here>>>WITH read only;------------------------------------------------------------------------------------------------- PACKAGES FOR METHODS ----------------------------------------------------------------------------------------------------------------PROMPT Creating &PKG implementationCREATE OR REPLACE PACKAGE BODY &PKG IS------------------------------------------------------------------------------------------------- FOUNDATION1 METHODS ------------------------------------------------------------------------------------------------------------------- Init-- Dummy procedure that can be called at database startup to ensure that-- this package is loaded into memory for performance reasons only.-----------------------------------------------------------------------------PROCEDURE InitISBEGINNULL;END Init;END &PKG;/SHOW ERROR1.2.2也可以采用在系统已有的包内添加视图的方法。
IFS 第五版详解(如何顺利获得IFS认证)各位食品伙伴网网友,晚上好:十分荣幸能在新年伊始之际和大家一起共同学习交流关于IFS第五版的相关知识,期望这些天能就IFS的话题进行深入的探讨,同时我也将就我所了解到的相关信息与大家共享,以期共同进步,同时对有认证需求的朋友尽自己的绵薄之力。
当然我也欢迎大家就相关的IFS或其他的食品安全、质量管理、实验室管理、流程管理等的相关的话题进行私下沟通和学习,我会尽我所能提供我所知道的信息!由于工作原因可能不时一直在线,但是我会关注所有的问题,期望能抛砖引玉。
我的联系方式如下:MSN:sqericluo@QQ:393579724email: ericluo@不在线或紧急时可以联系电话:1 3 1 - 0 - 1 8 6 - 9 9 7 6本次的交流大概的纲要如下:1\ 背景介绍(版本演进)2\ IFS 和其他认证的联系和区别3\ 认证规则(如何申请认证及如何选择认证公司)4\ 如何申请认证及如何选择认证公司5\ 标准重点介绍6\ Clarification7\ IFS与BRC的区别8\ 如何获得IFS审核员资格9\ IFS审核的重点10\网友感兴趣的其他问题具体的内容会根据实际情况做相关的变动!在所有的行业中,我相信食品行业的认证或审核不是最多的,也是最多的之一,GLOBAL-GAP、Organics、 GMP、 MSC、Non GMO、BRC、IFS、ISO9000 、SQF 、HACCP 、ISO 22000、QS等等,以及各大买家的二方审核等,通过这些认证或审核大多数对于企业来说相对还是比较容易的,但是IFS是例外,从整体就目前国内的IFS认证,能顺利一次通过IFS认证还是比较困难的,究其原因不是说IFS的标准有多难,而是由于目前的IFS特殊的审核资源及审核机制所致……相信坛子里有不少做过了IFS 认证可以谈下感受。
IFS 是 FOOD International Food Standard(国际食品标准)的缩写欧洲两大零售商组织,法国FCD和德国HDE联合颁布国际食品标准,要求进入本国市场的食品进行IFS标准符合性认证.IFS标准的制定为向大型零售商供货的食品制造商,特别是“自有品牌”的食品制造商提供了明确的管理规范和要求,通过IFS标准的实施和认证,制造商可以充分降低食品的危害,产品可以顺利进入欧洲市场。
第五章过程站组态5.1 IEC61131-3编程 (1)5.2资源分配 (2)5.2.1建立FBD项目树 (2)5.2.2编写FBD程序 (3)5.2.2.1 FBD程序元素 (4)5.2.2.2 基本操作5.2.3编写IL 程序 (11)5.2.4编写LD 程序 (12)5.2.5编写SFC程序 (16)5.2.6编写用户功能块 (19)ABB 中国有限公司 15.1 IEC61131-3 编程Industrial IT 编程采用IEC61131-3 标准。
支持功能块图(FBD),指令表(IL),梯形逻辑图(LD),顺序功能图(SFC)四种编程语言。
其程序结构如下:5.2FBD 编程FBD编程是图形化的编程方法,共有190多个标准功能块可调用。
下面说明编程步骤。
5.2.1 建立FBD编程项目树(1)建立用户任务列表目录Industrial IT的任务分为系统任务和用户任务两大类。
用户任务是由运行在过程站中的用户程序组成的。
所有用户任务的集合称为用户任务列表。
ABB 中国有限公司 2∙在建立过程站资源时,系统自动生成系统任务列表和用户任务列表。
(2)建立用户任务每个过程站资源可以组态 9 个任务,其中8个任务为周期运行方式,1个为PLC循环运行方式。
对于周期运行方式的任务用户可以指定任务的执行周期行优先级。
∙在用户任务列表上选择插入下一级;菜单:编辑(Edit) →插入下一级(Insert next level)工具条选择:∙出现任务选择对话框:任务又有冗余任务行非冗余任务之分,冗余任务运行在冗余过程站。
Default Task TASK 为PLC任务Task TASK 为周期任务∙选择周期运行方式任务,按确认键出现用户任务参数配置对话框:ABB 中国有限公司 3输入任务名称;确认任务周期行优先级;其它参数保留缺省值。
任务处理方式有两种:等间距(Equidistant)方式、负载优化(Load optimal)方式-Equidistant :任务按照固定的时间间隔执行,起始时间确定后,随后一系列任务执行时间是固定的;- Load Optimal : 每次任务的启动运行时间取决于前一次结束时间,前后两次间隔时间差为设定的周期时间。
Specifications and Guide LinesProduct/Project: Doc.No: Issued By: Date: Page:: R&D Training * Henry Zhong 2009-7-12 1(4) Title:Solution-Chapter 05Document Revision HistoryRevision Date By RemarksA1 2009-7-12 Henry Zhong CreatedList:Adding a state diagram1.Model changes2.Storage and Business logic3.Client DeveloperSolution – Chapter 05(Adding a state diagram)1Adding a state diagram1.1Select the DemoTrInvoice class in the model diagram for OrderEntry. Select the main menu item Browseand next chose the sub menu item State Diagram (Pressing ctrl+T also opens the state diagram view).1.2Add three states to the diagram Created, Cancelled and Paid. Also add a starting state to the diagram.Connect the start state to the state Created with a State Transition arrow. (To do this, select the StateTransition arrow from the tool box, and next drag and drop from the starting location to the end location.)Note: This will automatically assign the new records to the state Created at the beginning.1.3Then from the state Created add State Transition arrows to both Paid and Cancelled.1.4To add the event Cancel to the State Transition s from the states Created to Cancelled, select the StateTransition and right click to get the pop-up menu. There will be only one menu item which is theSpecification item. Select this menu item.1.5Add the event name Cancel for the Event, apply and close. Add the even Pay to the State Transition betweenCreated and Paid in this same manner.Note: There is no specific end state as all the states with no out going events are considered to be end sates.1.6Add a …note text‟ for LU DemoTrInvoice class, like this:2Storage and Business logic2.1Adding a state diagram will require an additional column in the table for DemoTrInvoice to store the object‟sstate.2.2Open IFS Design, next open the storage folder and merge the changes to the CRE file and save it. Create aUPG file, save and deploy the UPG file.2.3Then open the code for the DemoTrInvoice in the business logic. Note the changes from the lastly saved code.Merge all the functions related to the Finite State Machine. Then any additional code in the previousfunctions that have turned red or brown should either be merged or set to default.2.4Save and deploy the API and the APY.3Client Developer3.1Open demord.apl in the Developer. Select the window frmDemoTrInvoice and get the Outline.3.2Add the new column, named STATE to the frmDemoTrInvoice form and make sure that the “State Machine”check box is checked.3.3The way to change states of a record is to send the events that cause the state changes from the client. To dothis we need to add an RMB option for each event.3.4To add an RMB option, a menu needs to be added to the “Named Menus” section of a window. Look at thefollowing table for a compleat list of the manu names that can be used. These are from the named menusdefined in the application‟s popup menus section (a library item from ifsfnd.apl)3.5Add to the menu, menuFrmMethods to the Named Menus section of frmDenoTrInvoice window. (Right clickon the item Named Menus, and chose the Add Next level Option. Select the Menu option from that.)3.6Under this menu add the menu items correspondin g to the events of the state diagram. Namely “Cancel” and“Pay”.3.7To do this, select the Menu and right click. From the pop-up menu that appear, select Add Next Level option.Select the option Manu Item.3.8Add the following coding.3.9For each menu item code for the …Enabled When‟ and …Menu Actions‟ are needed to be added.3.10In the current situation the menu item is a State machine event. Hence the actual database event can beinvoked by sending the message PM_DataRecordStateEvent.Note: This message takes two parameters. One is a standard method parameter taking values likeMETHOD_Inquire, METHOD_Execute. The other one is the actual event name.3.11For Enabled When add the following code.Note: The METHOD_Inquire is indicating this is just a check for availability of this event for the current record. The reason for converting the event name (should be replaced with …Cancel‟ and …Pay‟) to a number is the SalSendMsg function only accepts numeric values for message parameters. The message handler of the message will do the reverse conversion where needed to identify the event.3.12Under Menu actions add the following line.Note: The third parameter is now METHOD_Execute, indicating now that the action should be executed and not just checked. There is no need to convert the event name here as the PostMessage function accepts the string parameter.3.13Save and Run the application.Note: You need to add new records as the previously created records will not have a state defined for them you will not be able to modify them. The new records will automatically be of state “Created”.3.14Check for the availability of the Menu Items …Cancel’and …Pay’. Both should be enabled for records in state“Created”. Then invoke “Cancel”, now the state will be changed to “Cancelled”. Then both menu items will be disables (as expected since “Cancelled” is an end state there are no available state transitions from it).Similar test can be done for “Pay” event on another “Created” record. Without the code in the Enabled when section all the menu items will be enabled all the time giving a false impression about the availability of an event.。