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.