Differences

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

Link to this comparison view

Next revision
Previous revision
en:sw:01-mervis:hmi-customdir-hidden [2024/09/05 14:55] – created avsetulaen:sw:01-mervis:hmi-customdir-hidden [2024/12/30 14:11] (current) avsetula
Line 1: Line 1:
-====== Vlastní design HMI ====== +====== Custom HMI design ======
-Zařízení Unipi je možné objednat také s vlastním logem a ve vlastním designu, více podrobností naleznete [[https://www.unipi.technology/cs/zakazkovy-vyvoj/product-branding-416|na stránkách Unipi]]. Zejména v tomto případě je skoro až žádoucí, aby bylo možné aplikovat vlastní design také na softwarové rozhraní. Tento článek proto vysvětluje postup, kterým je možné definovat vlastní CSS, JavaScript, obrázky a nahrát je jako součást HMI.+
  
-Tato úprava je zahrnuta také ve výchozím projektu Mervis IDE, který je možné stáhnout přímo z kontroléru, nebo z tohoto odkazu.+#;; 
 +<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 logo, icons, CSS or JavaScript and upload it as part of the HMI.
  
-===== Příprava ===== +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}}. 
-Pro radikální změny rozhranínebo doplnění speciálních efektůje nezbytná velmi dobrá znalost CSS a JS. V některých případech může být dokonce výhodnějšívytvořit zcela vlastní webové rozhraní ke komunikaci s programem (RT) využít [[https://kb.mervis.info/doku.php/en:mervis-ide:65-webpanel:webpanel-api|webpanel API]].+===== Prerequisites ===== 
 +For radical changes to the interfaceor adding special effects, a very good knowledge of CSS and JS is necessaryIn some cases, it may even be better to create 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).
  
-**Pro běžné změny** rozhraní postačí stáhnout předem připravený archiv obsahující úpravu rozhraní v CSS JS. Obsah archivu je nutné extrahovat do nové složky s názvem "CustomWebFiles".+**For common changes** to the interface, just download the pre-prepared archive containing the CSS and JS modificationsThe contents of the archive must be extracted to a new folder called "CustomWebFiles".
  
 <WRAP center round info 85%> <WRAP center round info 85%>
-Archiv se soubory {{ :en:sw:01-mervis:hmi-customdir:customwebfiles.zip |ke stažení zde}}.+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 24: 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 41: 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 53: 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.