====== Failure Management ======
NIS should define machines failures as an inherited structure. The fields of this structure are defined below:
* KIND: defines the kind of failure
* WHERE: defines where failure occurred; in case of single machine this field is the same machine where the failure is reached, in case of work center this field should be specified a part selecting one machine of the work center
* WHAT: defines what failure is occurred
The image represents an example by Simon Fretz \\ \\
{{:cli:franke:image_3_.png?900|}} \\ \\
The following ER graph describes data structures \\ \\
{{:cli:franke:franke-failure-er.png|}} \\ \\
The related physical schema following \\ \\
{{:cli:franke:franke-failure-mng.png|}} \\ \\
For using these structures into NIS are required some activities described below:
* Create tables kfail, whafail
* Update table causafm
* Create GUI for managing kfail, whafail
* Update GUI for inserting into causafm kfail, whafail
* **Update touch panel GUI for selecting failure cause through the step by step selection of KIND -> WHERE -> WHAT**
===== How To: Select List of Cause =====
The selection will occur on Touch Panel 10''. Each touch panel is linked to a specific line / machine (location). Each location is defined into ubicaz. \\ \\
For each specific failure cause there is a row into table causafm. \\ \\
{{:cli:franke:selezione_619.png?900|}} \\ \\
For selecting correct information of a specific location it's required next steps:
- identify a sub-set of rows into table causafm referred to the specific kind of failure as selected through "START-FAILURE-BUTTON"
* change-over-time => setup=1
* failure => setup=0 and tipofm='F'
* organizational => setup=0 and tipofm='P'
- starting from previous sub-set identify a sub-set of rows into table causafm referred to the specific location
* risolist = '*' or risolist like '%ubicaz.codice%'
If sub-set of causes is available then it's possible to manage it through "KIND - WHERE - WHAT". **It's necessary to add column "caugrp" for calculating "OEE STRATIFICATION":** \\ \\
{{:cli:franke:selezione_620.png|}} \\ \\
===== Database schema changes =====
ALTER TABLE causafm ADD COLUMN zord integer DEFAULT 0;
COMMENT ON COLUMN causafm.zord IS 'Ordinamento 0 => n';
===== Maintenance time management =====
Maintenance time managed using following causes of maganet:
* INMA: begin of maintenance
* FIMA: end of maintenance
Following query for adding causes into caumaga: \\ \\
insert into caumaga (codice,descrizio,prelievo,deposito,cariniz,caucol,utente,datareg,flag,impegno) select 'INMA','Inizio manutenzione',prelievo,deposito,cariniz,caucol,utente,datareg,'M',impegno from caumaga where codice='INFM';
insert into caumaga (codice,descrizio,prelievo,deposito,cariniz,caucol,utente,datareg,flag,impegno) select 'FIMA','Fine manutenzione',prelievo,deposito,cariniz,caucol,utente,datareg,'M',impegno from caumaga where codice='FIFM';
AgentVisualMng defines when it's required a maintenance request and when it's required a termination of maintenance using following flag:
* inma: if 1 indicates that it's required confirmation for beginning maintenance
* fima: if 1 indicates that it's required confirmation for terminating maintenance
The GUI uses AgentLavoro from library libwmsgp to register begin and termination of maintenance operation into maganet.
===== Automatically terminate Stop Machine =====
It's possible to filter some stop machine causes for automatic terminating stop machine when one item is produced on specific production line. \\ \\
To do it you must create a new view as following:
select movimag.* from movimag left join (
select movimag.codubi from movimag inner join
(select codubi, max(codice) as cod from movimag
where codcau='INFM' or codcau='FIFM' group by codubi) as q
on q.cod=movimag.codice where caufm='setup') as q1 on
q1.codubi=movimag.codubi where q1.codubi is null
order by movimag.codice desc
In the above example caufm='setup' you can change setup with specific stop machine cause you want to filter. In the ctrldb configuration you should substitute the table "movimag" with the view you created: