Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:sw:01-mervis:hmi-customdir-hidden [2024/09/05 15:23] – [Příprava] avsetulaen:sw:01-mervis:hmi-customdir-hidden [2024/12/30 14:11] (current) avsetula
Line 1: Line 1:
 ====== Custom HMI design ====== ====== Custom HMI design ======
-Unipi devices can also be ordered with your own logo and design, please visit the [[https://www.unipi.technology/customization/product-branding-416|Unipi website]] for more details. Especially in this case, it is almost desirable to apply the custom design to the software interface as well. This article explains how to define your own CSSJavaScript, or images and upload them as part of the HMI.+ 
 +#;; 
 +<html><style>h1 {margin-bottom: 10px !important;}</style><span class="tag-skelet inline-tags"> 
 +<span class="tag-patron">Patron</span> 
 +<span class="tag-neuron">Neuron</span> 
 +<span class="tag-gate">Gate</span> 
 +<span class="tag-unipi11">Unipi&nbsp1.1</span> 
 +<span class="tag-axon">Axon</span> 
 +</span></html> 
 +#;; 
 + 
 +Unipi devices can also be ordered with your own logo and design, please visit the [[https://www.unipi.technology/customization/product-branding-416|Unipi website]] for more details. Especially in this case, it may be desirable to apply the custom design to the software interface as well. This tutorial explains how to define your own logoiconsCSS or JavaScript and upload it as part of the HMI.
  
 This modification is also included in the default Mervis IDE project, which can be downloaded directly from the controller or from {{en:sw:01-mervis:hmi-customdir:unipi-welcome-solution.zip|this link}}. This modification is also included in the default Mervis IDE project, which can be downloaded directly from the controller or from {{en:sw:01-mervis:hmi-customdir:unipi-welcome-solution.zip|this link}}.
 ===== Prerequisites ===== ===== Prerequisites =====
-For radical changes to the interface, or adding special effects, a very good knowledge of CSS and JS is necessary. In some cases, it may even be better to create a custom web interface and use the [[https://kb.mervis.info/doku.php/en:mervis-ide:65-webpanel:webpanel-api|webpanel API]] to interact with the program (RT).+For radical changes to the interface, or adding special effects, a very good knowledge of CSS and JS is necessary. In some cases, it may even be better to create a custom web interface and use the [[https://kb.mervis.info/doku.php/en:mervis-ide:65-webpanel:webpanel-api|webpanel API]] or other communication protocol to interact with the program (RT).
  
 **For common changes** to the interface, just download the pre-prepared archive containing the CSS and JS modifications. The contents of the archive must be extracted to a new folder called "CustomWebFiles". **For common changes** to the interface, just download the pre-prepared archive containing the CSS and JS modifications. The contents of the archive must be extracted to a new folder called "CustomWebFiles".
  
 <WRAP center round info 85%> <WRAP center round info 85%>
-Download the archive {{:en:sw:01-mervis:hmi-customdir:customwebfiles.zip|here}}.+Archive with files: {{:en:sw:01-mervis:hmi-customdir:customwebfiles.zip|}}.
 </WRAP> </WRAP>
  
  
-===== Přidání do sestavy Mervis IDE =====+===== How to use in Mervis IDE solution? =====
  
-Následující postup předpokládá, že již máte [[creating-simple-hmi-hidden|vytvořenu HMI šablonu]], kterou se podařilo do PLC nahrát.+For the following steps it is important to have a [[creating-simple-hmi-hidden|created HMI template]] that has been successfully uploaded to the PLC.
  
 {{ .:hmi-customdir:hmi-customdir_01-overview.png?direct |}}  {{ .:hmi-customdir:hmi-customdir_01-overview.png?direct |}} 
Line 22: Line 33:
 ---- ----
  
-Nyní je nutné přesunout adresář CustomWebFiles do adresáře sestavy Mervis IDE:+Now you need to move the CustomWebFiles directory to the Mervis IDE solution directory:
  
 {{ .:hmi-customdir:hmi-customdir_02-directory.png?direct |}} {{ .:hmi-customdir:hmi-customdir_02-directory.png?direct |}}
 /* obr2 - jen adresář sestavy */ /* obr2 - jen adresář sestavy */
  
-Ve vlastnostech PLC Mervis IDE vyhledejte parametr "Adresář pro přizpůsobenív rámci kategorie "Parametry webua vyberte adresář CustomWebFiles:+In the PLC properties in the Mervis IDE, look for the "Custom Directoryparameter under the Web Parameterscategory and set the CustomWebFiles directory:
  
 {{ .:hmi-customdir:hmi-customdir_03-detail-customdir.png?direct |}} {{ .:hmi-customdir:hmi-customdir_03-detail-customdir.png?direct |}}
 /* obr3 - detail na vlastnosti PLC */ /* obr3 - detail na vlastnosti PLC */
  
-Nahrajte sestavu vč. webu a poté zobrazte HMI ve webovém prohlížeči zadáním IP kontroléru:+Upload the solution including the web and then view the HMI in the web browser by entering the IP of the controller:
  
 {{ .:hmi-customdir:hmi-customdir_04-unipi-hmi.png?direct |}} {{ .:hmi-customdir:hmi-customdir_04-unipi-hmi.png?direct |}}
Line 39: Line 50:
 ---- ----
  
-Nynípokud se vzhled HMI změnil z Mervis na Unipi, již můžete v rámci adresáře CustomWebFiles dělat vlastní úpravyNejsnazší úpravou je nahrazení loga (''CustomWebFiles/img/Mervis_WEBPANEL_Color.svg''a faviconu (''CustomWebFiles/favicon.ico''), je ale nutné dodržet formát souborů (SVG & ICO). Při dalším nahrání webu z IDE bude úprava zahrnuta.+Nowif the HMI design has changed from Mervis to Unipi, you can make custom modifications within the CustomWebFiles directoryThe easiest modification is to replace the logo (''CustomWebFiles/img/Mervis_WEBPANEL_Color.svg''and favicon (''CustomWebFiles/favicon.ico''). The images must have the same name and file format (SVG & ICO). After the next upload of the web (HMI) from the IDE, the modification will be included.
  
-Obdobně je možné upravit i soubory my_style.css my_script.js, které jsou přímo v adresáři CustomWebFiles. Pro ukázku bude nejlepší změnit základní barvu rozhraní HMI ''CustomWebFiles/my_style.css'' z modré Unipi (#1b75bc) na zelenou (#47a348).+Similarly, you can edit the **my_style.css** and **my_script.js** fileswhich are located directly in the CustomWebFiles directoryFor demonstration it's best to change the base color of the HMI in ''CustomWebFiles/my_style.css'' from Unipi blue (#1b75bc) to green (#47a348).
  
-Po nahrání v IDE a aktualizaci stránky se HMI změní:+Once the solution is uploaded, refresh the web page and the controller'HMI will change:
  
 {{ .:hmi-customdir:hmi-customdir_05-custom-hmi.png?direct |}} {{ .:hmi-customdir:hmi-customdir_05-custom-hmi.png?direct |}}
Line 51: Line 62:
  
  
-===== Na co si dát pozor? ===== +===== Please note ===== 
-  - Tlačítko archivace v Mervis IDE nazahrne složku CustomWebFiles, proto je nutné tento adresář do archivu doplnit ručně, nebo sestavu archivovat externím nástrojem+  - The archive button in Mervis IDE does not include the CustomWebFiles folderso it is necessary to add this folder to the archive manually or use an external tool to archive the solution
-  - Pozor na chyby v JavaScriptu, které mohou zapříčinit chybu načítání dat.+  - Beware of JavaScript errors that can cause data loading errors.