2017年4月10日 星期一

OEE & Nav - 2 (Chinese version)


我們開發的PDAS ( Production Data Acquistion System) 是透過RedlionCrimson語言去編寫控制語言.相關資訊解說如下

1.     工業防水人機介面 (HMI = Human Machine Interfac) 輸入/輸出板位於生產車間的預定位置。 從生產機器到這些輸入/輸出板是透過網路連接的,在生產週期,產量計數器和任何其他需要的生產數據透過網路傳回控制中心。 每個HMI還具有外部報警燈,以通知員工需要注意(日誌停機或系統中的任何報警設置)

2.     HMI具有內置的網絡服務器,並且可以使用自定義的HTML網站來顯示來自Web瀏覽器的實時生產數據。他們還能夠通過許多不同的通信協議與市場上的許多PLC直接通信。

3.     所有HMI都與工廠乙太網連接,並通過Modbus TCP進行通信。用戶登錄ID權限可訂制訪問系統中的某些頁面,或允許主管從系統中的任何面板查看和更改任何操作頁面。

4.     Nav上先建立OEE的基本目標資訊.

5.     每天上午5:30SQL Job AgentNavision截取資料到PDAS服務器,内含生產工單及生產線代碼以及OEE目標利率,生產情況以及PDAS系統中使用的其他資訊值,以確定生產線的速率和性能。

6.     PLC將此數據導入每個HMI(每個生產線通常為2個)作為每條生產線的生產計劃。

7.     生產領班在HMI觸摸屏上選取列出的生產訂單,以開始和結束按鈕來記錄此訂單的開始和結束時間。

8.     PLC系統將跟踪每個OEE子類別(性能,可用性,質量)的生產及停機時間,並強制記錄生產中運行的每個工單的產品編號的停機時間。

9.     停機原因(RFO)列表以CSV格式保存,並與日常的面板進行同步。這限制了可供操作員選擇的項目。 RFO表是OEE類別和生產線所獨有的。所有面板都能發送電子郵件,並可以發送請求RFO的電子郵件添加到其列表中。

10.  可以根據PDAS內的任何“標籤”信息自動生成並發送報警或警報電子郵件。例如,如果線路關閉xx分鐘,則可以將電子郵件發送到預先選定的收件人組,讓他們知道線路已經停了xx分鐘或者OEE分數低於目標等。

11.  每天上午5點,PLC系統會將前一天的記錄導出到PDAS服務器(CSV文件格式),然後將SQLJob Agent導入Navision數據庫。

12.  SQL SSAS服務器按計劃更新數據,然後導出到SharePoint商業智能( BI )服務。

13.  用戶使用瀏覽器查看SharePoint PDAS站點中的BI

OEE & Navision 1 (Chinese Version)


NAV內有所謂的工作中心其目的就是計算機械的生產效率。但是人為的輸入會造成不準確性因此近幾年在美國OEE。很多的公司在這方面有所成就。2014年我待的公司引進RedZone(rzsoftware.com)OEE management product。它是建立在iPad App並與PLC連結去監測生産機器。但經過一年的運行我們決定自行開發。原因

1.      生產工單需要先從Nav轉成CSV後再透過轉換工具轉入們的系

2.      無法與Nav 資料共享

3.      客製化困難並且維護費十分昂貴。

因此我決定與我廠的工程Chris Asby 共同開發。首先先介紹一下什麼是OEE,下次再介紹比較詳細內容

OEE ( Overall Equipment Effectiveness  )是設備綜合效率的首字母縮寫和 3 個元素組成。

當它計畫運行期間, 整體設備效率量化來觀察製造單位執行相對於其設計的能力。

OEE 允許我們輕鬆地對設備利用率標準的測量和溝通。



OEE = 績效 * 可用性 * 品質

績效 = (零件生產 * 理想週期時間) / 執行時間

示例︰ 包裝機( Multivac ) 8 小時的生產與 1 個小時的停機時間產生了擁有 3500 個循環。 目標(Standard)速度是每分鐘 10 個週期。 (績效 = (3500 * (10 / 60 = 0.1667 分鐘/每週期) / 8 小時減去 1 小時的停機= 7 小時 * 60 = 420 分鐘) 所以。...... 績效 = 3500 * 0.1667 / 7,等於 83.35 %

: "執行時間" = 機器的實際運行,當機器的輸出是 零的時侯(已停止) 可用性元素中不影響性能的因素



可用性 = 正常執行時間 / 可用時間

示例︰ 包裝機( Multivac )剛剛完成運行8 小時而無需更換工單。 Film更換和等待產品而累積下來的時間造成了一個小時待機,這種轉變期間使總的執行時間等於 7 小時。

可用性 = 7 小時/8 小時相當於 87.5%



品質 = (單位生產  - 有缺陷的單位) / 單位生產

示例︰ 包裝機( Multivac )標準運轉為3500 /8小時,等同 14,000 單位 (3,500 x 4) 的產品。 在結束了這運轉案例後總數是 2000 箱,零售產品的包裝每箱為6 單位, 相當於12000個單位。 這意味著在運行期間2000 單位的損失。品質 = (14,000-2000) / 14,000 相當於 85.7%



然後將結合上面的例子來計算維克 OEE,如下所示︰

Multivac OEE = 性能 83% 的可用性 87.5% x 品質 85.7% 相當於 62.2 % OEE.

2017年3月29日 星期三

OEE Management with Navision


2014, we use RedZone (rzsoftware.com) OEE Management product, they build in iPad App to collect PLC data from production machine, after 1 year running, we found

1.       Data need to manually to import or export with our MS Navision Database.

2.       Maintenance fee is too high, especial we need to modify the report.

3.       Operation pages are not customizable per the process.

So Chris Asby and I use PLC + Touch Screen to build our own “Production Data Acquisition System” (PDAS).

1.       Industrial waterproof HMI’s with input/output boards are located on the production floor at predetermine locations.  Inputs are hardwired from the production machinery to these inputs to capture data from machine cycles, case counters, and any other production data that is needed.  Each HMI also has an external alarm light to notify employees that the HMI’s need attention (Log downtime or any alarms setup in the system). 

2.       HMI’s have a built in webserver and can have custom HTML websites to show live production data from any web browser.  They are also capable of communicating directly with many PLC’s on the market via many different communication protocols.

3.       All HMI’s are hardwired to the plant Ethernet network and all communicate with each other via Modbus TCP.  User login id’s restrict access to certain pages in the system or allow a supervisor to view & change any operation page from any panel in the system.

4.       Everyday 5:30am, SQL Job agent grab production order with production Line code from Navision to PDAS server.  This information also includes target rates, target OEE, cases to produce and other values used in the PDAS system to determine production line rate & performance.

5.       PLC imports this data into each HMI (Typically 2 per production line) as a production schedule for each line.

6.       Production foreman follow up production order that are list in touch screen to start and end button to record this order start & end time.

7.       PLC system will track downtime per OEE sub-category (Performance, Availability, Quality) and enforce logging of the reason for outage for all downtime per item number that is running in production.

8.       Reason for outage (RFO) lists are maintained in CSV format and sync with the panels daily.  This limits the items available to be selected by the operators.  RFO tables are unique to the OEE category as well as the production line.  All panels are capable of sending emails and the operators can send emails requesting an RFO be added to their list.

9.       Alarm or alert emails can be automatically generated and sent based on any “tag” information inside the PDAS.  For example if a line is down for xx minutes an email can be sent out to a preselected group of recipients letting them know that the line is down for xx minutes or the OEE score is below target, etc.

10.   Everyday 5:00 AM, PLC system will export the previous day’s records to PDAS server (CSV file format) then SQL Job Agent import into Navision database. 

11.   SQL SSAS server update data by schedule then export to SharePoint Business Intelligence services.

12.   User use browser to view BI in SharePoint PDAS site.

Our PDAS system detail information is this:

1.       What is OEE anyways?

a.       OEE is an acronym for Overall Equipment Effectiveness and is made up of 3 elements. Overall equipment effectiveness quantifies how well a manufacturing unit performs relative to its designed capacity, during the periods when it is scheduled to run. OEE allows us to easily measure and communicate equipment utilization against standards.

b.       OEE = Performance x Availability x Quality

c.        Performance = (Parts Produced*Ideal Cycle Time)/Operating Time

d.       Example: Multivac has produced 3,500 cycles over 8 hours of production with 1 hour of downtime. Target rate is 10 cycles per minute. (Performance = (3,500*(10/60=0.1667 minutes per cycle)/(8 hours minus 1 hour of DT=7 hours*60=420 minutes) so… Performance = (3,500*0.1667)/7 which equates to 83%

e.       Note: The “Operating Time” equals time that the machine is actually running, anytime the machine output is 0 (Stopped) is accounted for in the availability element and does not affect the performance element

f.         Availability= Uptime / Available Time

g.        Example: The Multivac has just completed an 8 hour run without change overs. Film changes and waiting for product have caused one hour of accumulated down time during this shift making the total uptime equal to 7 hours.

h.       Availability = 7 hours / 8 hours which equates to 87.5%

i.         Quality = (Units Produced – Defective Units) / Units Produced

j.         Example: The Multivac cycled 3,500 times during this shift which equated to 14,000 units (3,500 x 4) of retail product. At the end of the shift the total case count was 2,000 cases which at 6 units per case equates to 12,000 units. This means there was a 2,000 case loss during the run.

k.        Quality = (14,000-2,000) / 14,000 which equates to 85.7%

l.         The examples above would then be combined to calculate the Multivac OEE as follows:

m.     Multivac OEE = Performance (83%) x Availability (87.5%) x Quality (85.7%) which equates to 62.2% OEE



2.       Touch Screen Navigation Tree example (pages are unique to the input type). Pic1
3.     Table structure. Pic2

4.       Data example. Pic3
5.       SSAS measure & Dimension example. Pic 4











2017年3月22日 星期三

How to import Excel's Salrs Budget into Navision

In Navision, we use dimension "Region","SalesCode" and "CustomerCode". if we use Navision import function, it's difficult . and Excel format for Sales is more easier. but excel format is different with Navision. so I tried to use stored procedures to convert format from column to row.

1. Original Excel Format. Fig1


2. Import Excel File into table of VFFSalesBudgetRawIn by SSMS . Fig2 & 3


3. After import, use select command to check. Fig4

4. Run Stored Procedures to convert data format from columns to rows table of  VFFSalesBudgetOut


USE [VFFnav2013]
GO
/****** Object: Convert the table of dbo.VFFSalesBudgetRawIn to dbo.VFFSalesBudgetOut, then copy & Paste into Navision ****/

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



Delete from dbo.[VFFSalesBudgetOut]
Go

Declare        @id                 int,
@Item                Char(20),
@Region        Char(20),
@SalesCode        Char(10),
@Customer       Char(10),
@M1                Decimal(18,4),
@M2                Decimal(18,4),
@M3                Decimal(18,4),
@M4                Decimal(18,4),
@M5                Decimal(18,4),
@M6                Decimal(18,4),
@M7                Decimal(18,4),
@M8                Decimal(18,4),
@M9                Decimal(18,4),
@M10                Decimal(18,4),
@M11                Decimal(18,4),
@M12                Decimal(18,4),
@M1Q                Decimal(18,4),
@M2Q                Decimal(18,4),
@M3Q                Decimal(18,4),
@M4Q                Decimal(18,4),
@M5Q                Decimal(18,4),
@M6Q                Decimal(18,4),
@M7Q                Decimal(18,4),
@M8Q                Decimal(18,4),
@M9Q                Decimal(18,4),
@M10Q        Decimal(18,4),
@M11Q        Decimal(18,4),
@M12Q        Decimal(18,4),
@Descrip        Char(100),
@UPrice        Decimal(18, 4),
@IDCount        Int

Set        @id = 1
Set        @M1 = 0
set        @M2 = 0
Set        @M3 = 0
Set         @M4 = 0
Set        @M5 = 0
Set        @M6 = 0
set        @M7 = 0
Set        @M8 = 0
Set         @M9 = 0
Set        @M10 = 0
Set         @M11 = 0
Set        @M12 = 0
Set        @M1Q = 0
set        @M2Q = 0
Set        @M3Q = 0
Set         @M4Q = 0
Set        @M5Q = 0
Set        @M6Q = 0
set        @M7Q = 0
Set        @M8Q = 0
Set         @M9Q = 0
Set        @M10Q = 0
Set         @M11Q = 0
Set        @M12Q = 0
Set         @UPrice = 0



Select @IDCount = Max(IDNo) from dbo.[VFFSalesBudgetRawIn]

WHILE @id <= @IDCount
Begin
Select         @Item = Item,         @Region = Region, @SalesCode = SalesCode, @Customer = Customer
@M1 = M1Amt, @M2 = M2Amt, @M3 = M3Amt, @M4 = M4Amt, @M5 = M5Amt, @M6 = M6Amt, @M7 = M7Amt, @M8 = M8Amt, @M9 = M9Amt, @M10 = M10Amt, @M11 = M11Amt, @M12 = M12Amt,
@M1Q = M1Qty, @M2Q = M2Qty, @M3Q = M3Qty, @M4Q = M4Qty, @M5Q = M5Qty, @M6Q = M6Qty, @M7Q = M7Qty, @M8Q = M8Qty, @M9Q = M9Qty, @M10Q = M10Qty, @M11Q = M11Qty, @M12Q = M12Qty,
@Descrip = Description, @UPrice = Price
From         dbo.[VFFSalesBudgetRawIn]
where IDNo = @id

          INSERT INTO [dbo].[VFFSalesBudgetOut]
                   (Item, Region, SalesCode, Customer, Month, MonthAmt, MonthQty, Descrip, UPrice)
        VALUES        (@Item, @Region, @SalesCode, @Customer, '1/1/2015', @M1, @M1Q, @Descrip, @UPrice)

          INSERT INTO [dbo].[VFFSalesBudgetOut]
                   (Item, Region, SalesCode, Customer, Month, MonthAmt, MonthQty, Descrip, UPrice)
        VALUES        (@Item, @Region, @SalesCode, @Customer, '2/1/2015', @M2, @M2Q, @Descrip, @UPrice)

          INSERT INTO [dbo].[VFFSalesBudgetOut]
                   (Item, Region, SalesCode, Customer, Month, MonthAmt, MonthQty, Descrip, UPrice)
        VALUES        (@Item, @Region, @SalesCode, Customer, '3/1/2015', @M3, @M3Q, @Descrip, @UPrice)

          INSERT INTO [dbo].[VFFSalesBudgetOut]
                   (Item, Region, SalesCode, Customer, Month, MonthAmt, MonthQty, Descrip, UPrice)
        VALUES        (@Item, @Region, @SalesCode, Customer, '4/1/2015', @M4, @M4Q, @Descrip, @UPrice)

          INSERT INTO [dbo].[VFFSalesBudgetOut]
                   (Item, Region, SalesCode, Customer, Month, MonthAmt, MonthQty, Descrip, UPrice)
        VALUES        (@Item, @Region, @SalesCode, Customer, '5/1/2015', @M5, @M5Q, @Descrip, @UPrice)

          INSERT INTO [dbo].[VFFSalesBudgetOut]
                   (Item, Region, SalesCode, Customer, Month, MonthAmt, MonthQty, Descrip, UPrice)
        VALUES        (@Item, @Region, @SalesCode, Customer, '6/1/2015', @M6, @M6Q, @Descrip, @UPrice)

          INSERT INTO [dbo].[VFFSalesBudgetOut]
                   (Item, Region, SalesCode, Customer, Month, MonthAmt, MonthQty, Descrip, UPrice)
        VALUES        (@Item, @Region, @SalesCode, Customer, '7/1/2015', @M7, @M7Q, @Descrip, @UPrice)

          INSERT INTO [dbo].[VFFSalesBudgetOut]
                   (Item, Region, SalesCode, Customer, Month, MonthAmt, MonthQty, Descrip, UPrice)
        VALUES        (@Item, @Region, @SalesCode, Customer, '8/1/2015', @M8, @M8Q, @Descrip, @UPrice)

          INSERT INTO [dbo].[VFFSalesBudgetOut]
                   (Item, Region, SalesCode, Customer, Month, MonthAmt, MonthQty, Descrip, UPrice)
        VALUES        (@Item, @Region, @SalesCode, Customer, '9/1/2015', @M9, @M9Q, @Descrip, @UPrice)

          INSERT INTO [dbo].[VFFSalesBudgetOut]
                   (Item, Region, SalesCode, Customer, Month, MonthAmt, MonthQty, Descrip, UPrice)
        VALUES        (@Item, @Region, @SalesCode, Customer, '10/1/2015', @M10, @M10Q, @Descrip, @UPrice)

          INSERT INTO [dbo].[VFFSalesBudgetOut]
                   (Item, Region, SalesCode, Month, MonthAmt, MonthQty, Descrip, UPrice)
        VALUES        (@Item, @Region, @SalesCode, '11/1/2015', @M11, @M11Q, @Descrip, @UPrice)

          INSERT INTO [dbo].[VFFSalesBudgetOut]
                   (Item, Region, SalesCode, Customer, Month, MonthAmt, MonthQty, Descrip, UPrice)
        VALUES        (@Item, @Region, @SalesCode, Customer, '12/1/2015', @M12, @M12Q, @Descrip, @UPrice)

          Set @id = @id + 1
Print @id

End

5. Use Select command to check. Fig5

6. Copy All data and paste into excel ;Fig6

7. In Excel, Add 1st column to SALES2017

8. Open Navision then open Sales Budget >> New >> ; Fig7

9. Select "SALES2017" and click "Edit Budget", then click the Ellipsis icon that show Fig 8

A. Click "New" in "Item Budget Entries" page, select 1st line and right button . click "Paste Rows" Fig9

B. One time copy/paste 2000 records is better.