Auto Report HTML Citect SCADA

Langkah pertama desain HTML dengan file CSS, Bisa menggunakan Notepad dan di save file .css

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 


Dan hasil nya bisa muncul di Folder yang kita bikin






Semoga bermanfaat














READMORE
 

CITECT SCADA POP UP 8+ TAG (CICODE)


FUNCTION XGIPAM_POPUP(STRING EQUIPMENT)
AssVarTags(-2, 0,EQUIPMENT+"\MMXU3\PPV\phsAB",
EQUIPMENT+"\MMXU3\PPV\phsBC",
EQUIPMENT+"\MMXU3\PPV\phsCA",
EQUIPMENT+"\MMXU1\A\phsA",
EQUIPMENT+"\MMXU1\A\phsB",
EQUIPMENT+"\MMXU1\A\phsC",
EQUIPMENT+"\MMXU1\Hz",
EQUIPMENT+"\MMXU1\TotPF");
AssVarTags(-2, 8,EQUIPMENT+"\MMXU1\TotW",
EQUIPMENT+"\MMXU1\TotVAr");

AssWin("!POP_XGIPAM",20,20,1);
WinTitle(EQUIPMENT+"  Parameter")
END









READMORE
 

Computer Setup Editor CITECT SCADA


Alarm Format, untuk status alarm / event title bar yang di atas


Protocol MODNET (Modbus)


Settingan untuk Power Wizard 2.1


Settingan untuk Monitor display HD1080, fungsinya agar semua Page di SCADA memiliki display yg sama yaitu HD1080


dan ini adalah syarat dari monitor display settingan yang ada di computer setup editor di atas.


READMORE
 

Program PLC 1 Tombol untuk START dan STOP


%M17 adalah address untuk START atau STOP
dan coil yang di aktifkan adalah %M16. menggunakan Timer selama 2 Second untuk fungsi PB Start dan Stop , seperti pada gambar.
READMORE
 

Timer Countdown Programming PLC M221 Schneider

Timer Countdown Programming PLC Modicon M221 Schneider Electric





READMORE
 

Adaptable Tank Level Monitoring CITECT SCADA

Object Properties - Fill (Level) 

The fill level of an object/group can be changed during runtime, increasing or decreasing dynamically whenever the value of a particular expression changes. As the value of the expression increases and decreases, the fill level will increase and decrease accordingly (as a percentage of the full capacity of the object/group). If the object/group resizes at runtime, the fill level will adjust automatically in order to maintain the correct percentage. 

The color that is used is set through either General Appearance, or Color Fill. 

This property could be used to display temperature variations. You could even combine the Fill Color and Fill Level properties to produce a thermometer with mercury that rises and changes color with rising temperature. 

Objects and groups have the following Fill Level properties: 

Level expression 

The value of the expression entered in this field (253 characters maximum) will determine the fill level of the object/group. By default, when the expression returns its minimum value, the object/group will be filled to the At minimum level. When the expression returns its maximum value, the object/group will be filled to the At maximum level. When the expression returns a value half-way between its minimum and maximum, the object/group will be filled to half-way between the At minimum and At maximum levels. 

To insert a tag or a function, click the Wizard button to the right of this field. This button displays two options: Insert Tag and Insert Function. 

Note:You can also insert Equipment.item references into expression fields using the insert tag option; however if no equipment has been configured in your system the list will be empty. You will need to configure equipment or deselect the option 'Display equipment items when populating tag list' in the Project Editor Options Dialog to populate the list with available tags. 

[Level expression] Specify range 

Select this box to manually specify Minimum and Maximum values for the Level expression, rather than using the default values. For an expression containing an analog variable tag, the defaults are the Engineering Zero and Full Scale values from the last variable tag in the expression. If the analog variable tag does not have Engineering Zero and Full Scale values, the defaults are 0 (zero) and 32000. For expressions without tags, the defaults are 0 (zero) and 100. 

[Level expression] Minimum 

Enter the minimum value for the expression. When this value is returned by the expression, the object/group will fill to the At minimum level. You can only enter a value here if you have selected the Specify range box. 

[Level expression] Maximum 

Enter the maximum value for the expression. When this value is returned by the expression, the object/group will fill to the At maximum level. You can only enter a value here if you have selected the Specify range box. 

At minimum 

The level to which the object/group will be filled when the Level expression returns its minimum value. For example, if you enter 30, the object/group will be 30% full when the expression returns its minimum value. 

You can change the percentage by pressing the up and down arrows to the right of the field, or by entering another value in this field. 

At maximum 

The level to which the object/group will be filled when the Level expression returns its maximum value. For example, if you enter 90, the object/group will be 90% full when the expression returns its maximum value. 

You can change the percentage by pressing the up and down arrows to the right of the field, or by entering another value in this field. 

Fill Direction 

The direction in which the color will spread when increasing. There are four options (each represented by an arrow): Up, Down, Left, Right. If you choose Up, the object/group will be filled from the bottom up. If you choose Left, the object/group will be filled from right to left, and so on 

Background color 

The color of any unfilled part of the object/group (for example, if the object/group is only 90% full, the unfilled 10% will be display using this color). The background is often made transparent. Using transparent, you would see the outline of the object/group, and anything behind the object/group on the page. 

Note: If an object in a group is a slider, it might change the overall size of the group when used at runtime. If it does, the fill level of the group will adjust accordingly. 

Group and Object Fill Level: Examples 

A group and its objects can be configured with different fill levels. The group fill level, however, is usually thought of as a reveal of the objects in the group. Group fill level and object fill level operate independently of each other; the group fill level just determines how much of the objects display. 



READMORE
 

Link Page CITECT SCADA


Displays a graphics page in the active window. The page needs to be in one of the operator's current areas. You can specify either the Page Name or the Page Number of the graphics page.

You can also specify if the page operates within the context of a particular cluster in a multiple cluster project. When the page launches during runtime, the ClusterName argument is used to resolve any tags that have the cluster name omitted.

This function is similar to PageDisplay(), however PageGoto() does not put the current page into the page navigation history.

You cannot call this function from the Exit command field (see Page Properties) or a Cicode Object.

Note: This function is not supported in the server process in a multiprocessor environment. Calling this function from the server process results in a hardware alarm being raised.

Syntax

PageGoto(Page,ClusterName)

Page:

The name or page number of the page to display (in quotation marks ""). Can be prefixed by the name of a host cluster, that is "ClusterName.Page". This will take precedence over the use of the ClusterName parameter if the two differ.

sClusterName:

The name of the cluster that will accommodate the page at runtime (in quotation marks ""). The specified cluster is used to resolve any tags that have the cluster name omitted. If the Page parameter is prefixed with the name of a cluster, this parameter will not be used.

Return Value

0 (zero) if the page is successfully displayed, otherwise an error is returned.

Related Functions

PageDisplay

Example

PageDisplay("MIMIC1");! Displays page "MIMIC1".PageDisplay("MIMIC2");/* Displays page "MIMIC2" and places page "MIMIC1" onto the
page navigation history. */PageGoto("10");/* Displays page "10". Page "MIMIC2" is not placed onto the
page navigation history. */

==============================

PageGoto("UMVMDB_T1", "SHIAM")

==============================

Note: Before Vijeo Citect version 5.0, page records could be edited in the Project Editor. One of the fields available for configuration was "Page Number". The value entered for a page could then be used in runtime with the Page Cicode functions such as PageDisplay(), PageGoto(), and PageInfo(1).
For example, PageDisplay("1") can be used to display the page that has "1" (without the quotes) set in the Page Number field. PageInfo(1) returns the Page Number of the current page.

From version 5.0 on, this feature is only backwards-supported. The "Alias" field in the project Pages.DBF file still contains the Page Numbers from upgraded projects; however, the Pages database records are no longer available for direct editing in Vijeo Citect.




READMORE
 

Button Confirm CITECT SCADA

Message

Displays a message box on the screen and waits for the user to select the OK or Cancel button.

This function is a blocking function. It will block the calling Cicode task until the operation is complete.

This function will be blocked if called from a non-client process, as well as from kernel window of a client process if [Client]DisableDisplay is set to TRUE.

Syntax

Message(Title, Prompt, Mode)

Title: 

The title of the message box. The maximum length is 254 chars. 

Prompt: 

The prompt displayed in the message box.

Mode: 

The mode of the message box:

0 - OK button

1 - OK and Cancel button

16 - Stop Icon

32 - Question Icon

48 - Exclamation Icon

64 - Information Icon

Select more than one mode by adding the modes. For example, set Mode to 33 to display the OK and Cancel buttons and the Question icon. You can only display one icon for the message box.

Return Value

0 (zero) if successful, otherwise an error is returned. If the user presses the Cancel button the function returns an error code of 299.

Related Functions

Input 

Example

/* Display an error message in a message box. */IF Total<>100 THEN    Message("Error","Total not 100%",48);END



=================================================================

IF Message("Confirm", "Do you want to CB CLOSE %equipment% ?", 1) = 0 THEN
%equipment%_CBCO=1;
Sleep(2);
%equipment%_CBCO=0;
END

=================================================================

%equipment% adalah Addresse Ginie







READMORE
 

Input Values CITECT SCADA

%Equipment%_TIM_LUB_ON
==========================
%Equipment% adalah untuk addresse Ginie
_TIM_LUB_ON adalah alamat Variable Tag


%Equipment%_TIM_LUB_ON = FormNumPad("Enter The Value",%Equipment%_TIM_LUB_ON,0)


%Equipment%_TIM_LUB_ON = Arg1
=============================
Keyboard Command



Hasil dan Tampilan





READMORE
 

Easy Harmony HMI GXU Schneider Electric

INTRODUCTION THE EASY HARMONY GXU

  • In this Module we will:
  • Features
  • Benefits
  • Aplications
  • Range of Panels
  • Hardware & Accessories Overview
  • Configurations
  • Functions

FEATURES
  • TFT color screens, USB connection, Ethernet port
  • The panels reach a maximum thickness of 38 mm
  • Free communication wiring slot
  • Configuration with Vijeo Designer Basic software
  • Easy to install, programming 
  • Easy to connect to the Easy Modicon M100/M200 logic controllers range
  • Easy to maintain: replaceable battery for RTC and a self-diagnosis tool
  • Robust design for harsh environment, PCBA coating
BENEFITS
  • Fit for purpose at affordable price with no compromise on easiness, robustness, availability and services
APPLICATIONS
  • Standard OEM and Panel Builder applications
  • Textile: Blowing and carding machines, winding and twisting machines, dyeing and finishing machines
  • Packaging: Vertical and horizontal packing, filling machine, labelling machine
  • HVAC & Pumping: Air compressor, water pumping ...
  • Miscellaneous sectors of activity: Machine tools (grinder, saw, etc...), plastic and rubber (extruding machine, etc...), printing (stamping and folding machines, etc...), machines manufacturing...

RANGE OF PANELS


HMIGXU35** :  7” wide
HMIGXU55** : 10” Wide
HMIGXU**12 : Embedded Ethernet
HMIGXU**00 : No Ethernet


HARDWARE & ACCESSORIES OVERVIEW 


ACCESSORIES








CONFIGURATION
  • Easy Harmony GXU touch screen panels are configured using Vijeo Designer Basic software in Windows XP Professional, Windows 7 (Service Pack 3) and Windows 8.1 (32-bit and 64-bit) environments. 
  • This simplified configuration software boasts an intuitive user interface with many configurable windows, enabling projects to be developed quickly and easily. 


FUNCTIONS
  • Display of animated mimics with 8 types of animation (pressing the touch panel, color changes, filling, movement, rotation, size, visibility and value display) 
  • Control, modification of numeric and alphanumeric values 
  • Display of date and time 
  • Real-time curves and trend curves with log 
  • Alarm display, alarm log and management of alarm groups 
  • Multi-window management 
  • Multilingual application management (10 languages simultaneously) 
  • Recipe management 
  • Data processing via JavaScript 
  • Application and logs stored on external application memory card in USB stick format (1) 
  • Management of printer and barcode reader 


READMORE
 

READ VAR & READ Power Meter (PM) PLC Schneider M221

PLC A 












PLC B








HMI





READMORE