Langkah pertama desain HTML dengan file CSS, Bisa menggunakan Notepad dan di save file .css
READMORE
berikut coding CSS via Notepad
---------------------------------------------------------------------------------------
body{
font-family: Arial, Helvetica, sans-serif;
}
table
{
border-collapse: collapse;
width: 35%;
}
table, th, td
{
border: 1px solid black;
padding: 5px;
font-size: 14px;
text-align: center;
vertical-align: middle;
}
th
{
background-color: grey;
color: white;
font-size: 12px;
font-weight: lighter;
}
tr:nth-child(odd)
{
background-color: Lavender;
}
.left{
width: 100px;
float: left;
}
.right{
width: 900px;
float: right;
}
.container{
width: 70%;
margin: auto;
display: flex;
flex-direction: row;
}
.header{
width: 70%;
margin: auto;
display: flex;
flex-direction: column;
}
.summary{
width: 70%;
margin: auto;
padding: 20px;
padding: 20px;
display: flex;
flex-direction: column;
}
span{
padding-top: 5px;
padding-bottom: 5px;
}
.ttd {
table-layout : fixed;
border: 1px solid black !important;
}
h2{
border: 1px solid grey !important;
width: 69%;
margin: auto;
margin-top:3px;
background-color: grey;
color: white;
padding: 5px;
padding: 5px;
}
.header_line{
margin-top:20px;
margin-bottom:20px;
}
---------------------------------------------------------------------------------------------------
Langkah ke dua yaitu test coding css kita dengan format .HTML
--------------------------------------------------------------------------------------------------------
Ketiga kita Coding SCADA Citect via CICODE
Berikut coding CICODE :
---------------------------------------------------------------------------------------------------------
FUNCTION SKM_L1_HEADER()
INT IFile;
STRING sFilename, sFilepath;
sFilename = "[RUN]:\Report\SKM_L1\SKM_L1_Report_" + IntToStr(Date(2)) + "_" + IntToStr(DateMonth(TimeCurrent())) + "_SHIFT_" + TagRead("PLC1_M1_INT_SHIFT") + ".html";
IFile = FileOpen(sFilename, "a");
FileWriteLn(IFile, "<html>");
FileWriteLn(IFile, "<head>");
FileWriteLn(IFile, "<title>Report SKM Line 1</title>");
FileWriteLn(IFile, "<link rel='stylesheet' type='text/css' href='./styles.css' />");
FileWriteLn(IFile, "</head>");
FileWriteLn(IFile, "<body>");
FileWriteLn(IFile, "<div class='container'>");
FileWriteLn(IFile, "<div class='left'><th width='150px'><img src='indolakto.jpg' width='150px'></th></div>");
FileWriteLn(IFile, "<div class='right'><th><h1 align='center'>OEE SKM LINE 1 Report</h1></th></div>");
FileWriteLn(IFile, "</div>");
FileWriteLn(IFile, "<div style='width:70%' align='left' class='header'>");
FileWriteLn(IFile, "<span>Tanggal :" + TimeToStr(TimeCurrent(), 4) + " </span>");
FileWriteLn(IFile, "<span>Shift :" + TagRead("PLC1_M1_INT_SHIFT") + " </span>"); //Tag untuk status shift
//FileWriteLn(IFile, "<span>Line : SKM LINE 1</span>"); //untuk nomor Line produksi
FileWriteLn(IFile, "</div>");
//FileWriteLn(IFile, "<div class='header_line'>");
//FileWriteLn(IFile, "<h2 align='center'>LINE EFFICIENCY : " + TagRead("PLC1_M1_LE_PERSEN") + "</h2>"); //tag untuk line efficiency
//FileWriteLn(IFile, "<h2 align='center'>PRODUCT QUALITY : " + TagRead("PLC1_M1_QUALITY_PROD") + "</h2>"); //tag untuk product quality
//FileWriteLn(IFile, "</div>");
FileWriteLn(IFile, "<table style='width:70%' align='center'>");
FileWriteLn(IFile, "<tr>");
FileWriteLn(IFile, "<th>Time</th>");
FileWriteLn(IFile, "<th>Achieve Per H</th>");
FileWriteLn(IFile, "<th>Breakdown</th>");
FileWriteLn(IFile, "<th>Idle Time</th>");
FileWriteLn(IFile, "<th>Downtime</th>");
FileWriteLn(IFile, "<th>Line Efficiency</th>");
FileWriteLn(IFile, "<th>Product Quality</th>");
FileWriteLn(IFile, "</tr>");
FileClose(IFile);
sFilePath = PathToStr(sFileName);
END
FUNCTION SKM_L1_CONTENT()
INT IFile;
STRING sFilename, sFilepath;
sFilename = "[RUN]:\Report\SKM_L1\SKM_L1_Report_" + IntToStr(Date(2)) + "_" + IntToStr(DateMonth(TimeCurrent())) + "_SHIFT_" + TagRead("PLC1_M1_INT_SHIFT") + ".html";
IFile = FileOpen(sFilename, "a");
FileWriteLn(IFile, "<tr>");
FileWriteLn(IFile, "<td>" + TimeToStr(TimeCurrent(),4) + "</td>"); // fungsi untuk ambil waktu aktual komputer
FileWriteLn(IFile, "<td>" + TagRead("PLC1_M1_TOTAL_ACH") + " %</td>"); // tag untuk achivement per jam
FileWriteLn(IFile, "<td>" + TagRead("PLC1_M1_VAL_BD_MIN") + " Min</td>"); // tag untuk breakdown
FileWriteLn(IFile, "<td>" + TagRead("PLC1_M1_VAL_IDLE_MIN") + " Min</td>"); // tag untuk waktu idle
FileWriteLn(IFile, "<td>" + TagRead("PLC1_M1_VAL_DT_MIN") + " Min</td>"); // tag untuk downtime
FileWriteLn(IFile, "<td>" + TagRead("PLC1_M1_LE_PERSEN") + " %</td>"); // tag untuk line efficiency
FileWriteLn(IFile, "<td>" + TagRead("PLC1_M1_QUALITY_PROD") + " %</td>"); // tag untuk product quality
FileWriteLn(IFile, "</tr>");
FileClose(IFile);
sFilePath = PathToStr(sFileName);
END
FUNCTION SKM_L1_FOOTER()
INT IFile;
STRING sFilename, sFilepath;
sFilename = "[RUN]:\Report\SKM_L1\SKM_L1_Report_" + IntToStr(Date(2)) + "_" + IntToStr(DateMonth(TimeCurrent())) + "_SHIFT_" + TagRead("PLC1_M1_INT_SHIFT") + ".html";
IFile = FileOpen(sFilename, "a");
FileWriteLn(IFile, "<tr>");
FileWriteLn(IFile, "<td>Total</td>");
FileWriteLn(IFile, "<td>" + TagRead("PLC1_M1_TOTAL_ACH") + " %</td>"); // tag untuk total achivement per jam
FileWriteLn(IFile, "<td>" + TagRead("PLC1_M1_VAL_BD_MIN") + " Min</td>"); // tag untuk total breakdown
FileWriteLn(IFile, "<td>" + TagRead("PLC1_M1_VAL_IDLE_MIN") + " Min</td>"); // tag untuk total idle
FileWriteLn(IFile, "<td>" + TagRead("PLC1_M1_VAL_DT_MIN") + " Min</td>"); // tag untuk total downtime
FileWriteLn(IFile, "<td>" + TagRead("PLC1_M1_LE_PERSEN") + " %</td>"); // tag untuk total line efficiency
FileWriteLn(IFile, "<td>" + TagRead("PLC1_M1_QUALITY_PROD") + " %</td>"); // tag untuk total product quality
FileWriteLn(IFile, "</tr>");
FileWriteLn(IFile, "</table>");
FileWriteLn(IFile, "<div class='summary'>");
FileWriteLn(IFile, "<span>Target Produksi :" + TagRead("PLC1_M1_TRGT_PROD") + " karton</span>"); //Tag total produksi
FileWriteLn(IFile, "<span>Aktual Produksi :" + TagRead("PLC1_M1_INT_CNT_KRT_OK") + " karton</span>"); //Tag actual produksi
FileWriteLn(IFile, "</div>");
FileWriteLn(IFile, "<table class='ttd' style='width:70%' style='table-layout:fixed' align='center'>");
FileWriteLn(IFile, "<tr>");
FileWriteLn(IFile, "<th>SPV Shift</th>");
FileWriteLn(IFile, "<th>Operator</th>");
FileWriteLn(IFile, "<th>Factory Manager</th>");
FileWriteLn(IFile, "</tr>");
FileWriteLn(IFile, "<tr>");
FileWriteLn(IFile, "<td style='padding:50px'></td>");
FileWriteLn(IFile, "<td style='padding:50px'></td>");
FileWriteLn(IFile, "<td style='padding:50px'></td>");
FileWriteLn(IFile, "</tr>");
FileWriteLn(IFile, "<tr>");
FileWriteLn(IFile, "<td style='vertical-align:bottom'><p align='center'>"+ cekNIK(TagRead("PLC1_M1_SPV_NAME")) +"</p></td>"); // nama SPV Shift
FileWriteLn(IFile, "<td style='vertical-align:bottom'><p align='center'>"+ cekNIK(TagRead("PLC1_M1_OPR_NAME")) +"</p></td>"); // nama operator
FileWriteLn(IFile, "<td style='vertical-align:bottom'><p align='center'>Bpk Syarief H</p></td>"); // nama FM
FileWriteLn(IFile, "</tr>");
FileWriteLn(IFile, "</table>");
FileWriteLn(IFile, "</body>");
FileWriteLn(IFile, "</html>");
FileClose(IFile);
sFilePath = PathToStr(sFileName);
END
-----------------------------------------------------------------------------------------------
dan Coding Nomor Induk Karyawan
-----------------------------------------------------------------------------------------------
STRING FUNCTION cekNIK(INT NIK)
STRING nama;
IF(NIK = 1001) THEN
RETURN "Rangga";
END
IF(NIK = 1002) THEN
RETURN "Dodi";
END
IF(NIK = 1003) THEN
RETURN "Agus D";
END
IF(NIK = 1004) THEN
RETURN "Budi S";
END
IF(NIK = 1005) THEN
RETURN "Ahmad K";
END
IF(NIK = 1006) THEN
RETURN "Rizal";
END
END
-----------------------------------------------------------------------------------------------
Langkah ke empat jangan lupa bikin konfigurasi SCADA baik Tag, Event, dan graphic
seperti berikut
Langkah ke Lima membuat folder Report
Copy file CSS yang sudah kita bikin, dan beserta Logo Prusahaan
cara pengoprasiannya adalah ketika di PB_Start di SCADA maka report mulai menulis per 1 menit (Contoh) dan akan berakhir ketika di PB_Reset